[mapguide-commits] r9690 - in sandbox/jng/ogc_viewer_representation/Web/src: DevHttpServer viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jul 28 05:41:38 PDT 2020


Author: jng
Date: 2020-07-28 05:41:32 -0700 (Tue, 28 Jul 2020)
New Revision: 9690

Added:
   sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css
   sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css.map
   sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js
   sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js.map
Modified:
   sandbox/jng/ogc_viewer_representation/Web/src/DevHttpServer/DevHttpServer.vcxproj
Log:
Add OpenLayers 6.4.0 to viewerfiles and make sure viewerfiles is copied to MgDevHttpServer output

Modified: sandbox/jng/ogc_viewer_representation/Web/src/DevHttpServer/DevHttpServer.vcxproj
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/DevHttpServer/DevHttpServer.vcxproj	2020-07-28 12:29:52 UTC (rev 9689)
+++ sandbox/jng/ogc_viewer_representation/Web/src/DevHttpServer/DevHttpServer.vcxproj	2020-07-28 12:41:32 UTC (rev 9690)
@@ -124,6 +124,9 @@
 echo Copy mapagent test pages
 IF NOT EXIST "$(TargetDir)wwwroot\mapagent" mkdir "$(TargetDir)wwwroot\mapagent"
 xcopy /r /d /y "$(SolutionDir)..\..\UnitTest\WebTier\MapAgent\MapAgentForms\*.*" "$(TargetDir)wwwroot\mapagent"
+echo Copy viewer asset files
+IF NOT EXIST "$(TargetDir)wwwroot\viewerfiles" mkdir "$(TargetDir)wwwroot\mapagent\viewerfiles"
+xcopy /r /d /y "$(SolutionDir)viewerfiles\*.*" "$(TargetDir)wwwroot\viewerfiles"
 echo Copy web tier dlls
 xcopy /r /d /y "$(TargetDir)..\*.dll" "$(TargetDir)"
 echo Copy web tier pdbs
@@ -163,6 +166,9 @@
 echo Copy mapagent test pages
 IF NOT EXIST "$(TargetDir)wwwroot\mapagent" mkdir "$(TargetDir)wwwroot\mapagent"
 xcopy /r /d /y "$(SolutionDir)..\..\UnitTest\WebTier\MapAgent\MapAgentForms\*.*" "$(TargetDir)wwwroot\mapagent"
+echo Copy viewer asset files
+IF NOT EXIST "$(TargetDir)wwwroot\viewerfiles" mkdir "$(TargetDir)wwwroot\viewerfiles"
+xcopy /r /d /y "$(SolutionDir)viewerfiles\*.*" "$(TargetDir)wwwroot\viewerfiles"
 echo Copy web tier dlls
 xcopy /r /d /y "$(TargetDir)..\*.dll" "$(TargetDir)"
 echo Copy web tier pdbs
@@ -203,6 +209,9 @@
 echo Copy mapagent test pages
 IF NOT EXIST "$(TargetDir)wwwroot\mapagent" mkdir "$(TargetDir)wwwroot\mapagent"
 xcopy /r /d /y "$(SolutionDir)..\..\UnitTest\WebTier\MapAgent\MapAgentForms\*.*" "$(TargetDir)wwwroot\mapagent"
+echo Copy viewer asset files
+IF NOT EXIST "$(TargetDir)wwwroot\viewerfiles" mkdir "$(TargetDir)wwwroot\mapagent\viewerfiles"
+xcopy /r /d /y "$(SolutionDir)viewerfiles\*.*" "$(TargetDir)wwwroot\viewerfiles"
 echo Copy web tier dlls
 xcopy /r /d /y "$(TargetDir)..\*.dll" "$(TargetDir)"
 echo Copy web tier pdbs
@@ -243,6 +252,9 @@
 echo Copy mapagent test pages
 IF NOT EXIST "$(TargetDir)wwwroot\mapagent" mkdir "$(TargetDir)wwwroot\mapagent"
 xcopy /r /d /y "$(SolutionDir)..\..\UnitTest\WebTier\MapAgent\MapAgentForms\*.*" "$(TargetDir)wwwroot\mapagent"
+echo Copy viewer asset files
+IF NOT EXIST "$(TargetDir)wwwroot\viewerfiles" mkdir "$(TargetDir)wwwroot\mapagent\viewerfiles"
+xcopy /r /d /y "$(SolutionDir)viewerfiles\*.*" "$(TargetDir)wwwroot\viewerfiles"
 echo Copy web tier dlls
 xcopy /r /d /y "$(TargetDir)..\*.dll" "$(TargetDir)"
 echo Copy web tier pdbs

Added: sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css	                        (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css	2020-07-28 12:41:32 UTC (rev 9690)
@@ -0,0 +1,2 @@
+.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-step-marker{width:1px;height:15px;background-color:#000;float:right;z-Index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:12px;z-Index:11;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-text{position:absolute;font-size:14px;text-align:center;bottom:25px;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-singlebar{position:relative;height:10px;z-Index:9;box-sizing:border-box;border:1px solid #000}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-we
 bkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align
 :center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attrib
 ution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:
 2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}
+/*# sourceMappingURL=ol.css.map */
\ No newline at end of file

Added: sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css.map
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css.map	                        (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.css.map	2020-07-28 12:41:32 UTC (rev 9690)
@@ -0,0 +1 @@
+{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,IAAI,MAAM,KAGpB,mBACE,IAAK,IACL,MAAO,IACP,SAAU,SAGZ,eACE,WAAY,kBACZ,cAAe,IACf,OAAQ,IACR,KAAM,IACN,QAAS,IACT,SAAU,SAEZ,qBACE,OAAQ,IAAI,MAAM,KAClB,WAAY,KACZ,MAAO,KACP,UAAW,KACX,WAAY,OACZ,OAAQ,IACR,YAAa,QAAQ,CAAE,MACvB,WAAY,IAAI,KAElB,cACE,SAAU,SACV,OAAQ,IACR,KAAM,IAER,sBACE,MAAO,IACP,OAAQ,KACR,iBAAkB,KAClB,MAAO,MACP,QAAS,GAEX,oBACE,SAAU,SACV,OAAQ,KACR,UAAW,KACX,QAAS,GACT,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EAAE,KAAK,KAEpE,eACE,SAAU,SACV,UAAW,KACX,WAAY,OACZ,OAAQ,KACR,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EA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AAa,EAAE,EAAE,IAAI,KAEvB,mBACE,QAAS,OACT,WAAY,KAEd,0CACE,QAAS,IAEX,oBACE,WAAY,IACZ,UAAW,QACX,eAAgB,OAEE,uBAApB,mBACE,QAAS,aAEX,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EAEvB,qCACE,WAAY,MACZ,WAAY,MA
 Ed,wCACE,QAAS,KAGX,eACE,IAAK,MACL,KAAM,KACN,OAAQ,MAEV,sBACE,SAAU,SACV,OAAQ,KAGV,yBACE,IAAK,MAGP,gBACE,KAAM,KACN,OAAQ,KAEV,iCACE,OAAQ,EACR,KAAM,EACN,cAAe,EAAE,IAAI,EAAE,EAEzB,oCACA,uBACE,QAAS,aAEX,oCACE,OAAQ,IAAI,MAAM,QAClB,OAAQ,MACR,OAAQ,IACR,MAAO,MAET,0CACE,OAAQ,IACR,KAAM,IACN,SAAU,SAEZ,iDACA,wCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,oBACE,OAAQ,IAAI,OAAO,kBAGrB,0CACE,OAAQ"}
\ No newline at end of file

Added: sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js	                        (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js	2020-07-28 12:41:32 UTC (rev 9690)
@@ -0,0 +1,9 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ol=e():t.ol=e()}(window,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default
 }:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=24)}([function(t,e,r){"use strict";(function(t,i){r.d(e,"a",(function(){return J})),r.d(e,"b",(function(){return _r})),r.d(e,"c",(function(){return Zr})),r.d(e,"d",(function(){return ur})),r.d(e,"e",(function(){return Kr})),r.d(e,"f",(function(){return n}));var n={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",e
 xample:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"whi
 te",intensity:.4}},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https:
 //en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_g
 eojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profil
 e is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `ht
 tps:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},sche
 me:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the f
 ollowing order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rg
 b for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification toleran
 ce (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom feat
 ures are not clustered)."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for t
 he geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc
 :"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic funct
 ionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `backgrou
 nd`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-ex
 trusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed."
 ,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"vis
 ible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basi
 c functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2
 ,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpola
 ted:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"
 `line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functi
 onality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to t
 he viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",d
 efault:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"pro
 perty-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"fact
 or of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic func
 tionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},e
 xpression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",
 {"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is p
 laced closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"prope
 rty-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0"
 ,ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:
 !1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,
 units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property
 -type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"
 property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"
 The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",value
 s:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.
 6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orienta
 tion. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol 
 collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic func
 tionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, th
 e text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant
 "},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:
 {type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature
  geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the fu
 nction input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the fol
 lowing circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Bin
 ds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-supp
 ort":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise."
 ,group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `["get", "building_type"]`). Each label must be either:\n - a single literal value; or\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `["c", "b"]`). The input matches if any of the values in the array matches, similar to the `"in"` operator.\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"
 6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just les
 s than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth
  results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multip
 le values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one
  is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expr
 ession. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image nam
 e or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`
 . If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc
 39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are pro
 vided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another
  object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object.  Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the reque
 sted property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appea
 r as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Return
 s the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the f
 irst input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the in
 put.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{
 js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJ
 SON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise.
  The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0
 .41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Ca
 ses where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0"
 ,macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc
 :"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String"
 ,"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale bei
 ng used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (e
 xtruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{i
 nterpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios
 :"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functiona
 lity":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{i
 nterpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expressio
 n:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectivel
 y.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-suppo
 rt":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0
 ",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}
 ,"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of referenc
 e for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpo
 lated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},exp
 ression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must 
 be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius."
 ,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interp
 olated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The cir
 cle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pit
 ched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"prope
 rty-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,d
 oc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalbl
 ue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-
 driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["
 zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transit
 ion:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-suppo
 rt":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0
 ",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:[
 "zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster
 :{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"numbe
 r",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation 
 method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"
 number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",de
 fault:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorg
 es.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!
 1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, i
 ts values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function s(t,e){return t(e={exports:{}},e.exports),e.exports}var a=s((function(t,e){!function(r){var i=e&&!e.nodeType&&e,n=t&&!t.nodeType&&t,s="object"==typeof o&&o;s.global!==s&&s.window!==s&&s.self!==s||(r=s);var a,l,u=2147483647,h=/^xn--/,c=/
 [^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,g=String.fromCharCode;function y(t){throw RangeError(d[t])}function m(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function _(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+m((t=t.replace(p,".")).split("."),e).join(".")}function v(t){for(var e,r,i=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function x(t){return m(t,(function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=g(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function b(t,e,r){var i=0;for(t=r?f(t/700):t>>1,t+=f(t/e);t>455;i+=36)t=f(t/35);return f(i+36*t/(t+38))}function S(t){var e,r,i,n,o,s,a,l,h,c,
 p,d=[],g=t.length,m=0,_=128,v=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&y("not-basic"),d.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<g;){for(o=m,s=1,a=36;n>=g&&y("invalid-input"),((l=(p=t.charCodeAt(n++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||l>f((u-m)/s))&&y("overflow"),m+=l*s,!(l<(h=a<=v?1:a>=v+26?26:a-v));a+=36)s>f(u/(c=36-h))&&y("overflow"),s*=c;v=b(m-o,e=d.length+1,0==o),f(m/e)>u-_&&y("overflow"),_+=f(m/e),m%=e,d.splice(m++,0,_)}return x(d)}function T(t){var e,r,i,n,o,s,a,l,h,c,p,d,m,_,x,S=[];for(d=(t=v(t)).length,e=128,r=0,o=72,s=0;s<d;++s)(p=t[s])<128&&S.push(g(p));for(i=n=S.length,n&&S.push("-");i<d;){for(a=u,s=0;s<d;++s)(p=t[s])>=e&&p<a&&(a=p);for(a-e>f((u-r)/(m=i+1))&&y("overflow"),r+=(a-e)*m,e=a,s=0;s<d;++s)if((p=t[s])<e&&++r>u&&y("overflow"),p==e){for(l=r,h=36;!(l<(c=h<=o?1:h>=o+26?26:h-o));h+=36)x=l-c,_=36-c,S.push(g(w(c+x%_,0))),l=f(x/_);S.push(g(w(l,0))),o=b(r,m,i==n),r=0,++i}++r,++e}return S.join("")}if(a={version:"1.3.2",ucs2:{deco
 de:v,encode:x},decode:S,encode:T,toASCII:function(t){return _(t,(function(t){return c.test(t)?"xn--"+T(t):t}))},toUnicode:function(t){return _(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},i&&n)if(t.exports==i)n.exports=a;else for(l in a)a.hasOwnProperty(l)&&(i[l]=a[l]);else r.punycode=a}(o)})),l=function(t){return"string"==typeof t},u=function(t){return"object"==typeof t&&null!==t},h=function(t){return null===t},c=function(t){return null==t};function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d=function(t,e,r,i){e=e||"&",r=r||"=";var n={};if("string"!=typeof t||0===t.length)return n;var o=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var l=0;l<a;++l){var u,h,c,d,f=t[l].replace(o,"%20"),g=f.indexOf(r);g>=0?(u=f.substr(0,g),h=f.substr(g+1)):(u=f,h=""),c=decodeURIComponent(u),d=decodeURIComponent(h),p(n,c)?Array.isArray(n[c])?n[c].push(d):n[c]=[n[c],d]:n[c]=d}return n},f=function(t){sw
 itch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},g=function(t,e,r,i){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var n=encodeURIComponent(f(i))+r;return Array.isArray(t[i])?t[i].map((function(t){return n+encodeURIComponent(f(t))})).join(e):n+encodeURIComponent(f(t[i]))})).join(e):i?encodeURIComponent(f(i))+r+encodeURIComponent(f(t)):""},y=s((function(t,e){e.decode=e.parse=d,e.encode=e.stringify=g}));y.decode,y.parse,y.encode,y.stringify;function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var _=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,x=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),b=["'"].concat(w),S=["%","/","?",";","#"].concat(b),T=["/"
 ,"?","#"],C=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,R={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function O(t,e,r){if(t&&u(t)&&t instanceof m)return t;var i=new m;return i.parse(t,e,r),i}m.prototype.parse=function(t,e,r){if(!l(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=-1!==i&&i<t.indexOf("#")?"?":"#",o=t.split(n);o[0]=o[0].replace(/\\/g,"/");var s=t=o.join(n);if(s=s.trim(),!r&&1===t.split("#").length){var u=x.exec(s);if(u)return this.path=s,this.href=s,this.pathname=u[1],u[2]?(this.search=u[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=_.exec(s);if(h){var c=(h=h[0]).toLowerCase();this.protocol=c,s=s.substr(h.length)}if(r||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===s.substr(0,2);!p||h&&P[h]||(s=s.substr(2),this.s
 lashes=!0)}if(!P[h]&&(p||h&&!I[h])){for(var d,f,g=-1,m=0;m<T.length;m++){-1!==(v=s.indexOf(T[m]))&&(-1===g||v<g)&&(g=v)}-1!==(f=-1===g?s.lastIndexOf("@"):s.lastIndexOf("@",g))&&(d=s.slice(0,f),s=s.slice(f+1),this.auth=decodeURIComponent(d)),g=-1;for(m=0;m<S.length;m++){var v;-1!==(v=s.indexOf(S[m]))&&(-1===g||v<g)&&(g=v)}-1===g&&(g=s.length),this.host=s.slice(0,g),s=s.slice(g),this.parseHost(),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w)for(var O=this.hostname.split(/\./),L=(m=0,O.length);m<L;m++){var M=O[m];if(M&&!M.match(C)){for(var F="",A=0,k=M.length;A<k;A++)M.charCodeAt(A)>127?F+="x":F+=M[A];if(!F.match(C)){var N=O.slice(0,m),j=O.slice(m+1),D=M.match(E);D&&(N.push(D[1]),j.unshift(D[2])),j.length&&(s="/"+j.join(".")+s),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=a.toASCII(this.hostname));var G=this.port?":"+this.port:"",z
 =this.hostname||"";this.host=z+G,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!R[c])for(m=0,L=b.length;m<L;m++){var B=b[m];if(-1!==s.indexOf(B)){var U=encodeURIComponent(B);U===B&&(U=escape(B)),s=s.split(B).join(U)}}var Y=s.indexOf("#");-1!==Y&&(this.hash=s.substr(Y),s=s.slice(0,Y));var W=s.indexOf("?");if(-1!==W?(this.search=s.substr(W),this.query=s.substr(W+1),e&&(this.query=y.parse(this.query)),s=s.slice(0,W)):e&&(this.search="",this.query={}),s&&(this.pathname=s),I[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){G=this.pathname||"";var V=this.search||"";this.path=G+V}return this.href=this.format(),this},m.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=t+this.host:this.hostname&&(n=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.
 hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(o=y.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||I[e])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),e+n+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+i},m.prototype.resolve=function(t){return this.resolveObject(O(t,!1,!0)).format()},m.prototype.resolveObject=function(t){if(l(t)){var e=new m;e.parse(t,!1,!0),t=e}for(var r=new m,i=Object.keys(this),n=0;n<i.length;n++){var o=i[n];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),a=0;a<s.length;a++){var u=s[a];"protocol"!==u&&(r[u]=t[u])}return I[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){i
 f(!I[t.protocol]){for(var p=Object.keys(t),d=0;d<p.length;d++){var f=p[d];r[f]=t[f]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||P[t.protocol])r.pathname=t.pathname;else{for(var g=(t.pathname||"").split("/");g.length&&!(t.host=g.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),r.pathname=g.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",_=r.search||"";r.path=y+_}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=x||v||r.host&&t.pathname,b=w,S=r.pathname&&r.pathname.split("/")||[],T=(g=t.pathname&&t.pathname.split("/")||[],r.protocol&&!I[r.protocol]);if(T&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&("
 "===g[0]?g[0]=t.host:g.unshift(t.host)),t.host=null),w=w&&(""===g[0]||""===S[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,S=g;else if(g.length)S||(S=[]),S.pop(),S=S.concat(g),r.search=t.search,r.query=t.query;else if(!c(t.search)){if(T)r.hostname=r.host=S.shift(),(L=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=L.shift(),r.host=r.hostname=L.shift());return r.search=t.search,r.query=t.query,h(r.pathname)&&h(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var C=S.slice(-1)[0],E=(r.host||t.host||S.length>1)&&("."===C||".."===C)||""===C,R=0,O=S.length;O>=0;O--)"."===(C=S[O])?S.splice(O,1):".."===C?(S.splice(O,1),R++):R&&(S.splice(O,1),R--);if(!w&&!b)for(;R--;R)S.unshift("..");!w||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),E
 &&"/"!==S.join("/").substr(-1)&&S.push("");var L,M=""===S[0]||S[0]&&"/"===S[0].charAt(0);T&&(r.hostname=r.host=M?"":S.length?S.shift():"",(L=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=L.shift(),r.host=r.hostname=L.shift()));return(w=w||r.host&&S.length)&&!M&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),h(r.pathname)&&h(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},m.prototype.parseHost=function(){var t=this.host,e=v.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};function L(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var s in o)t[s]=o[s]}return t}var M=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=
 e,e}(Error),F=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,i=e;r<i.length;r+=1){var n=i[r],o=n[0],s=n[1];this.bindings[o]=s}};F.prototype.concat=function(t){return new F(this,t)},F.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},F.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var A={kind:"null"},k={kind:"number"},N={kind:"string"},j={kind:"boolean"},D={kind:"color"},G={kind:"object"},z={kind:"value"},B={kind:"collator"},U={kind:"formatted"},Y={kind:"resolvedImage"};function W(t,e){return{kind:"array",itemType:t,N:e}}function V(t){if("array"===t.kind){var e=V(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var X=[A,k,N,j,D,U,G,W(z),Y];function q(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&
 &"value"===e.itemType.kind||!q(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,i=X;r<i.length;r+=1){if(!q(i[r],e))return null}}return"Expected "+V(t)+" but found "+V(e)+" instead."}function Z(t,e){return e.some((function(e){return e.kind===t.kind}))}function K(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var H=s((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],corns
 ilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,10
 5,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,2
 1,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70
 ,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100*255):i(parseInt(t))}function s(t){return"%"===t[t.length-1]?n(parseFloat(t)/100):n(parseFloat(t))}function a(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in r)return r[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=n.indexOf("("),u=n.indexOf(")");if(
 -1!==l&&u+1===n.length){var h=n.substr(0,l),c=n.substr(l+1,u-(l+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=s(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),p];case"hsla":if(4!==c.length)return null;p=s(c.pop());case"hsl":if(3!==c.length)return null;var d=(parseFloat(c[0])%360+360)%360/360,f=s(c[1]),g=s(c[2]),y=g<=.5?g*(f+1):g+f-g*f,m=2*g-y;return[i(255*a(m,y,d+1/3)),i(255*a(m,y,d)),i(255*a(m,y,d-1/3)),p];default:return null}}return null}}catch(t){}})).parseCSSColor,J=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};J.parse=function(t){if(t){if(t instanceof J)return t;if("string"==typeof t){var e=H(t);if(e)return new J(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},J.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],i=t[2],n=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(i)+","+n+")"},J.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,i=this.a;return 0===i?[0,0,0,
 0]:[255*t/i,255*e/i,255*r/i,i]},J.black=new J(0,0,0,1),J.white=new J(1,1,1,1),J.transparent=new J(0,0,0,0),J.red=new J(1,0,0,1);var $=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};$.prototype.compare=function(t,e){return this.collator.compare(t,e)},$.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Q=function(t,e,r,i,n){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n},tt=function(t){this.sections=t};tt.fromString=function(t){return new tt([new Q(t,null,null,null,null)])},tt.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},tt.factory=function(t){return t instanceof tt?t:tt.fromString(t)},tt.prototype.toString=function(){return 0===this.sect
 ions.length?"":this.sections.map((function(t){return t.text})).join("")},tt.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];if(i.image)t.push(["image",i.image.name]);else{t.push(i.text);var n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),i.textColor&&(n["text-color"]=["rgba"].concat(i.textColor.toArray())),t.push(n)}}return t};var et=function(t){this.name=t.name,this.available=t.available};function rt(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function it(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof
  t)return!0;if(t instanceof J)return!0;if(t instanceof $)return!0;if(t instanceof tt)return!0;if(t instanceof et)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1){if(!it(r[e]))return!1}return!0}if("object"==typeof t){for(var i in t)if(!it(t[i]))return!1;return!0}return!1}function nt(t){if(null===t)return A;if("string"==typeof t)return N;if("boolean"==typeof t)return j;if("number"==typeof t)return k;if(t instanceof J)return D;if(t instanceof $)return B;if(t instanceof tt)return U;if(t instanceof et)return Y;if(Array.isArray(t)){for(var e,r=t.length,i=0,n=t;i<n.length;i+=1){var o=nt(n[i]);if(e){if(e===o)continue;e=z;break}e=o}return W(e||z,r)}return G}function ot(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof J||t instanceof tt||t instanceof et?t.toString():JSON.stringify(t)}et.prototype.toString=function(){return this.name},et.fromString=function(t){return t?new et({name:t,available:!1}):null},et.prototype.serialize=
 function(){return["image",this.name]};var st=function(t,e){this.type=t,this.value=e};st.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!it(t[1]))return e.error("invalid value");var r=t[1],i=nt(r),n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new st(i,r)},st.prototype.evaluate=function(){return this.value},st.prototype.eachChild=function(){},st.prototype.outputDefined=function(){return!0},st.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof J?["rgba"].concat(this.value.toArray()):this.value instanceof tt?this.value.serialize():this.value};var at=function(t){this.name="ExpressionEvaluationError",this.message=t};at.prototype.toJSON=function(){return this.message};var lt={string:N,number:k,boolean:j,object:G},ut=function(t,e){this.type=t,this.arg
 s=e};ut.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,i=1,n=t[0];if("array"===n){var o,s;if(t.length>2){var a=t[1];if("string"!=typeof a||!(a in lt)||"object"===a)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=lt[a],i++}else o=z;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);s=t[2],i++}r=W(o,s)}else r=lt[n];for(var l=[];i<t.length;i++){var u=e.parse(t[i],i,z);if(!u)return null;l.push(u)}return new ut(r,l)},ut.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!q(this.type,nt(r)))return r;if(e===this.args.length-1)throw new at("Expected value to be of type "+V(this.type)+", but found "+V(nt(r))+" instead.")}return null},ut.prototype.eachChild=function(t){this.args.forEach(t)},ut.prototype.outputDefined=function(){return
  this.args.every((function(t){return t.outputDefined()}))},ut.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var ht=function(t){this.type=U,this.sections=t};ht.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var i=[],n=!1,o=1;o<=t.length-1;++o){var s=t[o];if(n&&"object"==typeof s&&!Array.isArray(s)){n=!1;var a=null;if(s["font-scale"]&&!(a=e.parse(s["font-scale"],1,k)))return null;var l=null;if(s["text-font"]&&!(l=e.parse(s["text-font"],1,W(N))))return null;var u=null;if(s["text-color"]&&!(u=e.parse(s["text-color"],1,D)))return null;var h=i[i.length-1];h.scale=a,h.font=l,h.te
 xtColor=u}else{var c=e.parse(t[o],1,z);if(!c)return null;var p=c.type.kind;if("string"!==p&&"value"!==p&&"null"!==p&&"resolvedImage"!==p)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:c,scale:null,font:null,textColor:null})}}return new ht(i)},ht.prototype.evaluate=function(t){return new tt(this.sections.map((function(e){var r=e.content.evaluate(t);return nt(r)===Y?new Q("",r,null,null,null):new Q(ot(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},ht.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor)}},ht.prototype.outputDefined=function(){return!1},ht.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.content.serialize());var n={};i.scale&&(n["font-scale"]=i.scale.serialize()
 ),i.font&&(n["text-font"]=i.font.serialize()),i.textColor&&(n["text-color"]=i.textColor.serialize()),t.push(n)}return t};var ct=function(t){this.type=Y,this.input=t};ct.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,N);return r?new ct(r):e.error("No image name provided.")},ct.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=et.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},ct.prototype.eachChild=function(t){t(this.input)},ct.prototype.outputDefined=function(){return!1},ct.prototype.serialize=function(){return["image",this.input.serialize()]};var pt={"to-boolean":j,"to-color":D,"to-number":k,"to-string":N},dt=function(t,e){this.type=t,this.args=e};dt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var i=pt[r],n=[],o=1;o<t.length;o++)
 {var s=e.parse(t[o],o,z);if(!s)return null;n.push(s)}return new dt(i,n)},dt.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,i=0,n=this.args;i<n.length;i+=1){if(r=null,(e=n[i].evaluate(t))instanceof J)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":rt(e[0],e[1],e[2],e[3])))return new J(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new at(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var s=null,a=0,l=this.args;a<l.length;a+=1){if(null===(s=l[a].evaluate(t)))return 0;var u=Number(s);if(!isNaN(u))return u}throw new at("Could not convert "+JSON.stringify(s)+" to number.")}return"formatted"===this.type.kind?tt.fromString(ot(this.args[0].evalu
 ate(t))):"resolvedImage"===this.type.kind?et.fromString(ot(this.args[0].evaluate(t))):ot(this.args[0].evaluate(t))},dt.prototype.eachChild=function(t){this.args.forEach(t)},dt.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},dt.prototype.serialize=function(){if("formatted"===this.type.kind)return new ht([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ct(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var ft=["Unknown","Point","LineString","Polygon"],gt=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};gt.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},gt.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.
 type?ft[this.feature.type]:this.feature.type:null},gt.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},gt.prototype.canonicalID=function(){return this.canonical},gt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},gt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=J.parse(t)),e};var yt=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};yt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},yt.prototype.eachChild=function(t){this.args.forEach(t)},yt.prototype.outputDefined=function(){return!1},yt.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},yt.parse=function(t,e){var r,i=t[0],n=yt.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,s=Ar
 ray.isArray(n)?[[n[1],n[2]]]:n.overloads,a=s.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),l=null,u=0,h=a;u<h.length;u+=1){var c=h[u],p=c[0],d=c[1];l=new Dt(e.registry,e.path,null,e.scope);for(var f=[],g=!1,y=1;y<t.length;y++){var m=t[y],_=Array.isArray(p)?p[y-1]:p.type,v=l.parse(m,1+f.length,_);if(!v){g=!0;break}f.push(v)}if(!g)if(Array.isArray(p)&&p.length!==f.length)l.error("Expected "+p.length+" arguments, but found "+f.length+" instead.");else{for(var x=0;x<f.length;x++){var w=Array.isArray(p)?p[x]:p.type,b=f[x];l.concat(x+1).checkSubtype(w,b.type)}if(0===l.errors.length)return new yt(i,o,d,f)}}if(1===a.length)(r=e.errors).push.apply(r,l.errors);else{for(var S=(a.length?a:s).map((function(t){var e,r=t[0];return e=r,Array.isArray(e)?"("+e.map(V).join(", ")+")":"("+V(e.type)+"...)"})).join(" | "),T=[],C=1;C<t.length;C++){var E=e.parse(t[C],1+T.length);if(!E)return null;T.push(V(E.type))}e.error("Expected arguments of type "+S+", but found ("+T.j
 oin(", ")+") instead.")}return null},yt.register=function(t,e){for(var r in yt.definitions=e,e)t[r]=yt};var mt=function(t,e,r){this.type=B,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};mt.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,j);if(!i)return null;var n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,j);if(!n)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,N))?null:new mt(i,n,o)},mt.prototype.evaluate=function(t){return new $(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},mt.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},mt.prototype.outputDefined=function(){return!1},mt.prototype.serialize=fu
 nction(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};function _t(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function vt(t,e){return!(t[0]<=e[0])&&(!(t[2]>=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function xt(t,e){var r,i=(180+t[0])/360,n=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),o=Math.pow(2,e.z);return[Math.round(i*o*8192),Math.round(n*o*8192)]}function wt(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function bt(t,e){for(var r,i,n,o,s,a,l,u=!1,h=0,c=e.length;h<c;h++)for(var p=e[h],d=0,f=p.length;d<f-1;d++){if(r=t,i=p[d],n=p[d+1],o=void 0,s=void 0,a=void 0,l=void 0,o=r[0]-i[0],s=r[1]-i[1],a=r[0]-n[0],l=r[1]-n[1],o*l-a*s==0&&o*a<=0&&s*l<=0)return!1;wt(t,p[d],p[d+1])&&(u=!u)}return u}function St(t,e){for(var r=0
 ;r<e.length;r++)if(bt(t,e[r]))return!0;return!1}function Tt(t,e,r,i){var n=t[0]-r[0],o=t[1]-r[1],s=e[0]-r[0],a=e[1]-r[1],l=i[0]-r[0],u=i[1]-r[1],h=n*u-l*o,c=s*u-l*a;return h>0&&c<0||h<0&&c>0}function Ct(t,e,r){for(var i=0,n=r;i<n.length;i+=1)for(var o=n[i],s=0;s<o.length-1;++s)if(a=t,l=e,u=o[s],h=o[s+1],c=void 0,p=void 0,d=void 0,f=void 0,d=[l[0]-a[0],l[1]-a[1]],f=[h[0]-u[0],h[1]-u[1]],0!=(c=f)[0]*(p=d)[1]-c[1]*p[0]&&Tt(a,l,u,h)&&Tt(u,h,a,l))return!0;var a,l,u,h,c,p,d,f;return!1}function Et(t,e){for(var r=0;r<t.length;++r)if(!bt(t[r],e))return!1;for(var i=0;i<t.length-1;++i)if(Ct(t[i],t[i+1],e))return!1;return!0}function Rt(t,e){for(var r=0;r<e.length;r++)if(Et(t,e[r]))return!0;return!1}function Pt(t,e,r){for(var i=[],n=0;n<t.length;n++){for(var o=[],s=0;s<t[n].length;s++){var a=xt(t[n][s],r);_t(e,a),o.push(a)}i.push(o)}return i}function It(t,e,r){for(var i=[],n=0;n<t.length;n++){var o=Pt(t[n],e,r);i.push(o)}return i}function Ot(t,e,r,i){if(t[0]<r[0]||t[0]>r[2]){var n=.5*i,o=t[0]-r[
 0]>n?-i:r[0]-t[0]>n?i:0;0===o&&(o=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=o}_t(e,t)}function Lt(t,e,r,i){for(var n=8192*Math.pow(2,i.z),o=[8192*i.x,8192*i.y],s=[],a=0,l=t;a<l.length;a+=1)for(var u=0,h=l[a];u<h.length;u+=1){var c=h[u],p=[c.x+o[0],c.y+o[1]];Ot(p,e,r,n),s.push(p)}return s}function Mt(t,e,r,i){for(var n,o=8192*Math.pow(2,i.z),s=[8192*i.x,8192*i.y],a=[],l=0,u=t;l<u.length;l+=1){for(var h=[],c=0,p=u[l];c<p.length;c+=1){var d=p[c],f=[d.x+s[0],d.y+s[1]];_t(e,f),h.push(f)}a.push(h)}if(e[2]-e[0]<=o/2){(n=e)[0]=n[1]=1/0,n[2]=n[3]=-1/0;for(var g=0,y=a;g<y.length;g+=1)for(var m=0,_=y[g];m<_.length;m+=1){Ot(_[m],e,r,o)}}return a}var Ft=function(t,e){this.type=j,this.geojson=t,this.geometries=e};function At(t){if(t instanceof yt){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof F
 t)return!1;var e=!0;return t.eachChild((function(t){e&&!At(t)&&(e=!1)})),e}function kt(t){if(t instanceof yt&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!kt(t)&&(e=!1)})),e}function Nt(t,e){if(t instanceof yt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Nt(t,e)&&(r=!1)})),r}Ft.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(it(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var i=0;i<r.features.length;++i){var n=r.features[i].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new Ft(r,r.features[i].geometry)}else if("Feature"===r.type){var o=r.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new Ft(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new Ft(r,r)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Ft.prototype.eva
 luate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=Pt(e.coordinates,i,n),s=Lt(t.geometry(),r,i,n);if(!vt(r,i))return!1;for(var a=0,l=s;a<l.length;a+=1){if(!bt(l[a],o))return!1}}if("MultiPolygon"===e.type){var u=It(e.coordinates,i,n),h=Lt(t.geometry(),r,i,n);if(!vt(r,i))return!1;for(var c=0,p=h;c<p.length;c+=1){if(!St(p[c],u))return!1}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=Pt(e.coordinates,i,n),s=Mt(t.geometry(),r,i,n);if(!vt(r,i))return!1;for(var a=0,l=s;a<l.length;a+=1){if(!Et(l[a],o))return!1}}if("MultiPolygon"===e.type){var u=It(e.coordinates,i,n),h=Mt(t.geometry(),r,i,n);if(!vt(r,i))return!1;for(var c=0,p=h;c<p.length;c+=1){if(!Rt(p[c],u))return!1}}return!0}(t,this.geometries)}return
 !1},Ft.prototype.eachChild=function(){},Ft.prototype.outputDefined=function(){return!0},Ft.prototype.serialize=function(){return["within",this.geojson]};var jt=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};jt.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new jt(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},jt.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},jt.prototype.eachChild=function(){},jt.prototype.outputDefined=function(){return!1},jt.prototype.serialize=function(){return["var",this.name]};var Dt=function(t,e,r,i,n){void 0===e&&(e=[]),void 0===i&&(i=new F),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=i,this.errors=n,this.expectedType=r};function 
 Gt(t,e){for(var r,i,n=t.length-1,o=0,s=n,a=0;o<=s;)if(r=t[a=Math.floor((o+s)/2)],i=t[a+1],r<=e){if(a===n||e<i)return a;o=a+1}else{if(!(r>e))throw new at("Input is not a number.");s=a-1}return 0}Dt.prototype.parse=function(t,e,r,i,n){return void 0===n&&(n={}),e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)},Dt.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ut(e,[t]):"coerce"===r?new dt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[i];if(n){var o=n.parse(t,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,a=o.type;if("string"!==s.kind&&"
 number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==a.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(s,a))return null}else o=r(o,s,e.typeAnnotation||"coerce");else o=r(o,s,e.typeAnnotation||"assert")}if(!(o instanceof st)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof jt)return t(e.boundExpression);if(e instanceof yt&&"error"===e.name)return!1;if(e instanceof mt)return!1;if(e instanceof Ft)return!1;var r=e instanceof dt||e instanceof ut,i=!0;if(e.eachChild((function(e){i=r?i&&t(e):i&&e instanceof st})),!i)return!1;return At(e)&&Nt(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new gt;try{o=new st(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'un
 defined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Dt.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new Dt(this.registry,i,e||null,n,this.errors)},Dt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new M(i,t))},Dt.prototype.checkSubtype=function(t,e){var r=q(t,e);return r&&this.error(r),r};var zt=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,n=r;i<n.length;i+=1){var o=n[i],s=o[0],a=o[1];this.labels.push(s),this.outputs.push(a)}};zt.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an e
 ven number of arguments.");var r=e.parse(t[1],1,k);if(!r)return null;var i=[],n=null;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var o=1;o<t.length;o+=2){var s=1===o?-1/0:t[o],a=t[o+1],l=o,u=o+1;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(i.length&&i[i.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var h=e.parse(a,u,n);if(!h)return null;n=n||h.type,i.push([s,h])}return new zt(n,r,i)},zt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[Gt(e,i)].evaluate(t)},zt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},zt.
 prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},zt.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Bt=Ut;function Ut(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}function Yt(t,e,r){return t*(1-r)+e*r}Ut.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Ut.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Ut.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Ut.prototype.solveCurveX=function(t,e){var r,i,n,o,s;for(void 0===e&&(e=1e-6),n=t,s=0;s<8;s++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var a=this.sampleCurveDerivativeX(n);if(Math.abs(a)<1e-6)break;n-=o/a}if((n=t)<(r=0))
 return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},Ut.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Wt=Object.freeze({__proto__:null,number:Yt,color:function(t,e,r){return new J(Yt(t.r,e.r,r),Yt(t.g,e.g,r),Yt(t.b,e.b,r),Yt(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,i){return Yt(t,e[i],r)}))}}),Vt=6/29,Xt=3*Vt*Vt,qt=Math.PI/180,Zt=180/Math.PI;function Kt(t){return t>.008856451679035631?Math.pow(t,1/3):t/Xt+4/29}function Ht(t){return t>Vt?t*t*t:Xt*(t-4/29)}function Jt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $t(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Qt(t){var e=$t(t.r),r=$t(t.g),i=$t(t.b),n=Kt((.4124564*e+.3575761*r+.1804375*i)/.95047),o=Kt((.2126729*e+.7151522*r+.072175*i)/1);return{l:116*o-16,a:500*(n-o),b:200*(o-Kt((.0193339*e+.119192*r+.9503041*i)/1.08883)),alpha:t.a}}function te(t){var e=
 (t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=1*Ht(e),r=.95047*Ht(r),i=1.08883*Ht(i),new J(Jt(3.2404542*r-1.5371385*e-.4985314*i),Jt(-.969266*r+1.8760108*e+.041556*i),Jt(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}function ee(t,e,r){var i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}var re={forward:Qt,reverse:te,interpolate:function(t,e,r){return{l:Yt(t.l,e.l,r),a:Yt(t.a,e.a,r),b:Yt(t.b,e.b,r),alpha:Yt(t.alpha,e.alpha,r)}}},ie={forward:function(t){var e=Qt(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*Zt;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*qt,r=t.c;return te({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:ee(t.h,e.h,r),c:Yt(t.c,e.c,r),l:Yt(t.l,e.l,r),alpha:Yt(t.alpha,e.alpha,r)}}},ne=Object.freeze({__proto__:null,lab:re,hcl:ie}),oe=function(t,e,r,i,n){this.type=t,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(var o=0,s=
 n;o<s.length;o+=1){var a=s[o],l=a[0],u=a[1];this.labels.push(l),this.outputs.push(u)}};function se(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}oe.interpolationFactor=function(t,e,r,i){var n=0;if("exponential"===t.name)n=se(e,t.base,r,i);else if("linear"===t.name)n=se(e,1,r,i);else if("cubic-bezier"===t.name){var o=t.controlPoints;n=new Bt(o[0],o[1],o[2],o[3]).solve(se(e,1,r,i))}return n},oe.parse=function(t,e){var r=t[0],i=t[1],n=t[2],o=t.slice(3);if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){var s=i[1];if("number"!=typeof s)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:s}}else{if("cubic-bezier"!==i[0])return e.error("Unknown interpolation type "+String(i[0]),1,0);var a=i.slice(1);if(4!==a.length||a.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("C
 ubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,k)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=D:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var h=0;h<o.length;h+=2){var c=o[h],p=o[h+1],d=h+3,f=h+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',d);if(l.length&&l[l.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var g=e.parse(p,f,u);if(!g)return null;u=u||g.type,l.push([c,g])}return"number"===u.kind||"color"===u.kind||"arra
 y"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new oe(u,r,i,n,l):e.error("Type "+V(u)+" is not interpolatable.")},oe.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var o=Gt(e,i),s=e[o],a=e[o+1],l=oe.interpolationFactor(this.interpolation,i,s,a),u=r[o].evaluate(t),h=r[o+1].evaluate(t);return"interpolate"===this.operator?Wt[this.type.kind.toLowerCase()](u,h,l):"interpolate-hcl"===this.operator?ie.reverse(ie.interpolate(ie.forward(u),ie.forward(h),l)):re.reverse(re.interpolate(re.forward(u),re.forward(h),l))},oe.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},oe.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},oe.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"
 ]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var ae=function(t,e){this.type=t,this.args=e};ae.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);for(var n=[],o=0,s=t.slice(1);o<s.length;o+=1){var a=s[o],l=e.parse(a,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,n.push(l)}var u=i&&n.some((function(t){return q(i,t.type)}));return new ae(u?z:r,n)},ae.prototype.evaluate=function(t){for(var e,r=null,i=0,n=0,o=this.args;n<o.length;n+=1){if(i++,(r=o[n].evaluate(t))&&r instanceof et&&!r.available&&(e||(e=r.name),r=null,i===this.args.length&&(r=e)),null!==r)break}return r},ae.prototype.eachChild=function(
 t){this.args.forEach(t)},ae.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ae.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var le=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};le.prototype.evaluate=function(t){return this.result.evaluate(t)},le.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1){t(r[e][1])}t(this.result)},le.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],i=1;i<t.length-1;i+=2){var n=t[i];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}var s=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return s?new 
 le(r,s):null},le.prototype.outputDefined=function(){return this.result.outputDefined()},le.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t.push(n,o.serialize())}return t.push(this.result.serialize()),t};var ue=function(t,e,r){this.type=t,this.index=e,this.input=r};ue.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,k),i=e.parse(t[2],2,W(e.expectedType||z));if(!r||!i)return null;var n=i.type;return new ue(n.itemType,r,i)},ue.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new at("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new at("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new at("Array index must be an integer, but found "+e+" instead.");return r[e]},ue.prototype.eachChild=function(t){t(this.index),t(this.input)},ue.prototype.output
 Defined=function(){return!1},ue.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var he=function(t,e){this.type=j,this.needle=t,this.haystack=e};he.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,z),i=e.parse(t[2],2,z);return r&&i?Z(r.type,[j,N,k,A,z])?new he(r,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+V(r.type)+" instead"):null},he.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!K(e,["boolean","string","number","null"]))throw new at("Expected first argument to be of type boolean, string, number or null, but found "+V(nt(e))+" instead.");if(!K(r,["string","array"]))throw new at("Expected second argument to be of type array or string, but found "+V(nt(r))+" instead.");return r.indexOf(e)>=0},he.prototype.eachChild=function(t){t(this.needle),t(this.
 haystack)},he.prototype.outputDefined=function(){return!0},he.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ce=function(t,e,r){this.type=k,this.needle=t,this.haystack=e,this.fromIndex=r};ce.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,z),i=e.parse(t[2],2,z);if(!r||!i)return null;if(!Z(r.type,[j,N,k,A,z]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+V(r.type)+" instead");if(4===t.length){var n=e.parse(t[3],3,k);return n?new ce(r,i,n):null}return new ce(r,i)},ce.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!K(e,["boolean","string","number","null"]))throw new at("Expected first argument to be of type boolean, string, number or null, but found "+V(nt(e))+" instead.");if(!K(r,["string","array"]))throw new at("Expected second argument
  to be of type array or string, but found "+V(nt(r))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(t);return r.indexOf(e,i)}return r.indexOf(e)},ce.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},ce.prototype.outputDefined=function(){return!1},ce.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var pe=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};pe.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n={},o=[],s=2;s<t.length-1;s+=2){var 
 a=t[s],l=t[s+1];Array.isArray(a)||(a=[a]);var u=e.concat(s);if(0===a.length)return u.error("Expected at least one branch label.");for(var h=0,c=a;h<c.length;h+=1){var p=c[h];if("number"!=typeof p&&"string"!=typeof p)return u.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,nt(p)))return null}else r=nt(p);if(void 0!==n[String(p)])return u.error("Branch labels must be unique.");n[String(p)]=o.length}var d=e.parse(l,s,i);if(!d)return null;i=i||d.type,o.push(d)}var f=e.parse(t[1],1,z);if(!f)return null;var g=e.parse(t[t.length-1],t.length-1,i);return g?"value"!==f.type.kind&&e.concat(1).checkSubtype(r,f.type)?null:new pe(r,i,f,n,o,g):null},pe.prototype.evaluate=function(t){var e=this.input.evaluate(t);retur
 n(nt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pe.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pe.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pe.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],i={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var s=o[n];void 0===(c=i[this.cases[s]])?(i[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[c][1].push(s)}for(var a=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=r;l<u.length;l+=1){var h=u[l],c=h[0],p=h[1];1===p.length?e.push(a(p[0])):e.push(p.map(a)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var de=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};de.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found o
 nly "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,j);if(!o)return null;var s=e.parse(t[n+1],n+1,r);if(!s)return null;i.push([o,s]),r=r||s.type}var a=e.parse(t[t.length-1],t.length-1,r);return a?new de(r,i,a):null},de.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];if(n.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},de.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t(n),t(o)}t(this.otherwise)},de.prototype.outputDefined=function(){return this.branches.every((function(t){t[0];return t[1].outputDefined()}))&&this.otherwise.outputDefined()},de.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var fe=function(t,e,r,i){this.type=t,t
 his.input=e,this.beginIndex=r,this.endIndex=i};function ge(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function ye(t,e,r,i){return 0===i.compare(e,r)}function me(t,e,r){var i="=="!==t&&"!="!==t;return function(){function n(t,e,r){this.type=j,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,z);if(!o)return null;if(!ge(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+V(o.type)+"'.");var s=e.parse(t[2],2,z);if(!s)return null;if(!ge(r,s.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+V(s.type)+"'.");if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error("Can
 not compare types '"+V(o.type)+"' and '"+V(s.type)+"'.");i&&("value"===o.type.kind&&"value"!==s.type.kind?o=new ut(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new ut(o.type,[s])));var a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(a=e.parse(t[3],3,B)))return null}return new n(o,s,a)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),s=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){var a=nt(o),l=nt(s);if(a.kind!==l.kind||"string"!==a.kind&&"number"!==a.kind)throw new at('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+a.kind+", "+l.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var u=nt(o),h=nt(s);if("string"!==u.kind||"string"!==h.kind)return e(n,o,s)}return this.collator?r(n,o,s,this.collator.evaluate(n)):e(n,o,s)},n.prototype.eachChild=function(t){t
 (this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.outputDefined=function(){return!0},n.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},n}()}fe.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,z),i=e.parse(t[2],2,k);if(!r||!i)return null;if(!Z(r.type,[W(z),N,z]))return e.error("Expected first argument to be of type array or string, but found "+V(r.type)+" instead");if(4===t.length){var n=e.parse(t[3],3,k);return n?new fe(r.type,r,i,n):null}return new fe(r.type,r,i)},fe.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!K(e,["string","array"]))throw new at("Expected first argument to be of type array or string, but found "+V(nt(e))+" instead.");if(this.endIndex){var i=this.endIndex.evaluate(t);return e.slice(r,i)}return e.slice(r)},fe.prototype.eachChild=function(t){t(th
 is.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},fe.prototype.outputDefined=function(){return!1},fe.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var _e=me("==",(function(t,e,r){return e===r}),ye),ve=me("!=",(function(t,e,r){return e!==r}),(function(t,e,r,i){return!ye(0,e,r,i)})),xe=me("<",(function(t,e,r){return e<r}),(function(t,e,r,i){return i.compare(e,r)<0})),we=me(">",(function(t,e,r){return e>r}),(function(t,e,r,i){return i.compare(e,r)>0})),be=me("<=",(function(t,e,r){return e<=r}),(function(t,e,r,i){return i.compare(e,r)<=0})),Se=me(">=",(function(t,e,r){return e>=r}),(function(t,e,r,i){return i.compare(e,r)>=0})),Te=function(t,e,r,i,n){this.type=N,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=n};Te.parse=function(t,e
 ){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,k);if(!r)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var n=null;if(i.locale&&!(n=e.parse(i.locale,1,N)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,N)))return null;var s=null;if(i["min-fraction-digits"]&&!(s=e.parse(i["min-fraction-digits"],1,k)))return null;var a=null;return i["max-fraction-digits"]&&!(a=e.parse(i["max-fraction-digits"],1,k))?null:new Te(r,n,o,s,a)},Te.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Te.prototype.eachChild=function(
 t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Te.prototype.outputDefined=function(){return!1},Te.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Ce=function(t){this.type=k,this.input=t};Ce.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+V(r.type)+" instead."):new Ce(r):null},Ce.prototype.evaluate=function(t){var e
 =this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new at("Expected value to be of type string or array, but found "+V(nt(e))+" instead.")},Ce.prototype.eachChild=function(t){t(this.input)},Ce.prototype.outputDefined=function(){return!1},Ce.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ee={"==":_e,"!=":ve,">":we,"<":xe,">=":Se,"<=":be,array:ut,at:ue,boolean:ut,case:de,coalesce:ae,collator:mt,format:ht,image:ct,in:he,"index-of":ce,interpolate:oe,"interpolate-hcl":oe,"interpolate-lab":oe,length:Ce,let:le,literal:st,match:pe,number:ut,"number-format":Te,object:ut,slice:fe,step:zt,string:ut,"to-boolean":dt,"to-color":dt,"to-number":dt,"to-string":dt,var:jt,within:Ft};function Re(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);var s=o?o.evaluate(t):1,a=rt(r,i,n,s);if(a)throw new at(a);return new J(r/255*s,i/255*s,n/255*s,s)}functio
 n Pe(t,e){return t in e}function Ie(t,e){var r=e[t];return void 0===r?null:r}function Oe(t){return{type:t}}function Le(t){return{result:"success",value:t}}function Me(t){return{result:"error",value:t}}function Fe(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ae(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function ke(t){return!!t.expression&&t.expression.interpolated}function Ne(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function je(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function De(t){return t}function Ge(t,e){var r,i,n,o="color"===e.type,s=t.stops&&"object"==typeof t.stops[0][0],a=s||void 0!==t.property,l=s||!a,u=t.type||(ke(e)?"exponential":"interval");if(o&&((t=L({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],J.parse(t[1])]}))),t.default?t.default=J.parse(t.default):t
 .default=J.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!ne[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===u)r=Ye;else if("interval"===u)r=Ue;else if("categorical"===u){r=Be,i=Object.create(null);for(var h=0,c=t.stops;h<c.length;h+=1){var p=c[h];i[p[0]]=p[1]}n=typeof t.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');r=We}if(s){for(var d={},f=[],g=0;g<t.stops.length;g++){var y=t.stops[g],m=y[0].zoom;void 0===d[m]&&(d[m]={zoom:m,type:t.type,property:t.property,default:t.default,stops:[]},f.push(m)),d[m].stops.push([y[0].value,y[1]])}for(var _=[],v=0,x=f;v<x.length;v+=1){var w=x[v];_.push([d[w].zoom,Ge(d[w],e)])}var b={name:"linear"};return{kind:"composite",interpolationType:b,interpolationFactor:oe.interpolationFactor.bind(void 0,b),zoomStops:_.map((function(t){return t[0]})),evaluate:function(r,i){var n=r.zoom;return Ye({stops:_,base:t.base},e,n).evaluate(n,i)}}}if(l){var S="exponential"===u?{name:"e
 xponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:oe.interpolationFactor.bind(void 0,S),zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(o){var s=o.zoom;return r(t,e,s,i,n)}}}return{kind:"source",evaluate:function(o,s){var a=s&&s.properties?s.properties[t.property]:void 0;return void 0===a?ze(t.default,e.default):r(t,e,a,i,n)}}}function ze(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Be(t,e,r,i,n){return ze(typeof r===n?i[r]:void 0,t.default,e.default)}function Ue(t,e,r){if("number"!==Ne(r))return ze(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=Gt(t.stops.map((function(t){return t[0]})),r);return t.stops[n][1]}function Ye(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==Ne(r))return ze(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=
 t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var o=Gt(t.stops.map((function(t){return t[0]})),r),s=function(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}(r,i,t.stops[o][0],t.stops[o+1][0]),a=t.stops[o][1],l=t.stops[o+1][1],u=Wt[e.type]||De;if(t.colorSpace&&"rgb"!==t.colorSpace){var h=ne[t.colorSpace];u=function(t,e){return h.reverse(h.interpolate(h.forward(t),h.forward(e),s))}}return"function"==typeof a.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=a.evaluate.apply(void 0,t),i=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return u(r,i,s)}}:u(a,l,s)}function We(t,e,r){return"color"===e.type?r=J.parse(r):"formatted"===e.type?r=tt.fromString(r.toString()):"resolvedImage"===e.type?r=et.fromString(r.toString()):Ne(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),ze(r,t.default,e.default)}yt.register(Ee,{error:[{kind:"error"},[N],function(t,e){var r=e[0];thr
 ow new at(r.evaluate(t))}],typeof:[N,[z],function(t,e){return V(nt(e[0].evaluate(t)))}],"to-rgba":[W(k,4),[D],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[D,[k,k,k],Re],rgba:[D,[k,k,k,k],Re],has:{type:j,overloads:[[[N],function(t,e){return Pe(e[0].evaluate(t),t.properties())}],[[N,G],function(t,e){var r=e[0],i=e[1];return Pe(r.evaluate(t),i.evaluate(t))}]]},get:{type:z,overloads:[[[N],function(t,e){return Ie(e[0].evaluate(t),t.properties())}],[[N,G],function(t,e){var r=e[0],i=e[1];return Ie(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[z,[N],function(t,e){return Ie(e[0].evaluate(t),t.featureState||{})}],properties:[G,[],function(t){return t.properties()}],"geometry-type":[N,[],function(t){return t.geometryType()}],id:[z,[],function(t){return t.id()}],zoom:[k,[],function(t){return t.globals.zoom}],"heatmap-density":[k,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[k,[],function(t){return t.globals.lineProgress||0}],accumulated:[z,[],function(t){ret
 urn void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[k,Oe(k),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1){r+=n[i].evaluate(t)}return r}],"*":[k,Oe(k),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1){r*=n[i].evaluate(t)}return r}],"-":{type:k,overloads:[[[k,k],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[k],function(t,e){return-e[0].evaluate(t)}]]},"/":[k,[k,k],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[k,[k,k],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[k,[],function(){return Math.LN2}],pi:[k,[],function(){return Math.PI}],e:[k,[],function(){return Math.E}],"^":[k,[k,k],function(t,e){var r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[k,[k],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[k,[k],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[k,[k],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[k,[k
 ],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[k,[k],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[k,[k],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[k,[k],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[k,[k],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[k,[k],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[k,[k],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[k,Oe(k),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[k,Oe(k),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[k,[k],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[k,[k],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[k,[k],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[k,[k],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"f
 ilter-==":[j,[N,z],function(t,e){var r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[j,[z],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[j,[N],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[j,[N,z],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[j,[z],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<n}],"filter->":[j,[N,z],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[j,[z],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>n}],"filter-<=":[j,[N,z],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[j,[z],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<=n}],"filter->=":[j,[N,z],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.v
 alue;return typeof n==typeof o&&n>=o}],"filter-id->=":[j,[z],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>=n}],"filter-has":[j,[z],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[j,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[j,[W(N)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[j,[W(z)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[j,[N,W(z)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[j,[N,W(z)],function(t,e){var r=e[0],i=e[1];return function(t,e,r,i){for(;r<=i;){var n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:j,overloads:[[[j,j],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[Oe(j),function(t,e){for(var r=0,i=e;r<i.length;r+=1){if(!i[r].evaluate(t))return!1}return!0}]]},any:{type:j,overload
 s:[[[j,j],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[Oe(j),function(t,e){for(var r=0,i=e;r<i.length;r+=1){if(i[r].evaluate(t))return!0}return!1}]]},"!":[j,[j],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[j,[N],function(t,e){var r=e[0],i=t.globals&&t.globals.isSupportedScript;return!i||i(r.evaluate(t))}],upcase:[N,[N],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[N,[N],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[N,Oe(z),function(t,e){return e.map((function(e){return ot(e.evaluate(t))})).join("")}],"resolved-locale":[N,[B],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Ve=function(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new gt,this._defaultValue=e?"color"===(r=e).type&&je(r.default)?new J(0,0,0,0):"color"===r.type?J.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function Xe(t){return Array.isArr
 ay(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Ee}function qe(t,e){var r=new Dt(Ee,[],e?function(t){var e={color:D,string:N,number:k,enum:N,boolean:j,formatted:U,resolvedImage:Y};if("array"===t.type)return W(e[t.value]||z,t.length);return e[t.type]}(e):void 0),i=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?Le(new Ve(i,e)):Me(r.errors)}Ve.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Ve.prototype.evaluate=function(t,e,r,i,n,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||null;try{var s=this.expression.evaluate(this._evaluator);if(null=
 =s||"number"==typeof s&&s!=s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new at("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(s)+" instead.");return s}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Ze=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!kt(e.expression)};Ze.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)},Ze.prototype.evaluate=function(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)};var Ke=function(t,e,r,i){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!kt(e.expression),this.interpolationType=i};function He(t,e){if("error"===(t=qe(t,e)).resul
 t)return t;var r=t.value.expression,i=At(r);if(!i&&!Fe(e))return Me([new M("","data expressions not supported")]);var n=Nt(r,["zoom"]);if(!n&&!Ae(e))return Me([new M("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof le)r=t(e.result);else if(e instanceof ae)for(var i=0,n=e.args;i<n.length;i+=1){var o=n[i];if(r=t(o))break}else(e instanceof zt||e instanceof oe)&&e.input instanceof yt&&"zoom"===e.input.name&&(r=e);if(r instanceof M)return r;return e.eachChild((function(e){var i=t(e);i instanceof M?r=i:!r&&i?r=new M("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new M("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),r}(r);if(!o&&!n)return Me([new M("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof M)return Me([o]);if(o instanceof oe&&!ke(e))return Me([new M("",'"inter
 polate" expressions cannot be used with this property')]);if(!o)return Le(new Ze(i?"constant":"source",t.value));var s=o instanceof oe?o.interpolation:void 0;return Le(new Ke(i?"camera":"composite",t.value,o.labels,s))}Ke.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)},Ke.prototype.evaluate=function(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)},Ke.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?oe.interpolationFactor(this.interpolationType,t,e,r):0};var Je=function(t,e){this._parameters=t,this._specification=e,L(this,Ge(this._parameters,this._specification))};function $e(t){return"object"==typeof t?["literal",t]:t}function Qe(t,e){var r=t.stops;if(!r)return function(t,e){var r=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",r]:r;if("enum"===e.type)return["match",r,Object.keys(e.values),r,t.default];var i=["color"===e.type?"to-
 color":e.type,r,$e(t.default)];return"array"===e.type&&i.splice(1,0,e.value,e.length||null),i}(t,e);var i=r&&"object"==typeof r[0][0],n=i||void 0!==t.property,o=i||!n;return r=r.map((function(t){return!n&&e.tokens&&"string"==typeof t[1]?[t[0],sr(t[1])]:[t[0],$e(t[1])]})),i?function(t,e,r){for(var i={},n={},o=[],s=0;s<r.length;s++){var a=r[s],l=a[0].zoom;void 0===i[l]&&(i[l]={zoom:l,type:t.type,property:t.property,default:t.default},n[l]=[],o.push(l)),n[l].push([a[0].value,a[1]])}if("exponential"===or({},e)){for(var u=[tr(t),["linear"],["zoom"]],h=0,c=o;h<c.length;h+=1){var p=c[h],d=rr(i[p],e,n[p]);nr(u,p,d,!1)}return u}for(var f=["step",["zoom"]],g=0,y=o;g<y.length;g+=1){var m=y[g],_=rr(i[m],e,n[m]);nr(f,m,_,!0)}return ir(f),f}(t,e,r):o?function(t,e,r,i){void 0===i&&(i=["zoom"]);var n,o=or(t,e),s=!1;if("interval"===o)n=["step",i],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'+o+'"');var a=void 0!==t.base?t.base:1;n=[tr(t),1===a?["linear"]:["exponential
 ",a],i]}for(var l=0,u=r;l<u.length;l+=1){var h=u[l];nr(n,h[0],h[1],s)}return ir(n),n}(t,e,r):rr(t,e,r)}function tr(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function er(t,e){return void 0!==t?t:void 0!==e?e:void 0}function rr(t,e,r){var i=or(t,e),n=["get",t.property];if("categorical"===i&&"boolean"==typeof r[0][0]){for(var o=["case"],s=0,a=r;s<a.length;s+=1){var l=a[s];o.push(["==",n,l[0]],l[1])}return o.push($e(er(t.default,e.default))),o}if("categorical"===i){for(var u=["match",n],h=0,c=r;h<c.length;h+=1){var p=c[h];nr(u,p[0],p[1],!1)}return u.push($e(er(t.default,e.default))),u}if("interval"===i){for(var d=["step",["number",n]],f=0,g=r;f<g.length;f+=1){var y=g[f];nr(d,y[0],y[1],!0)}return ir(d),void 0===t.default?d:["case",["==",["typeof",n],"number"],d,$e(t.default)]}if("exponential"===i){for(var m=void 0!==t.base?t.base:1,_=[tr(t),1===m?["linear"]:["exponential",m],["number",n]],v=0,x=r;v<x.length;v+
 =1){var w=x[v];nr(_,w[0],w[1],!1)}return void 0===t.default?_:["case",["==",["typeof",n],"number"],_,$e(t.default)]}throw new Error("Unknown property function type "+i)}function ir(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function nr(t,e,r,i){t.length>3&&e===t[t.length-2]||(i&&2===t.length||t.push(e),t.push(r))}function or(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function sr(t){for(var e=["concat"],r=/{([^{}]+)}/g,i=0,n=r.exec(t);null!==n;n=r.exec(t)){var o=t.slice(i,r.lastIndex-n[0].length);i=r.lastIndex,o.length>0&&e.push(o),e.push(["get",n[1]])}if(1===e.length)return t;if(i<t.length)e.push(t.slice(i));else if(2===e.length)return["to-string",e[1]];return e}function ar(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"
 ==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var i=r[e];if(!ar(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}Je.deserialize=function(t){return new Je(t._parameters,t._specification)},Je.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var lr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ur(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};ar(t)||(t=cr(t));var e=qe(t,lr);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,r,i){return e.value.evaluate(t,r,{},i)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var r=1;r<e.length;r++)if(t(e[r]))return!0;return!1}(t)}}function hr(t,e){
 return t<e?-1:t>e?1:0}function cr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?pr(t[1],t[2],"=="):"!="===r?gr(pr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?pr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(cr))):"all"===r?["all"].concat(t.slice(1).map(cr)):"none"===r?["all"].concat(t.slice(1).map(cr).map(gr)):"in"===r?dr(t[1],t.slice(2)):"!in"===r?gr(dr(t[1],t.slice(2))):"has"===r?fr(t[1]):"!has"===r?gr(fr(t[1])):"within"!==r||t}function pr(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function dr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(hr)]]:["filter-in-small",t,["literal",e]]}}function fr(t){switch(t){case"$type":return!0;case"$id":return["filt
 er-has-id"];default:return["filter-has",t]}}function gr(t){return["!",t]}var yr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function mr(t,e){var r={};for(var i in t)"ref"!==i&&(r[i]=t[i]);return yr.forEach((function(t){t in e&&(r[t]=e[t])})),r}function _r(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=mr(t[i],e[t[i].ref]));return t}var vr=function(t,e,r,i){this.message=(t?t+": ":"")+r,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)},xr=function(t){this.error=t,this.message=t.message;var e=t.message.match(/line (\d+)/);this.line=e?parseInt(e[1],10):0};function wr(t){var e=t.key,r=t.value;return r?[new vr(e,r,"constants have been deprecated as of v8")]:[]}function br(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Sr(t){if(Array.isArray(t))return t.map(Sr);if(t instanceof Object&&!(t instanceof Number||t instanceo
 f String||t instanceof Boolean)){var e={};for(var r in t)e[r]=Sr(t[r]);return e}return br(t)}function Tr(t){var e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,s=t.styleSpec,a=[],l=Ne(r);if("object"!==l)return[new vr(e,r,"object expected, "+l+" found")];for(var u in r){var h=u.split(".")[0],c=i[h]||i["*"],p=void 0;if(n[h])p=n[h];else if(i[h])p=zr;else if(n["*"])p=n["*"];else{if(!i["*"]){a.push(new vr(e,r[u],'unknown property "'+u+'"'));continue}p=zr}a=a.concat(p({key:(e?e+".":e)+u,value:r[u],valueSpec:c,style:o,styleSpec:s,object:r,objectKey:u},r))}for(var d in i)n[d]||i[d].required&&void 0===i[d].default&&void 0===r[d]&&a.push(new vr(e,r,'missing required property "'+d+'"'));return a}function Cr(t){var e=t.value,r=t.valueSpec,i=t.style,n=t.styleSpec,o=t.key,s=t.arrayElementValidator||zr;if("array"!==Ne(e))return[new vr(o,e,"array expected, "+Ne(e)+" found")];if(r.length&&e.length!==r.length)return[new vr(o,e,"array length "+r.length+" expected, length 
 "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new vr(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var a={type:r.value,values:r.values};n.$version<7&&(a.function=r.function),"object"===Ne(r.value)&&(a=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(s({array:e,arrayIndex:u,value:e[u],valueSpec:a,style:i,styleSpec:n,key:o+"["+u+"]"}));return l}function Er(t){var e=t.key,r=t.value,i=t.valueSpec,n=Ne(r);return"number"===n&&r!=r&&(n="NaN"),"number"!==n?[new vr(e,r,"number expected, "+n+" found")]:"minimum"in i&&r<i.minimum?[new vr(e,r,r+" is less than the minimum value "+i.minimum)]:"maximum"in i&&r>i.maximum?[new vr(e,r,r+" is greater than the maximum value "+i.maximum)]:[]}function Rr(t){var e,r,i,n=t.valueSpec,o=br(t.value.type),s={},a="categorical"!==o&&void 0===t.value.property,l=!a,u="array"===Ne(t.value.stops)&&"array"===Ne(t.value.stops[0])&&"object"===Ne(t.value.stops[0][0]),h=Tr({key:t.key,value:t.value,val
 ueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new vr(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;e=e.concat(Cr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===Ne(r)&&0===r.length&&e.push(new vr(t.key,r,"array must have at least one stop"));return e},default:function(t){return zr({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&a&&h.push(new vr(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||h.push(new vr(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!ke(t.valueSpec)&&h.push(new vr(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Fe(t.valueSpec)?h.push(new vr(t.key,t.value,"property functions not supported")):a&&!Ae(t.val
 ueSpec)&&h.push(new vr(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||h.push(new vr(t.key,t.value,'"property" property is required')),h;function c(t){var e=[],o=t.value,a=t.key;if("array"!==Ne(o))return[new vr(a,o,"array expected, "+Ne(o)+" found")];if(2!==o.length)return[new vr(a,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Ne(o[0]))return[new vr(a,o,"object expected, "+Ne(o[0])+" found")];if(void 0===o[0].zoom)return[new vr(a,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new vr(a,o,"object stop key must have value")];if(i&&i>br(o[0].zoom))return[new vr(a,o[0].zoom,"stop zoom values must appear in ascending order")];br(o[0].zoom)!==i&&(i=br(o[0].zoom),r=void 0,s={}),e=e.concat(Tr({key:a+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Er,value:p}}))}else e=e.concat(p({key:a+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec
 :t.styleSpec},o));return Xe(Sr(o[1]))?e.concat([new vr(a+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(zr({key:a+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function p(t,i){var a=Ne(t.value),l=br(t.value),u=null!==t.value?t.value:i;if(e){if(a!==e)return[new vr(t.key,u,a+" stop domain type must match previous stop domain type "+e)]}else e=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new vr(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==o){var h="number expected, "+a+" found";return Fe(n)&&void 0===o&&(h+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new vr(t.key,u,h)]}return"categorical"!==o||"number"!==a||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===a&&void 0!==r&&l<r?[new vr(t.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===o&&l in s?[new vr(t.key,u,"stop domain values must be unique"
 )]:(s[l]=!0,[])):[new vr(t.key,u,"integer expected, found "+l)]}}function Pr(t){var e=("property"===t.expressionContext?He:qe)(Sr(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new vr(""+t.key+e.key,t.value,e.message)}));var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new vr(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!kt(r))return[new vr(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!kt(r))return[new vr(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Nt(r,["zoom","feature-state"]))return[new vr(t.key,t.val
 ue,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!At(r))return[new vr(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ir(t){var e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(br(r))&&n.push(new vr(e,r,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(i.values).indexOf(br(r))&&n.push(new vr(e,r,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(r)+" found")),n}function Or(t){return ar(Sr(t.value))?Pr(L({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,i=e.key;if("array"!==Ne(r))return[new vr(i,r,"array expected, "+Ne(r)+" found")];var n,o=e.styleSpec,s=[];if(r.length<1)return[new vr(i,r,"filter array must have at least 1 element")];switch(s=s.concat(Ir({key:i+"[0]",value:r
 [0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),br(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===br(r[1])&&s.push(new vr(i,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&s.push(new vr(i,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(n=Ne(r[1]))&&s.push(new vr(i+"[1]",r[1],"string expected, "+n+" found"));for(var a=2;a<r.length;a++)n=Ne(r[a]),"$type"===br(r[1])?s=s.concat(Ir({key:i+"["+a+"]",value:r[a],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&s.push(new vr(i+"["+a+"]",r[a],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var l=1;l<r.length;l++)s=s.concat(t({key:i+"["+l+"]",value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Ne(r[1]),2!==r.length?s.push(new vr(i,r,'filter array for "'+r[0]+'" operator must have
  2 elements')):"string"!==n&&s.push(new vr(i+"[1]",r[1],"string expected, "+n+" found"));break;case"within":n=Ne(r[1]),2!==r.length?s.push(new vr(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"object"!==n&&s.push(new vr(i+"[1]",r[1],"object expected, "+n+" found"))}return s}(t)}function Lr(t,e){var r=t.key,i=t.style,n=t.styleSpec,o=t.value,s=t.objectKey,a=n[e+"_"+t.layerType];if(!a)return[];var l=s.match(/^(.*)-transition$/);if("paint"===e&&l&&a[l[1]]&&a[l[1]].transition)return zr({key:r,value:o,valueSpec:n.transition,style:i,styleSpec:n});var u,h=t.valueSpec||a[s];if(!h)return[new vr(r,o,'unknown property "'+s+'"')];if("string"===Ne(o)&&Fe(h)&&!h.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new vr(r,o,'"'+s+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var c=[];return"symbol"===t.layerType&&("text-field"===s&&i&&!i.glyphs&&c.push(new vr(r,o,'use of "text-field" 
 requires a style "glyphs" property')),"text-font"===s&&je(Sr(o))&&"identity"===br(o.type)&&c.push(new vr(r,o,'"text-font" does not support identity functions'))),c.concat(zr({key:t.key,value:o,valueSpec:h,style:i,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:s}))}function Mr(t){return Lr(t,"paint")}function Fr(t){return Lr(t,"layout")}function Ar(t){var e=[],r=t.value,i=t.key,n=t.style,o=t.styleSpec;r.type||r.ref||e.push(new vr(i,r,'either "type" or "ref" is required'));var s,a=br(r.type),l=br(r.ref);if(r.id)for(var u=br(r.id),h=0;h<t.arrayIndex;h++){var c=n.layers[h];br(c.id)===u&&e.push(new vr(i,r.id,'duplicate layer id "'+r.id+'", previously used at line '+c.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(t){t in r&&e.push(new vr(i,r[t],'"'+t+'" is prohibited for ref layers'))})),n.layers.forEach((function(t){br(t.id)===l&&(s=t)})),s?s.ref?e.push(new vr(i,r.ref,"ref cannot reference another ref layer")):a=br(s.
 type):e.push(new vr(i,r.ref,'ref layer "'+l+'" not found'));else if("background"!==a)if(r.source){var p=n.sources&&n.sources[r.source],d=p&&br(p.type);p?"vector"===d&&"raster"===a?e.push(new vr(i,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===d&&"raster"!==a?e.push(new vr(i,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==d||r["source-layer"]?"raster-dem"===d&&"hillshade"!==a?e.push(new vr(i,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!r.paint||!r.paint["line-gradient"]||"geojson"===d&&p.lineMetrics||e.push(new vr(i,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new vr(i,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new vr(i,r.source,'source "'+r.source+'" not found'))}else e.push(new vr(i,r,'missing required property "source"'));return e=e.concat(Tr({key:i,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,ob
 jectElementValidators:{"*":function(){return[]},type:function(){return zr({key:i+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Or,layout:function(t){return Tr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Fr(L({layerType:a},t))}}})},paint:function(t){return Tr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Mr(L({layerType:a},t))}}})}}}))}function kr(t){var e=t.value,r=t.key,i=Ne(e);return"string"!==i?[new vr(r,e,"string expected, "+i+" found")]:[]}var Nr={promoteId:function(t){var e=t.key,r=t.value;if("string"===Ne(r))return kr({key:e,value:r});var i=[];for(var n in r)i.push.apply(i,kr({key:e+"."+n,value:r[n]}));return i}};function jr(t){var e=t.value,r=t.key,i=t.styleSpec,n=t.style;if(!e.type)return[new vr(r,e,'"type" is required')];var o,s=br(e.type);switch(s){case"vector":
 case"raster":case"raster-dem":return o=Tr({key:r,value:e,valueSpec:i["source_"+s.replace("-","_")],style:t.style,styleSpec:i,objectElementValidators:Nr});case"geojson":if(o=Tr({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,objectElementValidators:Nr}),e.cluster)for(var a in e.clusterProperties){var l=e.clusterProperties[a],u=l[0],h=l[1],c="string"==typeof u?[u,["accumulated"],["get",a]]:u;o.push.apply(o,Pr({key:r+"."+a+".map",value:h,expressionContext:"cluster-map"})),o.push.apply(o,Pr({key:r+"."+a+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return Tr({key:r,value:e,valueSpec:i.source_video,style:n,styleSpec:i});case"image":return Tr({key:r,value:e,valueSpec:i.source_image,style:n,styleSpec:i});case"canvas":return[new vr(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ir({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geoj
 son","video","image"]},style:n,styleSpec:i})}}function Dr(t){var e=t.value,r=t.styleSpec,i=r.light,n=t.style,o=[],s=Ne(e);if(void 0===e)return o;if("object"!==s)return o=o.concat([new vr("light",e,"object expected, "+s+" found")]);for(var a in e){var l=a.match(/^(.*)-transition$/);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(zr({key:a,value:e[a],valueSpec:r.transition,style:n,styleSpec:r})):i[a]?o.concat(zr({key:a,value:e[a],valueSpec:i[a],style:n,styleSpec:r})):o.concat([new vr(a,e[a],'unknown property "'+a+'"')])}return o}var Gr={"*":function(){return[]},array:Cr,boolean:function(t){var e=t.value,r=t.key,i=Ne(e);return"boolean"!==i?[new vr(r,e,"boolean expected, "+i+" found")]:[]},number:Er,color:function(t){var e=t.key,r=t.value,i=Ne(r);return"string"!==i?[new vr(e,r,"color expected, "+i+" found")]:null===H(r)?[new vr(e,r,'color expected, "'+r+'" found')]:[]},constants:wr,enum:Ir,filter:Or,function:Rr,layer:Ar,object:Tr,source:jr,light:Dr,string:kr,formatted:function(t){return 0===k
 r(t).length?[]:Pr(t)},resolvedImage:function(t){return 0===kr(t).length?[]:Pr(t)}};function zr(t){var e=t.value,r=t.valueSpec,i=t.styleSpec;return r.expression&&je(br(e))?Rr(t):r.expression&&Xe(Sr(e))?Pr(t):r.type&&Gr[r.type]?Gr[r.type](t):Tr(L({},t,{valueSpec:r.type?i[r.type]:r}))}function Br(t){var e=t.value,r=t.key,i=kr(t);return i.length||(-1===e.indexOf("{fontstack}")&&i.push(new vr(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new vr(r,e,'"glyphs" url must include a "{range}" token'))),i}function Ur(t,e){void 0===e&&(e=n);var r=[];return r=r.concat(zr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Br,"*":function(){return[]}}})),t.constants&&(r=r.concat(wr({key:"constants",value:t.constants,style:t,styleSpec:e}))),Yr(r)}function Yr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function Wr(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Yr(t.
 apply(this,e))}}Ur.source=Wr(jr),Ur.light=Wr(Dr),Ur.layer=Wr(Ar),Ur.filter=Wr(Or),Ur.paintProperty=Wr(Mr),Ur.layoutProperty=Wr(Fr);var Vr=s((function(t,e){var r=function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[1,12],r=[1,13],i=[1,9],n=[1,10],o=[1,11],s=[1,14],a=[1,15],l=[14,18,22,24],u=[18,22],h=[22,24],c={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,r,i,n,o,s){var a=o.l
 ength-1;switch(n){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[a-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[a-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[a]];break;c
 ase 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,12:1,13:2,15:7,16:8,17:s,23:a},{1:[3]},{14:[1,16]},t(l,[2,7]),t(l,[2,8]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),t(l,[2,3]),t(l,[2,4]),t(l,[2,5]),t([14,18,21,22,24],[2,1]),t(l,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,13:23,15:7,16:8,17:s,23:a,24:[1,21],25:22},{1:[2,6]},t(l,[2,13]),{18:[1,24],22:[1,25]},t(u,[2,16]),{21:[1,26]},t(l,[2,18]),{22:[1,28],24:[1,27]},t(h,[2,20]),t(l,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,13:30,15:7,16:8,17:s,23:a},t(l,[2,19]),{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,13:31,15:7,16:8,17:s,23:a},t(u,[2,17]),t(u,[2,15]),t(h,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,r=[0],i=[null],n=[],o=this.table,s="",a=0,l=0,u=2,h=1,c=n.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.p
 rototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;n.push(g);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=p.lex()||h)&&(t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,v,x,w,b,S,T,C,E={};;){if(v=r[r.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==_&&(_=m()),x=o[v]&&o[v][_]),void 0===x||!x.length||!x[0]){var R="";for(b in C=[],o[v])this.terminals_[b]&&b>u&&C.push("'"+this.terminals_[b]+"'");R=p.showPosition?"Parse error on line "+(a+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(a+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:g,expected:C})}if(x[0]inst
 anceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(x[0]){case 1:r.push(_),i.push(p.yytext),n.push(p.yylloc),r.push(x[1]),_=null,l=p.yyleng,s=p.yytext,a=p.yylineno,g=p.yylloc;break;case 2:if(S=this.productions_[x[1]][1],E.$=i[i.length-S],E._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},y&&(E._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[s,l,a,d.yy,x[1],i,n].concat(c))))return w;S&&(r=r.slice(0,-1*S*2),i=i.slice(0,-1*S),n=n.slice(0,-1*S)),r.push(this.productions_[x[1]][0]),i.push(E.$),n.push(E._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._mo
 re=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this
 .yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"
 ")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.mat
 ches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var o in n)this[o]=n[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),o=0;o<n.length;o++)if((r=this._input.match(this.rules[n[o]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.
 showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,i){switch(r){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 
 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return c.lexer=p,d.prototype=c,c.Parser=d,new d}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)}}));Vr.parser,Vr.Parser,Vr.parse;function Xr(t){if(t instanceof String||"string"==typeof t||t instanceof i)try{return Vr.parse(t.toString())}catch(t){throw new xr(t)}return t}function qr(t,e){void 0===e&&(e=n);var r=t;try{r=Xr(r)}catch(t){return[t]}return Ur(r,e)}var Zr={StyleExpression:Ve,isExpression:Xe,isExpressionFilter:ar,createExpression:qe,createPropertyExpression:He,normalizePropertyExpression:function(t,e){if(je(t))return new Je(t,e);if(Xe(t)){var r=He
 (t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=J.parse(t)),{kind:"constant",evaluate:function(){return i}}},ZoomConstantExpression:Ze,ZoomDependentExpression:Ke,StylePropertyFunction:Je},Kr={convertFunction:Qe,createFunction:Ge,isFunction:je};qr.parsed=qr,qr.latest=qr}).call(this,r(5),r(21).Buffer)},function(t,e,r){t.exports=function(){"use strict";function t(t,i,n,o,s){!function t(r,i,n,o,s){for(;o>n;){if(o-n>600){var a=o-n+1,l=i-n+1,u=Math.log(a),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(a-h)/a)*(l-a/2<0?-1:1),p=Math.max(n,Math.floor(i-l*h/a+c)),d=Math.min(o,Math.floor(i+(a-l)*h/a+c));t(r,i,p,d,s)}var f=r[i],g=n,y=o;for(e(r,n,i),s(r[o],f)>0&&e(r,n,o);g<y;){for(e(r,g,y),g++,y--;s(r[g],f)<0;)g++;for(;s(r[y],f)>0;)y--}0===s(r[n],f)?e(r,n,y):(y++,e(r,y,o)),y<=i&&(n=y+1),i<=y&&(o=y-1)}}(t,i,n||0,o||t.length-1,s||r)}function e(t,e,r){var i=t[e];t[e]=t[r],
 t[r]=i}function r(t,e){return t<e?-1:t>e?1:0}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function n(t,e,r){if(!r)return e.indexOf(t);for(var i=0;i<e.length;i++)if(r(t,e[i]))return i;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,r,i,n){n||(n=f(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var o=e;o<r;o++){var s=t.children[o];a(n,t.leaf?i(s):s)}return n}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){
 return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,r,i,n,o){for(var s=[r,i];s.length;)if(!((i=s.pop())-(r=s.pop())<=n)){var a=r+Math.ceil((i-r)/n/2)*n;t(e,a,r,i,o),s.push(r,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,r=[];if(!d(t,e))return r;for(var i=this.toBBox,n=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;d(t,a)&&(e.leaf?r.push(s):p(t,a)?this._all(s,r):n.push(s))}e=n.pop()}return r},i.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var r=[];e;){for(var i=0;i<e.children.length;i++){var n=e.children[i],o=e.leaf?this.toBBox(n):n;if(d(t,o)){if(e.leaf||p(t,o))return!0;r.push(n)}}e=r.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(
 this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=f([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var r,i,o,s=this.data,a=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],r=u.pop(),o=!0),s.leaf){var h=n(t,s.children,e);if(-1!==h)return s.children.splice(h,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?i?(r++,s=i.children[r],o=!1):s=null:(l.push(s),u.push(r),r=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.p
 rototype._all=function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},i.prototype._build=function(t,e,r,i){var n,s=r-e+1,a=this._maxEntries;if(s<=a)return o(n=f(t.slice(e,r+1)),this.toBBox),n;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(n=f([])).leaf=!1,n.height=i;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(t,e,r,u,this.compareMinX);for(var h=e;h<=r;h+=u){var c=Math.min(h+u-1,r);g(t,h,c,l,this.compareMinY);for(var p=h;p<=c;p+=l){var d=Math.min(p+l-1,c);n.children.push(this._build(t,p,d,i-1))}}return o(n,this.toBBox),n},i.prototype._chooseSubtree=function(t,e,r,i){for(;i.push(e),!e.leaf&&i.length-1!==r;){for(var n=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],u=h(l),c=(p=t,d=l,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-u);c<o?(o=c,n=u<n?u:n,s=l):c===o&&u<n&&(n=u,s=l)}e=s||e.children[0]}var p,d;return e},i.prototype._
 insert=function(t,e,r){var i=r?t:this.toBBox(t),n=[],o=this._chooseSubtree(i,this.data,e,n);for(o.children.push(t),a(o,i);e>=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(i,n,e)},i.prototype._split=function(t,e){var r=t[e],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);var s=this._chooseSplitIndex(r,n,i),a=f(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,o(r,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},i.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,r){for(var i,n,o,a,l,u,c,p=1/0,d=1/0,f=e;f<=r-e;f++){var g=s(t,0,f,this.toBBox),y=s(t,f,r,this.toBBox),m=(n=g,o=y,a=void 0,l=void 0,u=void 0,c=void 0,a=Math.max(n.minX,o.minX),l=Math.max(n.minY,o.minY),u=Math.min(n.maxX,o.maxX),c=Math.min(n.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,c-l)),_=h(g)+h(y
 );m<p?(p=m,i=f,d=_<d?_:d):m===p&&_<d&&(d=_,i=f)}return i||r-e},i.prototype._chooseSplitAxis=function(t,e,r){var i=t.leaf?this.compareMinX:l,n=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,r,i)<this._allDistMargin(t,e,r,n)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,r,i){t.children.sort(i);for(var n=this.toBBox,o=s(t,0,e,n),l=s(t,r-e,r,n),u=c(o)+c(l),h=e;h<r-e;h++){var p=t.children[h];a(o,t.leaf?n(p):p),u+=c(o)}for(var d=r-e-1;d>=e;d--){var f=t.children[d];a(l,t.leaf?n(f):f),u+=c(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,r){for(var i=r;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}()},function(t,e,r){"use strict";t.exports=n;var i=r(4);function n(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}n.Varint=0,n.Fixed64
 =1,n.Bytes=2,n.Fixed32=5;var o="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function s(t){return t.type===n.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function l(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function u(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function h(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function c(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function p(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function y(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function _(t,e){return(t[e]|t
 [e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function v(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=_(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=_(this.buf,this.pos)+4294967296*_(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=_(this.buf,this.pos)+4294967296*x(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:
 function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(n=o[r.pos++],i=(112&n)>>4,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<3,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<10,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<17,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<24,n<128)return a(t,i,e);if(n=o[r.pos++],i|=(1&n)<<31,n<128)return a(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,r){return o.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var 
 i="",n=e;for(;n<r;){var o,s,a,l=t[n],u=null,h=l>239?4:l>223?3:l>191?2:1;if(n+h>r)break;1===h?l<128&&(u=l):2===h?128==(192&(o=t[n+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===h?(o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&((u=(15&l)<<12|(63&o)<<6|63&s)<=2047||u>=55296&&u<=57343)&&(u=null)):4===h&&(o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,h=1):u>65535&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),n+=h}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==n.Bytes)return t.push(this.readVarint(e));var r=s(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==n.Bytes)return t.push(this.readSVarint());var e=s(this);for(t=t||[];this.pos<e;)t.pus
 h(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==n.Bytes)return t.push(this.readBoolean());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==n.Bytes)return t.push(this.readFloat());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==n.Bytes)return t.push(this.readDouble());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==n.Bytes)return t.push(this.readFixed32());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==n.Bytes)return t.push(this.readSFixed32());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==n.Bytes)return t.push(this.readFixed64());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t}
 ,readPackedSFixed64:function(t){if(this.type!==n.Bytes)return t.push(this.readSFixed64());var e=s(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===n.Varint)for(;this.buf[this.pos++]>127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),v(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),v(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),v(this.buf,-1&t,this.pos),v(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFix
 ed64:function(t){this.realloc(8),v(this.buf,-1&t,this.pos),v(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[
 this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&l(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.p
 os+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&l(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},
 writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e){var r={thin:100,hairline:100,"ultra-light":100,"
 extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},i=/(italic|oblique)$/i,n={};t.exports=function(t,e,o){var s=n[t];if(!s){Array.isArray(t)||(t=[t]);for(var a=400,l="normal",u=[],h=0,c=t.length;h<c;++h){var p=t[h].split(" "),d=p[p.length-1].toLowerCase();for(var f in"normal"==d||"italic"==d||"oblique"==d?(l=d,p.pop(),d=p[p.length-1].toLowerCase()):i.test(d)&&(d=d.replace(i,""),l=p[p.length-1].replace(d,"")),r)if(d==f||d==f.replace("-","")||d==f.replace("-"," ")){a=r[f],p.pop();break}"number"==typeof d&&(a=d);var g=p.join(" ").replace("Klokantech Noto Sans","Noto Sans");-1!==g.indexOf(" ")&&(g='"'+g+'"'),u.push(g)}s=n[t]=[l,a,u]}return s[0]+" "+s[1]+" "+e+"px"+(o?"/"+o:"")+" "+s[2]}},function(t,e){e.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,l=(1<<a)-1,u=l>>1,h=-7,c=
 r?n-1:0,p=r?-1:1,d=t[e+c];for(c+=p,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=i;h>0;s=256*s+t[e+c],c+=p,h-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),o-=u}return(d?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var s,a,l,u=8*o-n-1,h=(1<<u)-1,c=h>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,f=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+c>=1?p/l:p*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*l-1)*Math.pow(2,n),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,n),s=0));n>=8;t[r+d]=255&a,d+=f,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;t[r+d]=255&s,d+=f,s/=256,u-=8);t[r+d-f]|=128*g}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){(function(){var e;t.exports={icon:"icons
 /google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return e},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},e=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average"
 ,"Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script",
 "Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fast
 hand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Do
 uble Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobste
 r","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","M
 ystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair 
 Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","
 Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl 
 Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},,,,,,,,,,,,,,,function(t,e,r){"use strict";(function(t){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author   Feross Aboukhadijeh <http://feross.org>
+ * @license  MIT
+ */
+var i=r(22),n=r(4),o=r(23);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,r){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return u(this,t,e,r)}function u(t,e,r,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,i){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,r):new Uint8Array(e,r,i);l.TYPED_ARRAY_SUPPORT?(t
 =e).__proto__=l.prototype:t=p(t,e);return t}(t,e,r,i):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|f(e,r),n=(t=a(t,i)).write(e,r);n!==i&&(t=t.slice(0,n));return t}(t,e,r):function(t,e){if(l.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?a(t,0):p(t,e);if("Buffer"===e.type&&o(e.data))return p(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(h(e),t=a(t,e<0?0:0|d(e)),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var 
 r=e.length<0?0:0|d(e.length);t=a(t,r);for(var i=0;i<r;i+=1)t[i]=255&e[i];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function f(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(t).length;default:if(i)return z(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":re
 turn I(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function m(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:_(t,e,r,i,n);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}functi
 on _(t,e,r,i,n){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var h=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===l)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var c=!0,p=0;p<l;p++)if(u(t,o+p)!==u(e,p)){c=!1;break}if(c)return o}return-1}function v(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function x(t,e,r,i){return U(z(e,t.length-r),t,r,i)}function w(t,e,r,i){return U(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function b(t,e,r,i){return w(t,e,r,i)}function S(t,e,r,i){return U
 (B(e),t,r,i)}function T(t,e,r,i){return U(function(t,e){for(var r,i,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function C(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var o,s,a,l,u=t[n],h=null,c=u>239?4:u>223?3:u>191?2:1;if(n+c<=r)switch(c){case 1:u<128&&(h=u);break;case 2:128==(192&(o=t[n+1]))&&(l=(31&u)<<6|63&o)>127&&(h=l);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(h=l)}null===h?(h=65533,c=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),n+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.
 fromCharCode.apply(String,t.slice(i,i+=4096));return r}(i)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,r){return u(null,t,e,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,r){return function(t,e,r,i){return h(e),e<=0?a(t,e):void 0!==r?"string"==typeof i?a(t,e).fill(r,i):a(t,e).fill(r):a(t,e)}(null,t,e,r)},l.allocUnsafe=function(t){return c(nul
 l,t)},l.allocUnsafeSlow=function(t){return c(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=l.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var s=t[r];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,n),n+=s.length}return i},l.byteLength=f,l.prototype._isBuffer=!0,l.prototy
 pe.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):g.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... 
 ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,r,i,n){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(i,n),h=t.slice(e,r),c=0;c<a;++c)if(u[c]!==h[c]){o=u[c],s=h[c];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},l.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},l.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},l.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|
 =0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return b(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function R(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function P(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function I(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(
 var n="",o=e;o<r;++o)n+=G(t[o]);return n}function O(t,e,r){for(var i=t.slice(e,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,i,n,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function F(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n<o;++n)t[r+n]=(e&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function A(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n<o;++n)t[r+n]=e>>>8*(i?n:3-n)&255}function k(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,i,o){return o||k(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function j(t
 ,e,r,i,o){return o||k(t,0,r,8),n.write(t,e,r,i,52,8),r+8}l.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=l.prototype;else{var n=e-t;r=new l(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+t]}return r},l.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i},l.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},l.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777
 216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||L(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||L(t,
 4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),n.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),n.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),n.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),n.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o<r&&(n*=256);)this[e+o]=t/n&255;return e+r},l.prototype.writeUIntBE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},l.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,6
 5535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):A(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);M(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},l.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);M(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=25
 5&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):A(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):A(thi
 s,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n,o=i-r;if(this===t&&r<e&&e<i)for(n=o-1;n>=0;--n)t[n+e]=this[n+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},l.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typ
 eof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=l.isBuffer(t)?t:z(new l(t,i).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s<i;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189
 ),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function B(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(5))},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,i=u(t),s=i[0],a=i[1],l=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),h=0,c=a>0?s-4:s;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n
 [t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[h++]=e>>16&255,l[h++]=e>>8&255,l[h++]=255&e;2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[h++]=255&e);1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e);return l},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],s=0,a=r-n;s<a;s+=16383)o.push(h(t,s,s+16383>a?a:s+16383));1===n?(e=t[r-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return o.join("")};for(var i=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)i[a]=s[a],n[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var n,o,s=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.
 push(i[(o=n)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";function i(){return function(){throw new Error("Unimplemented abstract method.")}()}r.r(e);var n=0;function o(t){return t.ol_uid||(t.ol_uid=String(++n))}var s,a=(s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=function(t){function e(e){var r=this,i="Assertion failed. See https://openlayers.org/en/"+("v"+"6.4.0".split("-")[0])+"/doc/errors/#"+e+" for details.";return(r=t.call(this,i)||this).code=e,r.name="AssertionError",r.message=i,r}return a(e,t),e}(Error);function u(t){t.stopPr
 opagation()}var h=function(){function t(t){this.propagationStopped,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),c="propertychange",p=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function d(t,e){return t>e?1:t<e?-1:0}function f(t,e){return t.indexOf(e)>=0}function g(t,e,r){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var n=void 0;if(r>0){for(n=1;n<i;++n)if(t[n]<e)return n-1}else if(r<0){for(n=1;n<i;++n)if(t[n]<=e)return n}else for(n=1;n<i;++n){if(t[n]==e)return n;if(t[n]<e)return t[n-1]-e<e-t[n]?n-1:n}return i-1}function y(t,e,r){for(;e<r;){var i=t[e];t[e]=t[r],t[r]=i,++e,--r}}function m(t,e){for(var r=Array.isArray(e)?e:[e],i=r.length,n=0;n<i;n++)t[t.length]=r[n]}function _(t,e){for(var r,i=t.length>>>0,n=0
 ;n<i;n++)if(e(r=t[n],n,t))return r;return null}function v(t,e){var r=t.length;if(r!==e.length)return!1;for(var i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}function x(t,e){var r;return!t.every((function(i,n){return r=n,!e(i,n,t)}))?r:-1}function w(){return!0}function b(){return!1}function S(){}var T="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1,n=arguments.length;i<n;++i){var o=arguments[i];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(r[s]=o[s])}return r};function C(t){for(var e in t)delete t[e]}var E="function"==typeof Object.values?Object.values:function(t){var e=[];for(var r in t)e.push(t[r]);return e};function R(t){var e;for(e in t)return!1;return!e}var P=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function
 (e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),I=function(t){function e(e){var r=t.call(this)||this;return r.eventTarget_=e,r.pendingRemovals_=null,r.dispatching_=null,r.listeners_=null,r}return P(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var r=this.listeners_||(this.listeners_={}),i=r[t]||(r[t]=[]);-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new h(t):t,r=e.type;e.target||(e.target=this.eventTarget_||this);var i,n=this.listeners_&&this.listeners_[r];if(n){var o=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});r in o||(o[r]=0,s[r]=0),++o[r];for(var a=0,l=n.length;a<l;++a)if(!1===(i="handleEvent"in n[a]?n[a].handleEvent(e):n[a].call(this,e))||e.propagationStopped){i=!1;break}if(--o[r],0===o[r]){var u=s[r];for(delete s[r];u--;)this.removeEventListener(r,S);delete o[r]}return i}},e.prototype.disposeInternal=
 function(){this.listeners_&&C(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var r=this.listeners_&&this.listeners_[t];if(r){var i=r.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(r[i]=S,++this.pendingRemovals_[t]):(r.splice(i,1),0===r.length&&delete this.listeners_[t]))}},e}(p),O="change",L="error",M="contextmenu",F="click",A="dblclick",k="dragenter",N="dragover",j="drop",D="keydown",G="keypress",z="load",B="resize",U="touchmove",Y="wheel";function W(t,e,r,i,n){if(i&&i!==t&&(r=r.bind(i)),n){var o=r;r=function(){t.removeEventListener(e,r),o.apply(this,arguments)}}var s={target:t,type:e,listener:r};return t.addEventListener(e,r),s}function V(t,e,r,i){return W(t,e,r,i,!0)}function X(t){t&&t.target&&(t.target.removeEventListener(t.type
 ,t.listener),C(t))}var q=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Z(t){if(Array.isArray(t))for(var e=0,r=t.length;e<r;++e)X(t[e]);else X(t)}var K=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return q(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(O)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var r=t.length,i=new Array(r),n=0;n<r;++n)i[n]=W(this,t[n],e);return i}return W(this,t,e)},e.prototype.once=function(t,e){var r;if(Array.isArray(t)){var i=t.length;r=new Array(i);for(var n=0;n<i;++n)r[n]=V(this,t[n],e)}else r=V(this,t,e);return e.ol_key=r,r},e.prototype.un=function(t
 ,e){var r=e.ol_key;if(r)Z(r);else if(Array.isArray(t))for(var i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(I),H=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),J=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.key=r,n.oldValue=i,n}return H(e,t),e}(h),$=function(t){function e(e){var r=t.call(this)||this;return o(r),r.values_=null,void 0!==e&&r.setProperties(e),r}return H(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&T({},this.values_)|
 |{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var r;r=tt(t),this.dispatchEvent(new J(r,t,e)),r=c,this.dispatchEvent(new J(r,t,e))},e.prototype.set=function(t,e,r){var i=this.values_||(this.values_={});if(r)i[t]=e;else{var n=i[t];i[t]=e,n!==e&&this.notify(t,n)}},e.prototype.setProperties=function(t,e){for(var r in t)this.set(r,t[r],e)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var r=this.values_[t];delete this.values_[t],R(this.values_)&&(this.values_=null),e||this.notify(t,r)}},e}(K),Q={};function tt(t){return Q.hasOwnProperty(t)?Q[t]:Q[t]="change:"+t}var et=$,rt="add",it="remove",nt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),
 ot="length",st=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.element=r,n.index=i,n}return nt(e,t),e}(h),at=function(t){function e(e,r){var i=t.call(this)||this,n=r||{};if(i.unique_=!!n.unique,i.array_=e||[],i.unique_)for(var o=0,s=i.array_.length;o<s;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return nt(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,r=0,i=e.length;r<i;++r)t(e[r],r,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(ot)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new st(rt,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=func
 tion(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,r=0,i=e.length;r<i;++r)if(e[r]===t)return this.removeAt(r)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new st(it,e,t)),e},e.prototype.setAt=function(t,e){var r=this.getLength();if(t<r){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new st(it,i,t)),this.dispatchEvent(new st(rt,e,t))}else{for(var n=r;n<t;++n)this.insertAt(n,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(ot,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var r=0,i=this.array_.length;r<i;++r)if(this.array_[r]===t&&r!==e)throw new l(58)},e}(et);function lt(t,e){if(!t)throw new l(e)}var ut=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&functi
 on(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();var ht=function(t){function e(e){var r=t.call(this)||this;if(r.id_=void 0,r.geometryName_="geometry",r.style_=null,r.styleFunction_=void 0,r.geometryChangeKey_=null,r.addEventListener(tt(r.geometryName_),r.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;r.setGeometry(i)}else{var n=e;r.setProperties(n)}return r}return ut(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var r=this.getGeometry();r&&t.setGeometry(r.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometr
 yName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(X(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=W(t,O,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(lt("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeEventListener(tt(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(tt(this.geometryName_),this.handleGeometryC
 hanged_),this.handleGeometryChanged_()},e}(et),ct="XY",pt="XYZ",dt="XYM",ft="XYZM",gt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},yt={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},mt={};mt[yt.DEGREES]=2*Math.PI*6370997/360,mt[yt.FEET]=.3048,mt[yt.METERS]=1,mt[yt.USFEET]=1200/3937;var _t=yt,vt=new Array(6);function xt(t){return bt(t,1,0,0,1,0,0)}function wt(t,e){var r=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],l=e[0],u=e[1],h=e[2],c=e[3],p=e[4],d=e[5];return t[0]=r*l+n*u,t[1]=i*l+o*u,t[2]=r*h+n*c,t[3]=i*h+o*c,t[4]=r*p+n*d+s,t[5]=i*p+o*d+a,t}function bt(t,e,r,i,n,o,s){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t[4]=o,t[5]=s,t}function St(t,e){var r=e[0],i=e[1];return e[0]=t[0]*r+t[2]*i+t[4],e[1]=t[1]*r+t[3]*i+t[5],e}function Tt(t,e,r){return wt(t,bt(vt,e,0,0,r,0
 ,0))}function Ct(t,e,r,i,n,o,s,a){var l=Math.sin(o),u=Math.cos(o);return t[0]=i*u,t[1]=n*l,t[2]=-i*l,t[3]=n*u,t[4]=s*i*u-a*i*l+e,t[5]=s*n*l+a*n*u+r,t}function Et(t,e){var r,i=(r=e)[0]*r[3]-r[1]*r[2];lt(0!==i,32);var n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-s/i,t[3]=n/i,t[4]=(s*u-a*l)/i,t[5]=-(n*u-o*l)/i,t}function Rt(t){return"matrix("+t.join(", ")+")"}var Pt="bottom-left",It="bottom-right",Ot="top-left",Lt="top-right",Mt=0,Ft=1,At=2,kt=4,Nt=8,jt=16;function Dt(t){for(var e=Xt(),r=0,i=t.length;r<i;++r)Qt(e,t[r]);return e}function Gt(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function zt(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Bt(t,e,r){var i,n;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(n=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0)*n}function Ut(t,e){return Wt(t,e[0],e[1])}function Yt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Wt(t,e,r){return t[0]<
 =e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function Vt(t,e){var r=t[0],i=t[1],n=t[2],o=t[3],s=e[0],a=e[1],l=Mt;return s<r?l|=jt:s>n&&(l|=kt),a<i?l|=Nt:a>o&&(l|=At),l===Mt&&(l=Ft),l}function Xt(){return[1/0,1/0,-1/0,-1/0]}function qt(t,e,r,i,n){return n?(n[0]=t,n[1]=e,n[2]=r,n[3]=i,n):[t,e,r,i]}function Zt(t){return qt(1/0,1/0,-1/0,-1/0,t)}function Kt(t,e){var r=t[0],i=t[1];return qt(r,i,r,i,e)}function Ht(t,e,r,i,n){return ee(Zt(n),t,e,r,i)}function Jt(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function $t(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function Qt(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function te(t,e){for(var r=0,i=e.length;r<i;++r)Qt(t,e[r]);return t}function ee(t,e,r,i,n){for(;r<i;r+=n)re(t,e[r],e[r+1]);return t}function re(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function ie(t,e){var r;retur
 n(r=e(oe(t)))||(r=e(se(t)))||(r=e(de(t)))?r:(r=e(pe(t)))||!1}function ne(t){var e=0;return ye(t)||(e=fe(t)*he(t)),e}function oe(t){return[t[0],t[1]]}function se(t){return[t[2],t[1]]}function ae(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function le(t,e){var r;return e===Pt?r=oe(t):e===It?r=se(t):e===Ot?r=pe(t):e===Lt?r=de(t):lt(!1,13),r}function ue(t,e,r,i,n){var o=e*i[0]/2,s=e*i[1]/2,a=Math.cos(r),l=Math.sin(r),u=o*a,h=o*l,c=s*a,p=s*l,d=t[0],f=t[1],g=d-u+p,y=d-u-p,m=d+u-p,_=d+u+p,v=f-h-c,x=f-h+c,w=f+h+c,b=f+h-c;return qt(Math.min(g,y,m,_),Math.min(v,x,w,b),Math.max(g,y,m,_),Math.max(v,x,w,b),n)}function he(t){return t[3]-t[1]}function ce(t,e,r){var i=r||[1/0,1/0,-1/0,-1/0];return ge(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):Zt(i),i}function pe(t){return[t[0],t[3]]}function de(t){return[t[2],t[3]]}function fe(t){return t[2]-t[0]}function ge(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}func
 tion ye(t){return t[2]<t[0]||t[3]<t[1]}function me(t,e){var r=(t[2]-t[0])/2*(e-1),i=(t[3]-t[1])/2*(e-1);t[0]-=r,t[2]+=r,t[1]-=i,t[3]+=i}function _e(t,e,r,i){var n=[];if(i>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)n.push(t[0]+o*a/i,t[1],t[2],t[1]+s*a/i,t[2]-o*a/i,t[3],t[0],t[3]-s*a/i);else n=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(n,n,2);for(var l=[],u=[],h=(a=0,n.length);a<h;a+=2)l.push(n[a]),u.push(n[a+1]);return function(t,e,r){return qt(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}(l,u,r)}function ve(t,e){var r=e.getExtent(),i=ae(t);if(e.canWrapX()&&(i[0]<r[0]||i[0]>=r[2])){var n=fe(r),o=Math.floor((i[0]-r[0])/n)*n;t[0]-=o,t[2]-=o}return t}var xe=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global
 ,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||mt[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=funct
 ion(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function we(t,e,r){return Math.min(Math.max(t,e),r)}var be="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Se="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Te(t,e,r,i,n,o){var s=n-r,a=o-i;if(0!==s||0!==a){var l=((t-r)*s+(e-i)*a)/(s*s+a*a);l>1?(r=n,i=o):l>0&&(r+=s*l,i+=a*l)}return Ce(t,e,r,i)}function Ce(t,e,r,i){var n=r-t,o=i-e;return n*n+o*o}function Ee(t){return 180*t/Math.PI}function Re(t){return t*Math.PI/180}function Pe(t,e){var r=t%e;return r*e<0?r+e:r}function Ie(t,e,r){return t+r*(e-t)}var Oe=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructo
 r=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Le=6378137*Math.PI,Me=[-Le,-Le,Le,Le],Fe=[-180,-85,180,85],Ae=function(t){function e(e){return t.call(this,{code:e,units:_t.METERS,extent:Me,global:!0,worldExtent:Fe,getPointResolution:function(t,e){return t/be(e[1]/6378137)}})||this}return Oe(e,t),e}(xe),ke=[new Ae("EPSG:3857"),new Ae("EPSG:102100"),new Ae("EPSG:102113"),new Ae("EPSG:900913"),new Ae("urn:ogc:def:crs:EPSG:6.18:3:3857"),new Ae("urn:ogc:def:crs:EPSG::3857"),new Ae("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ne(t,e,r){var i=t.length,n=r>1?r:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(i));for(var s=Le,a=0;a<i;a+=n){o[a]=s*t[a]/180;var l=6378137*Math.log(Math.tan(Math.PI*(+t[a+1]+90)/360));l>s?l=s:l<-s&&(l=-s),o[a+1]=l}return o}function je(t,e,r){var i=t.length,n=r>1?r:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(i));for(var s=0;s<i;s+=n)o[s]=180*t[s]/Le,o[s+1]=360*Math.atan(Math.exp(t[s+1]/6378137))/Math.PI-90;return o}va
 r De=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ge=[-180,-90,180,90],ze=6378137*Math.PI/180,Be=function(t){function e(e,r){return t.call(this,{code:e,units:_t.DEGREES,extent:Ge,axisOrientation:r,global:!0,metersPerUnit:ze,worldExtent:Ge})||this}return De(e,t),e}(xe),Ue=[new Be("CRS:84"),new Be("EPSG:4326","neu"),new Be("urn:ogc:def:crs:EPSG::4326","neu"),new Be("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Be("urn:ogc:def:crs:OGC:1.3:CRS84"),new Be("urn:ogc:def:crs:OGC:2:84"),new Be("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Be("urn:x-ogc:def:crs:EPSG:4326","neu")],Ye={};var We={};function Ve(t,e,r){var i=t.getCode(),n=e.getCode();i in We||(We[i]={}),We[i][n]=r}function Xe(t,e){var r;return
  t in We&&e in We[t]&&(r=We[t][e]),r}function qe(t,e,r){var i=r||6371008.8,n=Re(t[1]),o=Re(e[1]),s=(o-n)/2,a=Re(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Ze(t,e){for(var r=0,i=0,n=t.length;i<n-1;++i)r+=qe(t[i],t[i+1],e);return r}function Ke(t,e){for(var r=0,i=t.length,n=t[i-1][0],o=t[i-1][1],s=0;s<i;s++){var a=t[s][0],l=t[s][1];r+=Re(a-n)*(2+Math.sin(Re(o))+Math.sin(Re(l))),n=a,o=l}return r*e*e/2}function He(t,e,r,i){var n=i||6371008.8,o=Re(t[1]),s=Re(t[0]),a=e/n,l=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(r));return[Ee(s+Math.atan2(Math.sin(r)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(l))),Ee(l)]}function Je(t,e,r){var i=void 0!==r?t.toFixed(r):""+t,n=i.indexOf(".");return(n=-1===n?i.length:n)>e?i:new Array(1+e-n).join("0")+i}function $e(t,e){for(var r=(""+t).split("."),i=(""+e).split("."),n=0;n<Math.max(r.length,i.length);n++){var o=parse
 Int(r[n]||"0",10),s=parseInt(i[n]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}function Qe(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function tr(t,e){var r,i,n=t[0],o=t[1],s=e[0],a=e[1],l=s[0],u=s[1],h=a[0],c=a[1],p=h-l,d=c-u,f=0===p&&0===d?0:(p*(n-l)+d*(o-u))/(p*p+d*d||0);return f<=0?(r=l,i=u):f>=1?(r=h,i=c):(r=l+f*p,i=u+f*d),[r,i]}function er(t,e,r){var i=Pe(e+180,360)-180,n=Math.abs(3600*i),o=r||0,s=Math.pow(10,o),a=Math.floor(n/3600),l=Math.floor((n-3600*a)/60),u=n-3600*a-60*l;return(u=Math.ceil(u*s)/s)>=60&&(u=0,l+=1),l>=60&&(l=0,a+=1),a+"° "+Je(l,2)+"′ "+Je(u,2,o)+"″"+(0==i?"":" "+t.charAt(i<0?1:0))}function rr(t,e,r){return t?e.replace("{x}",t[0].toFixed(r)).replace("{y}",t[1].toFixed(r)):""}function ir(t,e){for(var r=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){r=!1;break}return r}function nr(t,e){var r=Math.cos(e),i=Math.sin(e),n=t[0]*r-t[1]*i,o=t[1]*r+t[0]*i;return t[0]=n,t[1]=o,t}function or(t,e){return t[0]*=e,t[1]*=e,t}function sr(t,e){var r=t[0]-e[0],i=t[1]-e[1];retur
 n r*r+i*i}function ar(t,e){return Math.sqrt(sr(t,e))}function lr(t,e){return sr(t,tr(t,e))}function ur(t,e){return rr(t,"{x}, {y}",e)}function hr(t,e){var r=fe(e.getExtent()),i=cr(t,e,r);return i&&(t[0]-=i*r),t}function cr(t,e,r){var i=e.getExtent(),n=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var o=r||fe(i);n=Math.floor((t[0]-i[0])/o)}return n}function pr(t,e,r){var i;if(void 0!==e){for(var n=0,o=t.length;n<o;++n)e[n]=t[n];i=e}else i=t.slice();return i}function dr(t,e,r){if(void 0!==e&&t!==e){for(var i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function fr(t){!function(t,e){Ye[t]=e}(t.getCode(),t),Ve(t,t,pr)}function gr(t){return"string"==typeof t?Ye[t]||null:t||null}function yr(t,e,r,i){var n,o=(t=gr(t)).getPointResolutionFunc();if(o)n=o(e,r),i&&i!==t.getUnits()&&(s=t.getMetersPerUnit())&&(n=n*s/mt[i]);else if(t.getUnits()==_t.DEGREES&&!i||i==_t.DEGREES)n=e;else{var s,a=br(t,gr("EPSG:4326")),l=[r[0]-e/2,r[1],r[0]+e/2,r[1],r[0],r[1]-e/2,r[0],r[1]+e/2];n=(qe((l=a(l,l,2)).slice(0,2)
 ,l.slice(2,4))+qe(l.slice(4,6),l.slice(6,8)))/2,void 0!==(s=i?mt[i]:t.getMetersPerUnit())&&(n/=s)}return n}function mr(t){!function(t){t.forEach(fr)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Ve(e,t,pr)}))}))}function _r(t,e){return t?"string"==typeof t?gr(t):t:gr(e)}function vr(t){return function(e,r,i){for(var n=e.length,o=void 0!==i?i:2,s=void 0!==r?r:new Array(n),a=0;a<n;a+=o){var l=t([e[a],e[a+1]]);s[a]=l[0],s[a+1]=l[1];for(var u=o-1;u>=2;--u)s[a+u]=e[a+u]}return s}}function xr(t,e,r,i){var n=gr(t),o=gr(e);Ve(n,o,vr(r)),Ve(o,n,vr(i))}function wr(t,e){if(t===e)return!0;var r=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||br(t,e)===pr)&&r}function br(t,e){var r=Xe(t.getCode(),e.getCode());return r||(r=dr),r}function Sr(t,e){return br(gr(t),gr(e))}function Tr(t,e,r){return Sr(e,r)(t,void 0,t.length)}function Cr(t,e,r,i){return _e(t,Sr(e,r),void 0,i)}var Er,Rr,Pr,Ir=null;function Or(){return Ir}function Lr(t,e){return Ir?Tr(t,e,Ir):t}function Mr(t,e){re
 turn Ir?Tr(t,Ir,e):t}function Fr(t,e){return Ir?Cr(t,e,Ir):t}function Ar(t,e){return Ir?Cr(t,Ir,e):t}function kr(t,e,r){return function(i){var n,o,s=i[0],a=i[1];if(t.canWrapX()){var l=t.getExtent(),u=fe(l);(o=cr(i,t,u))&&(s-=o*u),s=we(s,l[0],l[2]),a=we(a,l[1],l[3]),n=r([s,a])}else n=r(i);return o&&e.canWrapX()&&(n[0]+=o*fe(e.getExtent())),n}}function Nr(t,e,r,i,n,o){for(var s=o||[],a=0,l=e;l<r;l+=i){var u=t[l],h=t[l+1];s[a++]=n[0]*u+n[2]*h+n[4],s[a++]=n[1]*u+n[3]*h+n[5]}return o&&s.length!=a&&(s.length=a),s}function jr(t,e,r,i,n,o,s){for(var a=s||[],l=Math.cos(n),u=Math.sin(n),h=o[0],c=o[1],p=0,d=e;d<r;d+=i){var f=t[d]-h,g=t[d+1]-c;a[p++]=h+f*l-g*u,a[p++]=c+f*u+g*l;for(var y=d+2;y<d+i;++y)a[p++]=t[y]}return s&&a.length!=p&&(a.length=p),a}function Dr(t,e,r,i,n,o,s){for(var a=s||[],l=0,u=e;u<r;u+=i){a[l++]=t[u]+n,a[l++]=t[u+1]+o;for(var h=u+2;h<u+i;++h)a[l++]=t[h]}return s&&a.length!=l&&(a.length=l),a}mr(ke),mr(Ue),Er=ke,Rr=Ne,Pr=je,Ue.forEach((function(t){Er.forEach((function(e){Ve(t
 ,e,Rr),Ve(e,t,Pr)}))}));var Gr=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),zr=[1,0,0,1,0,0],Br=function(t){function e(){var e,r,i,n,o,s=t.call(this)||this;return s.extent_=[1/0,1/0,-1/0,-1/0],s.extentRevision_=-1,s.simplifiedGeometryMaxMinSquaredTolerance=0,s.simplifiedGeometryRevision=0,s.simplifyTransformedInternal=(e=function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(r),i.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===n&&v(t,i)||(o=!0,n=this,i=t,r=e.apply(this,arguments)),r}),s}return Gr(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision()
 ,t,e)},e.prototype.clone=function(){return i()},e.prototype.closestPointXY=function(t,e,r,n){return i()},e.prototype.containsXY=function(t,e){var r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e},e.prototype.getClosestPoint=function(t,e){var r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r,1/0),r},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return i()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Zt(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){i()},e.prototype.scale=function(t,e,r){i()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return i()},e.prototype.getType=function(){return i()},e.prototype.applyTr
 ansform=function(t){i()},e.prototype.intersectsExtent=function(t){return i()},e.prototype.translate=function(t,e){i()},e.prototype.transform=function(t,e){var r=gr(t),i=r.getUnits()==_t.TILE_PIXELS?function(t,i,n){var o=r.getExtent(),s=r.getWorldExtent(),a=he(s)/he(o);return Ct(zr,s[0],s[3],a,-a,0,0,0),Nr(t,0,t.length,n,zr,i),Sr(r,e)(t,i,n)}:Sr(r,e);return this.applyTransform(i),this},e}(et),Ur=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Yr(t){var e;return t==ct?e=2:t==pt||t==dt?e=3:t==ft&&(e=4),e}var Wr=function(t){function e(){var e=t.call(this)||this;return e.layout=ct,e.stride=2,e.flatCoordinates=null,e}return Ur(e,t),e.prototype.computeExtent=function(t){return Ht(this.flatCoordinates,0,th
 is.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return i()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getSt
 ride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Yr(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){i()},e.prototype.setLayout=function(t,e,r){var i;if(t)i=Yr(t);else{for(var n=0;n<r;++n){if(0===e.length)return this.layout=ct,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=ct:3==t?e=pt:4==t&&(e=ft);return(e)}(i=e.length)}this.layout=t,this.stride=i},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var r=this.getFlatCoordinates();if(r){var i=this.getStride();jr(r,0,r.length,i,t,e,r),this.changed()}},e.prototype.scale=function(t,e,r){var i=e;void 0===i&&(i=t);var n=r;n||(n=ae(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,r,i,n,o,s,a){for(var l=a||[],u=s[0],h=s[1],c=0,p=e;p<r;p+=i){var d=t[p]-u,f=t[p+1]-h;l[c++]=u+n*d,l[c++]=h+o*f;for(var
  g=p+2;g<p+i;++g)l[c++]=t[g]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,i,n,o),this.changed()}},e.prototype.translate=function(t,e){var r=this.getFlatCoordinates();if(r){var i=this.getStride();Dr(r,0,r.length,i,t,e,r),this.changed()}},e}(Br);function Vr(t,e,r,i,n,o,s){var a,l=t[e],u=t[e+1],h=t[r]-l,c=t[r+1]-u;if(0===h&&0===c)a=e;else{var p=((n-l)*h+(o-u)*c)/(h*h+c*c);if(p>1)a=r;else{if(p>0){for(var d=0;d<i;++d)s[d]=Ie(t[e+d],t[r+d],p);return void(s.length=i)}a=e}}for(d=0;d<i;++d)s[d]=t[a+d];s.length=i}function Xr(t,e,r,i,n){var o=t[e],s=t[e+1];for(e+=i;e<r;e+=i){var a=t[e],l=t[e+1],u=Ce(o,s,a,l);u>n&&(n=u),o=a,s=l}return n}function qr(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){var a=r[o];n=Xr(t,e,a,i,n),e=a}return n}function Zr(t,e,r,i,n,o,s,a,l,u,h){if(e==r)return u;var c,p;if(0===n){if((p=Ce(s,a,t[e],t[e+1]))<u){for(c=0;c<i;++c)l[c]=t[e+c];return l.length=i,p}return u}for(var d=h||[NaN,NaN],f=e+i;f<r;)if(Vr(t,f-i,f,i,s,a,d),(p=Ce(s,a,d[0],d[1]))<u){for(u=p,c=0;c<i;++c)l[c]=d[c
 ];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(p)-Math.sqrt(u))/n|0,1);if(o&&(Vr(t,r-i,e,i,s,a,d),(p=Ce(s,a,d[0],d[1]))<u)){for(u=p,c=0;c<i;++c)l[c]=d[c];l.length=i}return u}function Kr(t,e,r,i,n,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,d=r.length;p<d;++p){var f=r[p];u=Zr(t,e,f,i,n,o,s,a,l,u,c),e=f}return u}function Hr(t,e,r,i){for(var n=0,o=r.length;n<o;++n)t[e++]=r[n];return e}function Jr(t,e,r,i){for(var n=0,o=r.length;n<o;++n)for(var s=r[n],a=0;a<i;++a)t[e++]=s[a];return e}function $r(t,e,r,i,n){for(var o=n||[],s=0,a=0,l=r.length;a<l;++a){var u=Jr(t,e,r[a],i);o[s++]=u,e=u}return o.length=s,o}function Qr(t,e,r,i,n,o,s){var a=(r-e)/i;if(a<3){for(;e<r;e+=i)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var u=[e,r-i],h=0;u.length>0;){for(var c=u.pop(),p=u.pop(),d=0,f=t[p],g=t[p+1],y=t[c],m=t[c+1],_=p+i;_<c;_+=i){var v=Te(t[_],t[_+1],f,g,y,m);v>d&&(h=_,d=v)}d>n&&(l[(h-e)/i]=1,p+i<h&&u.push(p,h),h+i<c&&u.push(h,c))}for(_=0;_<a;++_)l[_]&&(o[s++]=t[e+_*i],o[s+
 +]=t[e+_*i+1]);return s}function ti(t,e,r,i,n,o,s,a){for(var l=0,u=r.length;l<u;++l){var h=r[l];s=Qr(t,e,h,i,n,o,s),a.push(s),e=h}return s}function ei(t,e){return e*Math.round(t/e)}function ri(t,e,r,i,n,o,s){if(e==r)return s;var a,l,u=ei(t[e],n),h=ei(t[e+1],n);e+=i,o[s++]=u,o[s++]=h;do{if(a=ei(t[e],n),l=ei(t[e+1],n),(e+=i)==r)return o[s++]=a,o[s++]=l,s}while(a==u&&l==h);for(;e<r;){var c=ei(t[e],n),p=ei(t[e+1],n);if(e+=i,c!=a||p!=l){var d=a-u,f=l-h,g=c-u,y=p-h;d*y==f*g&&(d<0&&g<d||d==g||d>0&&g>d)&&(f<0&&y<f||f==y||f>0&&y>f)?(a=c,l=p):(o[s++]=a,o[s++]=l,u=a,h=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function ii(t,e,r,i,n,o,s,a){for(var l=0,u=r.length;l<u;++l){var h=r[l];s=ri(t,e,h,i,n,o,s),a.push(s),e=h}return s}function ni(t,e,r,i,n){for(var o=void 0!==n?n:[],s=0,a=e;a<r;a+=i)o[s++]=t.slice(a,a+i);return o.length=s,o}function oi(t,e,r,i,n){for(var o=void 0!==n?n:[],s=0,a=0,l=r.length;a<l;++a){var u=r[a];o[s++]=ni(t,e,u,i,o[s]),e=u}return o.length=s,o}function si(t,e,r,i,n){for(var o=vo
 id 0!==n?n:[],s=0,a=0,l=r.length;a<l;++a){var u=r[a];o[s++]=oi(t,e,u,i,o[s]),e=u[u.length-1]}return o.length=s,o}function ai(t,e,r,i){for(var n=0,o=t[r-i],s=t[r-i+1];e<r;e+=i){var a=t[e],l=t[e+1];n+=s*a-o*l,o=a,s=l}return n/2}function li(t,e,r,i){for(var n=0,o=0,s=r.length;o<s;++o){var a=r[o];n+=ai(t,e,a,i),e=a}return n}var ui=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),hi=function(t){function e(e,r){var i=t.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?i.setCoordinates(e,r):i.setFlatCoordinates(r,e),i}return ui(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,i){return i<Bt
 (this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Xr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,r,i))},e.prototype.getArea=function(){return ai(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return ni(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=Qr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,ct)},e.prototype.getType=function(){return gt.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Jr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Wr),c
 i=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),pi=function(t){function e(e,r){var i=t.call(this)||this;return i.setCoordinates(e,r),i}return ci(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,i){var n=this.flatCoordinates,o=Ce(t,e,n[0],n[1]);if(o<i){for(var s=this.stride,a=0;a<s;++a)r[a]=n[a];return r.length=s,o}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Kt(this.flatCoordinates,t)},e.prototype.getType=function(){return gt.POINT},e.prototype.intersectsExtent=function(t){return Wt(t,this.flatCoordinates[0],this.fla
 tCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Hr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Wr);function di(t,e,r,i,n){return!ie(n,(function(n){return!fi(t,e,r,i,n[0],n[1])}))}function fi(t,e,r,i,n,o){for(var s=0,a=t[r-i],l=t[r-i+1];e<r;e+=i){var u=t[e],h=t[e+1];l<=o?h>o&&(u-a)*(o-l)-(n-a)*(h-l)>0&&s++:h<=o&&(u-a)*(o-l)-(n-a)*(h-l)<0&&s--,a=u,l=h}return 0!==s}function gi(t,e,r,i,n,o){if(0===r.length)return!1;if(!fi(t,e,r[0],i,n,o))return!1;for(var s=1,a=r.length;s<a;++s)if(fi(t,r[s-1],r[s],i,n,o))return!1;return!0}function yi(t,e,r,i,n,o,s){for(var a,l,u,h,c,p,f,g=n[o+1],y=[],m=0,_=r.length;m<_;++m){var v=r[m];for(h=t[v-i],p=t[v-i+1],a=e;a<v;a+=i)c=t[a],f=t[a+1],(g<=p&&f<=g||p<=g&&g<=f)&&(u=(g-p)/(f-p)*(c-h)+h,y.push(u)),h=c,p=f}var x=NaN,w=-1/0;for(y.sort(d),h=y[0],a=1,l=y.length;a<l;++a){c=y[a];var b=Math.abs(c-h);b>w&&gi(t,e,r,i,u=(h+c)/2,g)&&(x=u,w=b),h=c}
 return isNaN(x)&&(x=n[o]),s?(s.push(x,g,w),s):[x,g,w]}function mi(t,e,r,i,n){for(var o=[],s=0,a=r.length;s<a;++s){var l=r[s];o=yi(t,e,l,i,n,2*s,o),e=l[l.length-1]}return o}function _i(t,e,r,i,n){for(var o,s=[t[e],t[e+1]],a=[];e+i<r;e+=i){if(a[0]=t[e+i],a[1]=t[e+i+1],o=n(s,a))return o;s[0]=a[0],s[1]=a[1]}return!1}function vi(t,e,r,i,n){var o=ee([1/0,1/0,-1/0,-1/0],t,e,r,i);return!!ge(n,o)&&(!!Yt(n,o)||(o[0]>=n[0]&&o[2]<=n[2]||(o[1]>=n[1]&&o[3]<=n[3]||_i(t,e,r,i,(function(t,e){return function(t,e,r){var i=!1,n=Vt(t,e),o=Vt(t,r);if(n===Ft||o===Ft)i=!0;else{var s=t[0],a=t[1],l=t[2],u=t[3],h=e[0],c=e[1],p=r[0],d=r[1],f=(d-c)/(p-h),g=void 0,y=void 0;o&At&&!(n&At)&&(i=(g=p-(d-u)/f)>=s&&g<=l),i||!(o&kt)||n&kt||(i=(y=d-(p-l)*f)>=a&&y<=u),i||!(o&Nt)||n&Nt||(i=(g=p-(d-a)/f)>=s&&g<=l),i||!(o&jt)||n&jt||(i=(y=d-(p-s)*f)>=a&&y<=u)}return i}(n,t,e)})))))}function xi(t,e,r,i,n){if(!function(t,e,r,i,n){return!!vi(t,e,r,i,n)||(!!fi(t,e,r,i,n[0],n[1])||(!!fi(t,e,r,i,n[0],n[3])||(!!fi(t,e,r,i,n[2],n[1]
 )||!!fi(t,e,r,i,n[2],n[3]))))}(t,e,r[0],i,n))return!1;if(1===r.length)return!0;for(var o=1,s=r.length;o<s;++o)if(di(t,r[o-1],r[o],i,n)&&!vi(t,r[o-1],r[o],i,n))return!1;return!0}function wi(t,e,r,i){for(;e<r-i;){for(var n=0;n<i;++n){var o=t[e+n];t[e+n]=t[r-i+n],t[r-i+n]=o}e+=i,r-=i}}function bi(t,e,r,i){for(var n=!0,o=0;o<i;++o)if(t[e+o]!==t[r-i+o]){n=!1;break}n&&(r-=i);var s=function(t,e,r,i){for(var n=-1,o=1/0,s=1/0,a=e;a<r;a+=i){var l=t[a],u=t[a+1];u>o||(u==o&&l>=s||(n=a,o=u,s=l))}return n}(t,e,r,i),a=s-i;a<e&&(a=r-i);var l=s+i;l>=r&&(l=e);var u=t[a],h=t[a+1],c=t[s],p=t[s+1],d=t[l],f=t[l+1];return c*f+u*p+h*d-(h*c+p*d+u*f)<0}function Si(t,e,r,i,n){for(var o=void 0!==n&&n,s=0,a=r.length;s<a;++s){var l=r[s],u=bi(t,e,l,i);if(0===s){if(o&&u||!o&&!u)return!1}else if(o&&!u||!o&&u)return!1;e=l}return!0}function Ti(t,e,r,i,n){for(var o=void 0!==n&&n,s=0,a=r.length;s<a;++s){var l=r[s],u=bi(t,e,l,i);(0===s?o&&u||!o&&!u:o&&!u||!o&&u)&&wi(t,e,l,i),e=l}return e}function Ci(t,e,r,i,n){for(var o
 =0,s=r.length;o<s;++o)e=Ti(t,e,r[o],i,n);return e}var Ei=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ri=function(t){function e(e,r,i){var n=t.call(this)||this;return n.ends_=[],n.flatInteriorPointRevision_=-1,n.flatInteriorPoint_=null,n.maxDelta_=-1,n.maxDeltaRevision_=-1,n.orientedRevision_=-1,n.orientedFlatCoordinates_=null,void 0!==r&&i?(n.setFlatCoordinates(r,e),n.ends_=i):n.setCoordinates(e,r),n}return Ei(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),
 this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,r,i){return i<Bt(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(qr(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Kr(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,r,i))},e.prototype.containsXY=function(t,e){return gi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return li(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Ti(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,oi(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=ae(this.getExtent());this.flatInteriorPoint_=yi(this.getOrientedFlatCoordin
 ates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new pi(this.getFlatInteriorPoint(),dt)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new hi(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.ends_,i=[],n=0,o=0,s=r.length;o<s;++o){var a=r[o],l=new hi(e.slice(n,a),t);i.push(l),n=a}return i},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Si(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ti(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}ret
 urn this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=ii(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),r,0,i),new e(r,ct,i)},e.prototype.getType=function(){return gt.POLYGON},e.prototype.intersectsExtent=function(t){return xi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=$r(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(Wr),Pi=Ri;function Ii(t,e,r,i){for(var n=r||32,o=[],s=0;s<n;++s)m(o,He(t,e,2*Math.PI*s/n,i));return o.push(o[0],o[1]),new Ri(o,ct,[o.length])}function Oi(t){var e=t[0],r=t[1],i=t[2],n=t[3],o=[e,r,e,n,i,n,i,r,e,r];return new Ri(o,ct,[o.length])}function Li(t,e,r){for(var i=e||32,n=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=n*(i+1),l=new Array(a),u=0;u<a;u+=n){l[u]=0,l[u+1]=0;for
 (var h=2;h<n;h++)l[u+h]=s[h]}var c=[l.length],p=new Ri(l,o,c);return Mi(p,s,t.getRadius(),r),p}function Mi(t,e,r,i){for(var n=t.getFlatCoordinates(),o=t.getStride(),s=n.length/o-1,a=i||0,l=0;l<=s;++l){var u=l*o,h=a+2*Pe(l,s)*Math.PI/s;n[u]=e[0]+r*Math.cos(h),n[u+1]=e[1]+r*Math.sin(h)}t.changed()}var Fi=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ai="accuracy",ki="accuracyGeometry",Ni="altitude",ji="altitudeAccuracy",Di="heading",Gi="position",zi="projection",Bi="speed",Ui="tracking",Yi="trackingOptions",Wi=function(t){function e(e){var r=t.call(this,L)||this;return r.code=e.code,r.message=e.message,r}return Fi(e,t),e}(h),Vi=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.position_=nu
 ll,r.transform_=dr,r.watchId_=void 0,r.addEventListener(tt(zi),r.handleProjectionChanged_),r.addEventListener(tt(Ui),r.handleTrackingChanged_),void 0!==i.projection&&r.setProjection(i.projection),void 0!==i.trackingOptions&&r.setTrackingOptions(i.trackingOptions),r.setTracking(void 0!==i.tracking&&i.tracking),r}return Fi(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=br(gr("EPSG:4326"),t),this.position_&&this.set(Gi,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionCh
 ange_=function(t){var e=t.coords;this.set(Ai,e.accuracy),this.set(Ni,null===e.altitude?void 0:e.altitude),this.set(ji,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Di,null===e.heading?void 0:Re(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var r=this.transform_(this.position_);this.set(Gi,r),this.set(Bi,null===e.speed?void 0:e.speed);var i=Ii(this.position_,e.accuracy);i.applyTransform(this.transform_),this.set(ki,i),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Wi(t))},e.prototype.getAccuracy=function(){return this.get(Ai)},e.prototype.getAccuracyGeometry=function(){return this.get(ki)||null},e.prototype.getAltitude=function(){return this.get(Ni)},e.prototype.getAltitudeAccuracy=function(){return this.get(ji)},e.prototype.getHeading=function(){return this.get(Di)},e.prototype.getPosition=function(){return this.get(Gi)},e.prototype.getProjection=function(
 ){return this.get(zi)},e.prototype.getSpeed=function(){return this.get(Bi)},e.prototype.getTracking=function(){return this.get(Ui)},e.prototype.getTrackingOptions=function(){return this.get(Yi)},e.prototype.setProjection=function(t){this.set(zi,gr(t))},e.prototype.setTracking=function(t){this.set(Ui,t)},e.prototype.setTrackingOptions=function(t){this.set(Yi,t)},e}(et),Xi=function(){function t(t,e,r){this.decay_=t,this.minVelocity_=e,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var r=e-3;r>0&&this.points_[r+2]>t;)r-=3;var i=this.points_[e+2]-this.points_[r+2];if(i<1e3/60)return!1;var n=this.points_[e]-this.points_[r],o=this.points_[e+1]-this.points_[r+
 1];return this.angle_=Math.atan2(o,n),this.initialVelocity_=Math.sqrt(n*n+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),qi=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Zi=/^([a-z]*)$|^hsla?\(.*\)$/i;function Ki(t){return"string"==typeof t?t:rn(t)}function Hi(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var r=getComputedStyle(e).color;return document.body.removeChild(e),r}return""}var Ji,$i,Qi=(Ji={},$i=0,function(t){var e;if(Ji.hasOwnProperty(t))e=Ji[t];else{if($i>=1024){var r=0;for(var i in Ji)0==(3&r++)&&(delete Ji[i],--$i)}e=function(t){var e,r,i,n,o;if(Zi.exec(t)&&(t=Hi(t)),qi.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),r=parseInt(t.substr(1+1*a,a),16),i=parseInt(t.substr(1+2*a,a),16),n=l?parseInt(t.substr
 (1+3*a,a),16):255,1==a&&(e=(e<<4)+e,r=(r<<4)+r,i=(i<<4)+i,l&&(n=(n<<4)+n)),o=[e,r,i,n/255]}else 0==t.indexOf("rgba(")?en(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),en(o)):lt(!1,14);return o}(t),Ji[t]=e,++$i}return e});function tn(t){return Array.isArray(t)?t:Qi(t)}function en(t){return t[0]=we(t[0]+.5|0,0,255),t[1]=we(t[1]+.5|0,0,255),t[2]=we(t[2]+.5|0,0,255),t[3]=we(t[3],0,1),t}function rn(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var r=t[1];r!=(0|r)&&(r=r+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+r+","+i+","+(void 0===t[3]?1:t[3])+")"}var nn=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var r=this.cache_[e];0!=(3&t++)||r.hasListener()|
 |(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,r){var i=on(t,e,r);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,r,i){var n=on(t,e,r);this.cache_[n]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function on(t,e,r){return e+":"+t+":"+(r?Ki(r):"null")}var sn=new nn,an="opacity",ln="visible",un="extent",hn="zIndex",cn="maxResolution",pn="minResolution",dn="maxZoom",fn="minZoom",gn="source",yn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),mn=function(t){function e(e){var r=t.call(this)||this,i=T({},e);return i[an]=void 0!==e.opacity?e.opacity:1,lt("number"==typeof i[an],64),i[ln]=void 0===e.visible||e.visibl
 e,i[hn]=e.zIndex,i[cn]=void 0!==e.maxResolution?e.maxResolution:1/0,i[pn]=void 0!==e.minResolution?e.minResolution:0,i[fn]=void 0!==e.minZoom?e.minZoom:-1/0,i[dn]=void 0!==e.maxZoom?e.maxZoom:1/0,r.className_=void 0!==i.className?e.className:"ol-layer",delete i.className,r.setProperties(i),r.state_=null,r}return yn(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},r=this.getZIndex();return e.opacity=we(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==r?r:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return i()},e.prototype.getLayerStatesArray=function(t){return i()},e.prototype.getExtent=function(){ret
 urn this.get(un)},e.prototype.getMaxResolution=function(){return this.get(cn)},e.prototype.getMinResolution=function(){return this.get(pn)},e.prototype.getMinZoom=function(){return this.get(fn)},e.prototype.getMaxZoom=function(){return this.get(dn)},e.prototype.getOpacity=function(){return this.get(an)},e.prototype.getSourceState=function(){return i()},e.prototype.getVisible=function(){return this.get(ln)},e.prototype.getZIndex=function(){return this.get(hn)},e.prototype.setExtent=function(t){this.set(un,t)},e.prototype.setMaxResolution=function(t){this.set(cn,t)},e.prototype.setMinResolution=function(t){this.set(pn,t)},e.prototype.setMaxZoom=function(t){this.set(dn,t)},e.prototype.setMinZoom=function(t){this.set(fn,t)},e.prototype.setOpacity=function(t){lt("number"==typeof t,64),this.set(an,t)},e.prototype.setVisible=function(t){this.set(ln,t)},e.prototype.setZIndex=function(t){this.set(hn,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=n
 ull),t.prototype.disposeInternal.call(this)},e}(et),_n="prerender",vn="postrender",xn="precompose",wn="postcompose",bn="rendercomplete",Sn="undefined",Tn="loading",Cn="ready",En="error",Rn=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Pn(t,e){if(!t.visible)return!1;var r=e.resolution;if(r<t.minResolution||r>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}var In=function(t){function e(e){var r=this,i=T({},e);delete i.source,(r=t.call(this,i)||this).mapPrecomposeKey_=null,r.mapRenderKey_=null,r.sourceChangeKey_=null,r.renderer_=null,e.render&&(r.render=e.render),e.map&&r.setMap(e.map),r.addEventListener(tt(gn),r.handleSourcePropertyChange_);var n=e.source?e.source:null;retur
 n r.setSource(n),r}return Rn(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(gn)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Sn},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(X(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=W(t,O,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var r=this.getRenderer();if(r.prepareFrame(t))return r.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(X(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(X(this.mapRenderKey_),this.
 mapRenderKey_=null),t&&(this.mapPrecomposeKey_=W(t,xn,(function(t){var e=t.frameState.layerStatesArray,r=this.getLayerState(!1);lt(!e.some((function(t){return t.layer===r.layer})),67),e.push(r)}),this),this.mapRenderKey_=W(this,O,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(gn,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(mn),On=function(){function t(){}return t.prototype.drawCustom=function(t,e,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=fun
 ction(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();function Ln(t){return Array.isArray(t)?rn(t):t}var Mn="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Fn=-1!==Mn.indexOf("firefox"),An=(-1!==Mn.indexOf("safari")&&Mn.indexOf("chrom"),-1!==Mn.indexOf("webkit")&&-1==Mn.indexOf("edge")),kn=-1!==Mn.indexOf("macintosh"),Nn="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,jn="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Dn="undefined"!=typeof Image&&Image.prototype.decode,Gn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEven
 tListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function zn(t,e,r){var i=r&&r.length?r.shift():jn?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(i.width=t),e&&(i.height=e),i.getContext("2d")}function Bn(t){var e=t.offsetWidth,r=getComputedStyle(t);return e+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10)}function Un(t){var e=t.offsetHeight,r=getComputedStyle(t);return e+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10)}function Yn(t,e){var r=e.parentNode;r&&r.replaceChild(t,e)}function Wn(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Vn(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var Xn=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:
 \\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),qn=["style","variant","weight","size","lineHeight","family"],Zn=function(t){var e=t.match(Xn);if(!e)return null;for(var r={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,n=qn.length;i<n;++i){var o=e[i+1];void 0!==o&&(r[qn[i]]=o)}return r.families=r.family.split(/,\s?/),r},Kn=[],Hn=[0,0,0,0],Jn=new et,$n=new I;$n.setSize=function(){console.warn("labelCache is deprecated.")};var Qn,to,eo,ro=null,io={},no=function(){var t,e,r=["monospace","serif"],i=r.length,n="wmytzilWMYTZIL@#/&?$%10";function o(t,o,s){for(var a=!0,l=0;l<i;++l){var u=r[l];if(e=ao(t+" "+o+" 32px "+u,n),s!=u){var h=ao(t+" "+o+" 32px "+s+","+u,n);a=a&&h!=e}}return!!a}function s(){for(var e=!0,r=Jn.getKeys(),i=0,n=r.length;i<n;++i){var s=r[i];Jn.get(s)<100&&(o.apply(this,s.split("\n"))?(C(io),ro=null,Qn=void 0,Jn.set(s,100)):(Jn.set(s,Jn.get(s)+1,!0),e=!1))}e&&(clearInterva
 l(t),t=void 0)}return function(e){var r=Zn(e);if(r)for(var i=r.families,n=0,a=i.length;n<a;++n){var l=i[n],u=r.style+"\n"+r.weight+"\n"+l;void 0===Jn.get(u)&&(Jn.set(u,100,!0),o(r.style,r.weight,l)||(Jn.set(u,0,!0),void 0===t&&(t=setInterval(s,32))))}}}(),oo=(eo=io,function(t){var e=eo[t];if(null==e)if(jn){var r=Zn(t),i=so(t,"Žg"),n=isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight);io[t]=n*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else to||((to=document.createElement("div")).innerHTML="M",to.style.margin="0 !important",to.style.padding="0 !important",to.style.position="absolute !important",to.style.left="-99999px !important"),to.style.font=t,document.body.appendChild(to),e=to.offsetHeight,eo[t]=e,document.body.removeChild(to);return e});function so(t,e){return ro||(ro=zn(1,1)),t!=Qn&&(ro.font=t,Qn=ro.font),ro.measureText(e)}function ao(t,e){return so(t,e).width}function lo(t,e,r){if(e in r)return r[e];var i=ao(t,e);return r[e]=i,i}function uo(t,e,r,i){0!==e&&(t.tran
 slate(r,i),t.rotate(e),t.translate(-r,-i))}function ho(t,e,r,i,n,o,s,a,l,u,h){t.save(),1!==r&&(t.globalAlpha*=r),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,u),t.scale(h[0],h[1]),function(t,e){for(var r=t.contextInstructions,i=0,n=r.length;i<n;i+=2)Array.isArray(r[i+1])?e[r[i]].apply(e,r[i+1]):e[r[i]]=r[i+1]}(i,t)):h[0]<0||h[1]<0?(t.translate(l,u),t.scale(h[0],h[1]),t.drawImage(i,n,o,s,a,0,0,s,a)):t.drawImage(i,n,o,s,a,l,u,s*h[0],a*h[1]),t.restore()}var co=null;function po(t){return jn?Rt(t):(co||(co=zn(1,1).canvas),co.style.transform=Rt(t),co.style.transform)}var fo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),go=function(t){function e(e,r,i,n,o,s,a){var l=t.call(this)||this;return
  l.context_=e,l.pixelRatio_=r,l.extent_=i,l.transform_=n,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return fo(e,t),e.prototype.drawImages_=function(t,e,r,i){if(this.image_){var n=Nr(t,e,r,2,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var 
 u=0,h=n.length;u<h;u+=2){var c=n[u]-this.imageAnchorX_,p=n[u+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=c+this.imageAnchorX_,f=p+this.imageAnchorY_;Ct(s,d,f,1,1,l,-d,-f),o.setTransform.apply(o,s),o.translate(d,f),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,r,i){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var n=Nr(t,e,r,i,this.transform_,this.pixelC
 oordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<r;e+=i){var a=n[e]+this.textOffsetX_,l=n[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var u=Ct(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,u),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,r,i,n){var o=this.context_,s=Nr(t,e,r,i,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;n&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return n&&o.closePath(),r},e.prototype.drawRings_=function(t,e,r,i){for(var n=0,o=r.length;n<o;++n)e=this.moveToLineTo_(t,e,r[n],i,!0);return e},e.prototype.drawCircle=function(t){if(ge(th
 is.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,r){var i=t.getFlatCoordinates();if(i){var n=t.getStride();return Nr(i,0,i.length,n,e,r)}return null}(t,this.transform_,this.pixelCoordinates_),r=e[2]-e[0],i=e[3]-e[1],n=Math.sqrt(r*r+i*i),o=this.context_;o.beginPath(),o.arc(e[0],e[1],n,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case gt.POINT:this.drawPoint(t);break;case gt.LINE_STRING:this.drawLineString(t);break;case gt.POLYGON:this.drawPolygon(t);break;case gt.MULTI_POINT:this.drawMultiP
 oint(t);break;case gt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case gt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case gt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case gt.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var r=e.getGeometryFunction()(t);r&&ge(this.extent_,r.getExtent())&&(this.setStyle(e),this.drawGeometry(r))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),r=0,i=e.length;r<i;++r)this.drawGeometry(e[r])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""
 !==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ge(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,r=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(r,0,r.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var i=t.getFlatMidpoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(ge(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var r=this.context_,i=t.getFlatCoordinates(),n=0,o=t.getEnds(),s=t.getStride();r.beginPath();for(var a=0,l=o.length;a<l;++a)n=this.moveToLineTo_(i,n,o[a],s,!1);r.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPo
 lygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ge(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var r=t.getFlatInteriorPoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ge(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,r=t.getOrientedFlatCoordinates(),i=0,n=t.getEndss(),o=t.getStride();e.beginPath();for(
 var s=0,a=n.length;s<a;++s){var l=n[s];i=this.drawRings_(r,i,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,r=this.contextFillState_;r?r.fillStyle!=t.fillStyle&&(r.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,r=this.contextStrokeState_;r?(r.lineCap!=t.lineCap&&(r.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(v(r.lineDash,t.lineDash)||e.setLineDash(r.lineDash=t.lineDash),r.lineDashOffset!=t.lineDashOffset&&(r.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),r.lineJoin!=t.lineJoin&&(r.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),r.lineWidth!=t.lineWidth&&(r.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),r.miterLimit!=t.miterLimit&&(r.miterLimit=t.miterLimit
 ,e.miterLimit=t.miterLimit),r.strokeStyle!=t.strokeStyle&&(r.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,r=this.contextTextState_,i=t.textAlign?t.textAlign:"center";r?(r.font!=t.font&&(r.font=t.font,e.font=t.font),r.textAlign!=i&&(r.textAlign=i,e.textAlign=i),r.textBaseline!=t.textBaseline&&(r.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=functio
 n(t,e){if(t){var r=t.getColor();this.fillState_={fillStyle:Ln(r||"#000")}}else this.fillState_=null;if(e){var i=e.getColor(),n=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),u=e.getMiterLimit();this.strokeState_={lineCap:void 0!==n?n:"round",lineDash:o||Kn,lineDashOffset:s||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==l?l:1),miterLimit:void 0!==u?u:10,strokeStyle:Ln(i||"#000")}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getSize();if(e){var r=t.getAnchor(),i=t.getImage(1),n=t.getOrigin(),o=t.getScaleArray();this.imageAnchorX_=r[0],this.imageAnchorY_=r[1],this.imageHeight_=e[1],this.image_=i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_*o[0],this.pixelRatio_*o[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null}
 ,e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var r=e.getColor();this.textFillState_={fillStyle:Ln(r||"#000")}}else this.textFillState_=null;var i=t.getStroke();if(i){var n=i.getColor(),o=i.getLineCap(),s=i.getLineDash(),a=i.getLineDashOffset(),l=i.getLineJoin(),u=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:"round",lineDash:s||Kn,lineDashOffset:a||0,lineJoin:void 0!==l?l:"round",lineWidth:void 0!==u?u:1,miterLimit:void 0!==h?h:10,strokeStyle:Ln(n||"#000")}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),g=t.getRotation(),y=t.getScaleArray(),m=t.getText(),_=t.getTextAlign(),v=t.getTextBaseline();this.textState_={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==_?_:"center",textBaseline:void 0!==v?v:"middle"},this.text_=void 0!==m?m:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!
 ==f&&f,this.textRotation_=void 0!==g?g:0,this.textScale_=[this.pixelRatio_*y[0],this.pixelRatio_*y[1]]}else this.text_=""},e}(On),yo="Circle",mo="Default",_o="Image",vo="LineString",xo="Polygon",wo="Text",bo=0,So=1,To=2,Co=3,Eo=4,Ro={Point:function(t,e,r,i){var n=r.getImage();if(n){if(n.getImageState()!=To)return;var o=t.getBuilder(r.getZIndex(),_o);o.setImageStyle(n,t.addDeclutter(!1)),o.drawPoint(e,i)}var s=r.getText();if(s){var a=t.getBuilder(r.getZIndex(),wo);a.setTextStyle(s,t.addDeclutter(!!n)),a.drawText(e,i)}},LineString:function(t,e,r,i){var n=r.getStroke();if(n){var o=t.getBuilder(r.getZIndex(),vo);o.setFillStrokeStyle(null,n),o.drawLineString(e,i)}var s=r.getText();if(s){var a=t.getBuilder(r.getZIndex(),wo);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,i)}},Polygon:function(t,e,r,i){var n=r.getFill(),o=r.getStroke();if(n||o){var s=t.getBuilder(r.getZIndex(),xo);s.setFillStrokeStyle(n,o),s.drawPolygon(e,i)}var a=r.getText();if(a){var l=t.getBuilder(r.getZIndex(),wo);l.
 setTextStyle(a,t.addDeclutter(!1)),l.drawText(e,i)}},MultiPoint:function(t,e,r,i){var n=r.getImage();if(n){if(n.getImageState()!=To)return;var o=t.getBuilder(r.getZIndex(),_o);o.setImageStyle(n,t.addDeclutter(!1)),o.drawMultiPoint(e,i)}var s=r.getText();if(s){var a=t.getBuilder(r.getZIndex(),wo);a.setTextStyle(s,t.addDeclutter(!!n)),a.drawText(e,i)}},MultiLineString:function(t,e,r,i){var n=r.getStroke();if(n){var o=t.getBuilder(r.getZIndex(),vo);o.setFillStrokeStyle(null,n),o.drawMultiLineString(e,i)}var s=r.getText();if(s){var a=t.getBuilder(r.getZIndex(),wo);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,i)}},MultiPolygon:function(t,e,r,i){var n=r.getFill(),o=r.getStroke();if(o||n){var s=t.getBuilder(r.getZIndex(),xo);s.setFillStrokeStyle(n,o),s.drawMultiPolygon(e,i)}var a=r.getText();if(a){var l=t.getBuilder(r.getZIndex(),wo);l.setTextStyle(a,t.addDeclutter(!1)),l.drawText(e,i)}},GeometryCollection:function(t,e,r,i){var n,o,s=e.getGeometriesArray();for(n=0,o=s.length;n<o;++n){
 (0,Ro[s[n].getType()])(t,s[n],r,i)}},Circle:function(t,e,r,i){var n=r.getFill(),o=r.getStroke();if(n||o){var s=t.getBuilder(r.getZIndex(),yo);s.setFillStrokeStyle(n,o),s.drawCircle(e,i)}var a=r.getText();if(a){var l=t.getBuilder(r.getZIndex(),wo);l.setTextStyle(a,t.addDeclutter(!1)),l.drawText(e,i)}}};function Po(t,e){return parseInt(o(t),10)-parseInt(o(e),10)}function Io(t,e){var r=Oo(t,e);return r*r}function Oo(t,e){return.5*t/e}function Lo(t,e,r,i,n,o){var s=!1,a=r.getImage();if(a){var l=a.getImageState();l==To||l==Co?a.unlistenImageChange(n):(l==bo&&a.load(),l=a.getImageState(),a.listenImageChange(n),s=!0)}return function(t,e,r,i,n){var o=r.getGeometryFunction()(e);if(!o)return;var s=o.simplifyTransformed(i,n);if(r.getRenderer())!function t(e,r,i,n){if(r.getType()==gt.GEOMETRY_COLLECTION){for(var o=r.getGeometries(),s=0,a=o.length;s<a;++s)t(e,o[s],i,n);return}e.getBuilder(i.getZIndex(),mo).drawCustom(r,n,i.getRenderer())}(t,s,r,e);else{(0,Ro[s.getType()])(t,s,r,e)}}(t,e,r,i,o),s
 }function Mo(t){var e,r=t.frameState,i=wt(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),n=Io(r.viewState.resolution,r.pixelRatio),o=Or();return o&&(e=br(o,r.viewState.projection)),new go(t.context,r.pixelRatio,r.extent,i,r.viewState.rotation,n,e)}function Fo(t,e){e&&e.clear();for(var r=t.declutterItems,i=r.length-1;i>=0;--i)for(var n=r[i],o=n.items,s=0,a=o.length;s<a;s+=3)e=o[s].renderDeclutter(o[s+1],o[s+2],n.opacity,e);return r.length=0,e}var Ao=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function ko(t,e){sn.expire()}var No=function(t){function e(e){var r=t.call(this)||this;return r.map_=e,r.declutterTree_=null,r}return Ao(e,t),e.prototype.dispatchRenderEvent=function(t,e){i()},e.proto
 type.calculateMatrices2D=function(t){var e=t.viewState,r=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;Ct(r,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Et(i,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n,o,s,a){var l,u=e.viewState;function h(t,e,r){return n.call(o,e,t?r:null)}var c=u.projection,p=hr(t.slice(),c),d=[[0,0]];if(c.canWrapX()&&i){var f=fe(c.getExtent());d.push([-f,0],[f,0])}var g,y=e.layerStatesArray,m=y.length;this.declutterTree_&&(g=this.declutterTree_.all().map((function(t){return t.value})));for(var _=[],v=0;v<d.length;v++)for(var x=m-1;x>=0;--x){var w=y[x],b=w.layer;if(b.hasRenderer()&&Pn(w,u)&&s.call(a,b)){var S=b.getRenderer(),T=b.getSource();if(S&&T){var C=T.getWrapX()?p:t,E=h.bind(null,w.managed);_[0]=C[0]+d[v][0],_[1]=C[1]+d[v][1],l=S.forEachFeatureAtCoordinate(_,e,r,E,g)}if(l)return l}}},e.prototype.forEachLayerAtPixel=function(t,e,r,n,o){return i()},e.prototype.hasFeatureAtCoordina
 te=function(t,e,r,i,n,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,r,i,w,this,n,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){this.declutterTree_=Fo(t,this.declutterTree_)},e.prototype.scheduleExpireIconCache=function(t){sn.canExpireCache()&&t.postRenderFunctions.push(ko)},e}(p),jo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Do=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.inversePixelTransform=r,o.frameState=i,o.context=n,o}return jo(e,t),e}(h),Go=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]
 )})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),zo=function(t){function e(e){var r=t.call(this,e)||this;r.fontChangeListenerKey_=W(Jn,c,e.redrawText.bind(e)),r.element_=document.createElement("div");var i=r.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",r.element_.className="ol-unselectable ol-layers";var n=e.getViewport();return n.insertBefore(r.element_,n.firstChild||null),r.children_=[],r.renderedVisible_=!0,r}return Go(e,t),e.prototype.dispatchRenderEvent=function(t,e){var r=this.getMap();if(r.hasListener(t)){var i=new Do(t,void 0,e);r.dispatchEvent(i)}},e.prototype.disposeInternal=function(){X(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(e){if(e){this.calculateMatrices2D(e),this.dispatchRenderEvent(xn,e);var r=e.layerStatesArray.sort((function
 (t,e){return t.zIndex-e.zIndex})),i=e.viewState;this.children_.length=0;for(var n=null,o=0,s=r.length;o<s;++o){var a=r[o];if(e.layerIndex=o,Pn(a,i)&&(a.sourceState==Cn||a.sourceState==Sn)){var l=a.layer.render(e,n);l&&l!==n&&(this.children_.push(l),n=l)}}t.prototype.renderFrame.call(this,e),function(t,e){for(var r=t.childNodes,i=0;;++i){var n=r[i],o=e[i];if(!n&&!o)break;n!==o&&(n?o?t.insertBefore(o,n):(t.removeChild(n),--i):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(wn,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,r,i,n){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],u=l.layer;if(u.hasRenderer()&&Pn(l,o)&&n(u)){var h=u.getRenderer().getDataAtPixel(t,e,r);if(h){var c=i(u,h);if(c)return c}}}},e}(No),Bo=function(){var t=fu
 nction(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Uo="layers",Yo=function(t){function e(e){var r=this,i=e||{},n=T({},i);delete n.layers;var o=i.layers;return(r=t.call(this,n)||this).layersListenerKeys_=[],r.listenerKeys_={},r.addEventListener(tt(Uo),r.handleLayersChanged_),o?Array.isArray(o)?o=new at(o.slice(),{unique:!0}):lt("function"==typeof o.getArray,43):o=new at(void 0,{unique:!0}),r.setLayers(o),r}return Bo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(X),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(W(t,rt,this.handleLayersAdd_,this),W(t,it,this.handleLayersRemove_,this)),th
 is.listenerKeys_)this.listenerKeys_[e].forEach(X);C(this.listenerKeys_);for(var r=t.getArray(),i=0,n=r.length;i<n;i++){var s=r[i];this.listenerKeys_[o(s)]=[W(s,c,this.handleLayerChange_,this),W(s,O,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[o(e)]=[W(e,c,this.handleLayerChange_,this),W(e,O,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=o(t.element);this.listenerKeys_[e].forEach(X),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(Uo)},e.prototype.setLayers=function(t){this.set(Uo,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],r=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));for(var i=this.getLayerState(),n=r,o=e.length;n<o;n++){var s
 =e[n];s.opacity*=i.opacity,s.visible=s.visible&&i.visible,s.maxResolution=Math.min(s.maxResolution,i.maxResolution),s.minResolution=Math.max(s.minResolution,i.minResolution),s.minZoom=Math.max(s.minZoom,i.minZoom),s.maxZoom=Math.min(s.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==s.extent?s.extent=ce(s.extent,i.extent):s.extent=i.extent)}return e},e.prototype.getSourceState=function(){return Cn},e}(mn),Wo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Vo=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.map=r,n.frameState=void 0!==i?i:null,n}return Wo(e,t),e}(h),Xo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||
 function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),qo=function(t){function e(e,r,i,n,o){var s=t.call(this,e,r,o)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==n&&n,s}return Xo(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagati
 on.call(this),this.originalEvent.stopPropagation()},e}(Vo),Zo={SINGLECLICK:"singleclick",CLICK:F,DBLCLICK:A,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Ko="pointermove",Ho="pointerdown",Jo="pointerup",$o="pointerout",Qo=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ts=function(t){function e(e,r){var i=t.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=r?r*Nn:Nn,i.down_=null;var n=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=n,i.po
 interdownListenerKey_=W(n,Ho,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=W(n,Ko,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(U,i.boundHandleTouchMove_,!!Gn&&{passive:!1}),i}return Qo(e,t),e.prototype.emulateClick_=function(t){var e=new qo(Zo.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new qo(Zo.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new qo(Zo.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==Zo.POINTERUP||e.type==Zo.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==Zo.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePoin
 ters_(t);var e=new qo(Zo.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new qo(Zo.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.dragListenerKeys_.push(W(document,Zo.POINTERMOVE,this.handlePointerMove_,this),W(document,Zo.POINTERUP,this.handlePointerUp_,this),W(this.element_,Zo.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==document&&this.dragListenerKeys_.push(W(this.element_.getRootNode(),Zo.POINTERUP,this.handlePointerUp_,this)))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=
 !0;var e=new qo(Zo.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new qo(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){this.originalPointerMoveEvent_&&!this.originalPointerMoveEvent_.defaultPrevented||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(X(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(U,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(X(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(I),es="postrender",
 rs="movestart",is="moveend",ns="layergroup",os="size",ss="target",as="view",ls=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,C(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,r=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(r);return delete this.queuedElements_[i],r},t.prototype.enqueue=function(t){lt(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*
 t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,r=this.priorities_,i=e.length,n=e[t],o=r[t],s=t;t<i>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<i&&r[l]<r[a]?l:a;e[t]=e[u],r[t]=r[u],t=u}e[t]=n,r[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var r=this.elements_,i=this.priorities_,n=r[e],o=i[e];e>t;){var s=this.getParentIndex_(e);if(!(i[s]>o))break;r[e]=r[s],i[e]=i[s],e=s}r[e]=n,i[e]=o},t.prototype.reprioritize=function(){var t,e,r,i=this.priorityFunction_,n=this.elements_,o=this.priorities_,s=0,a=n.length;for(e=0;e<a;++e)(r=i(t=n[e]))==1/0?delete this.queuedEle
 ments_[this.keyFunction_(t)]:(o[s]=r,n[s++]=t);n.length=s,o.length=s,this.heapify_()},t}(),us=0,hs=1,cs=2,ps=3,ds=4,fs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),gs=function(t){function e(e,r){var i=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=r,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return fs(e,t),e.prototype.enqueue=function(e){var r=t.prototype.enqueue.call(this,e);r&&e[0].addEventListener(O,this.boundHandleTileChange_);return r},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,r=e.getState();if(e
 .hifi&&r===cs||r===ps||r===ds){e.removeEventListener(O,this.boundHandleTileChange_);var i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var r,i,n=0;this.tilesLoading_<t&&n<e&&this.getCount()>0;)i=(r=this.dequeue()[0]).getKey(),r.getState()!==us||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++n,r.load())},e}(ls);var ys=0,ms=1,_s="center",vs="resolution",xs="rotation";function ws(t,e,r){return function(i,n,o,s){if(i){var a=e?0:o[0]*n,l=e?0:o[1]*n,u=t[0]+a/2,h=t[2]-a/2,c=t[1]+l/2,p=t[3]-l/2;u>h&&(h=u=(h+u)/2),c>p&&(p=c=(p+c)/2);var d=we(i[0],u,h),f=we(i[1],c,p),g=30*n;return s&&r&&(d+=-g*Math.log(1+Math.max(0,u-i[0])/g)+g*Math.log(1+Math.max(0,i[0]-h)/g),f+=-g*Math.log(1+Math.max(0,c-i[1])/g)+g*Math.log(1+Math.max(0,i[1]-p)/g)),[d,f]}}}function bs(t){return t}function Ss(t,e,r,i){var n=fe(e)/r[0],o=he(e)/r[1];return i?Math.min(t,M
 ath.max(n,o)):Math.min(t,Math.min(n,o))}function Ts(t,e,r){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,r&&(i=Math.max(i,r),i/=Math.log(1+50*Math.max(0,r/t-1))/50+1),we(i,r/2,2*e)}function Cs(t,e,r,i,n){return function(o,s,a,l){if(void 0!==o){var u=i?Ss(t,i,a,n):t;return(void 0===r||r)&&l?Ts(o,u,e):we(o,e,u)}}}function Es(t){return void 0!==t?0:void 0}function Rs(t){return void 0!==t?t:void 0}function Ps(t){return Math.pow(t,3)}function Is(t){return 1-Ps(1-t)}function Os(t){return 3*t*t-2*t*t*t}function Ls(t){return t}var Ms=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Fs(t,e){setTimeout((function(){t(e)}),0)}function As(t){return!(t.sourceCenter&&t.targetCenter&&!ir(t.sou
 rceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var ks=function(t){function e(e){var r=t.call(this)||this,i=T({},e);return r.hints_=[0,0],r.animations_=[],r.updateAnimationKey_,r.projection_=_r(i.projection,"EPSG:3857"),r.viewportSize_=[100,100],r.targetCenter_=null,r.targetResolution_,r.targetRotation_,r.cancelAnchor_=void 0,i.center&&(i.center=Mr(i.center,r.projection_)),i.extent&&(i.extent=Ar(i.extent,r.projection_)),r.applyOptions_(i),r}return Ms(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,r,i,n=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,h=_r(t.projection,"EPSG:3857"),c=h.getExtent(),p=t.constrainOnlyCenter,d=t.extent;a||d||!h.isGlobal()||(p=!1,d=c);if(void 0!==t.resolutions){var f=t.res
 olutions;r=f[n],i=void 0!==f[o]?f[o]:f[f.length-1],e=t.constrainResolution?function(t,e,r,i){return function(n,o,s,a){if(void 0!==n){var l=t[0],u=t[t.length-1],h=r?Ss(l,r,s,i):l;if(a)return void 0===e||e?Ts(n,h,u):we(n,u,h);var c=Math.min(h,n),p=Math.floor(g(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(f,l,!p&&d,u):Cs(r,i,l,!p&&d,u)}else{var y=(c?Math.max(fe(c),he(c)):360*mt[_t.DEGREES]/h.getMetersPerUnit())/256/Math.pow(2,0),m=y/Math.pow(2,28);void 0!==(r=t.maxResolution)?n=0:r=y/Math.pow(s,n),void 0===(i=t.minResolution)&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?r/Math.pow(s,o):y/Math.pow(s,o):m),o=n+Math.floor(Math.log(r/i)/Math.log(s)),i=r/Math.pow(s,o-n),e=t.constrainResolution?function(t,e,r,i,n,o){return function(s,a,l,u){if(void 0!==s){var h=n?Ss(e,n,l,o):e,c=void 0!==r?r:0;if(u)return void 0===i||i?Ts(s,h,c):we(s,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),d=-a*(.5-1e-9)+.5,f=Math.min(h,s),g=Math.floor(Math.log(e/f)/Math.log(t)+d),y=Math.max(p,g);return
  we(e/Math.pow(t,y),c,h)}}}(s,r,i,l,!p&&d,u):Cs(r,i,l,!p&&d,u)}return{constraint:e,maxResolution:r,minResolution:i,minZoom:n,zoomFactor:s}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=e.minZoom;var r=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return ws(t.extent,t.constrainOnlyCenter,e)}var r=_r(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&r.isGlobal()){var i=r.getExtent().slice();return i[0]=-1/0,i[2]=1/0,ws(i,!1,!1)}return bs}(t),i=e.constraint,n=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=n||Re(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?Rs:"number"==typeof e?(r=e,i=2*Math.PI/r,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):Rs}return Es;var r,i;var n,o}(t);this.constraints_={center:r,resolution:i,
 rotation:n},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=T({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),T({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),r=0;r<e.length;++r){var i=arguments[r];i.center&&((i=T({},i)).center=Mr(i.center,this.getProjection())),i.anchor&&((i=T({},i)).anchor=Mr(i.anchor,this.getProjection())),e[r]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,r=arguments.length;if(r>1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r),!this.isDef()){var i=arguments[r-1];retu
 rn i.center&&this.setCenterInternal(i.center),void 0!==i.zoom&&this.setZoom(i.zoom),void 0!==i.rotation&&this.setRotation(i.rotation),void(e&&Fs(e,!0))}for(var n=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_,l=[],u=0;u<r;++u){var h=arguments[u],c={start:n,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||Os,callback:e};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center.slice(),o=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=s,c.targetResolution=this.getResolutionForZoom(h.zoom),s=c.targetResolution):h.resolution&&(c.sourceResolution=s,c.targetResolution=h.resolution,s=c.targetResolution),void 0!==h.rotation){c.sourceRotation=a;var p=Pe(h.rotation-a+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=a+p,a=c.targetRotation}As(c)?c.complete=!0:n+=c.duration,l.push(c)}this.animations_.push(l),this.setHint(ys,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[ys]>0},e.prot
 otype.getInteracting=function(){return this.hints_[ms]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(ys,-this.hints_[ys]);for(var e=0,r=this.animations_.length;e<r;++e){var i=this.animations_[e];if(i[0].callback&&Fs(i[0].callback,!1),!t)for(var n=0,o=i.length;n<o;++n){var s=i[n];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,r=this.animations_.length-1;r>=0;--r){for(var i=this.animations_[r],n=!0,o=0,s=i.length;o<s;++o){var a=i[o];if(!a.complete){var l=t-a.start,u=a.duration>0?l/a.duration:1;u>=1?(a.complete=!0,u=1):n=!1;var h=a.easing(u);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],d=c+h*(a.targetCenter[0]-c),f=p+h*(a.targetCenter[1]-p);this.targetCenter_=[d,f]}if(a.sourceResolution&&a.targetResolution){var g=
 1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var y=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(g,0,y,!0);this.targetCenter_=this.calculateCenterZoom(m,a.anchor)}this.targetResolution_=g,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var _=1===h?Pe(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var v=this.constraints_.rotation(_,!0);this.targetCenter_=this.calculateCenterRotate(v,a.anchor)}this.targetRotation_=_}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(n){this.animations_[r]=null,this.setHint(ys,-1);var x=i[0].callback;x&&Fs(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var r,i=this.getCenterInternal();retu
 rn void 0!==i&&(nr(r=[i[0]-e[0],i[1]-e[1]],t-this.getRotation()),Qe(r,e)),r},e.prototype.calculateCenterZoom=function(t,e){var r,i=this.getCenterInternal(),n=this.getResolution();void 0!==i&&void 0!==n&&(r=[e[0]-t*(e[0]-i[0])/n,e[1]-t*(e[1]-i[1])/n]);return r},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var r=e[0],i=e[1];return[Math.abs(r*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(r*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Lr(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(_s)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0
 ],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return Fr(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),r=this.getCenterInternal();lt(r,1);var i=this.getResolution();lt(void 0!==i,2);var n=this.getRotation();return lt(void 0!==n,3),ue(r,i,n,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.proto
 type.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(vs)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Ar(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var r=e||this.getViewportSize_(),i=fe(t)/r[0],n=he(t)/r[1];return Math.max(i,n)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(r/i)/Math.log(e);return function(t){return r/Math.pow(e,t*n)}},e.prototype.getRotation=function(){return this.get(xs)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(r/i)/e;return function(t){return Math.log(r/t)/e/n}},e.prototype.getState=function(){var t=this.getCenterInternal(),e=this.getPr
 ojection(),r=this.getResolution(),i=this.getRotation();return{center:t.slice(0),projection:void 0!==e?e:null,resolution:r,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,r,i=this.minZoom_||0;if(this.resolutions_){var n=g(this.resolutions_,t,1);i=n,e=this.resolutions_[n],r=n==this.resolutions_.length-1?2:e/this.resolutions_[n+1]}else e=this.maxResolution_,r=this.zoomFactor_;return i+Math.log(e/t)/Math.log(r)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=we(Math.floor(t),0,this.resolutions_.length-2),r=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(r,we(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var r,i=T({size:this.getViewportSize_()},e||{});if(lt(Array.isArray(t)||"fu
 nction"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))lt(!ye(t),25),r=Oi(n=Ar(t,this.getProjection()));else if(t.getType()===gt.CIRCLE){var n;(r=Oi(n=Ar(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),ae(n))}else{var o=Or();r=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(r,i)},e.prototype.fitInternal=function(t,e){var r=e||{},i=r.size;i||(i=this.getViewportSize_());var n,o=void 0!==r.padding?r.padding:[0,0,0,0],s=void 0!==r.nearest&&r.nearest;n=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.getResolutionForZoom(r.maxZoom):0;for(var a=t.getFlatCoordinates(),l=this.getRotation(),u=Math.cos(-l),h=Math.sin(-l),c=1/0,p=1/0,d=-1/0,f=-1/0,g=t.getStride(),y=0,m=a.length;y<m;y+=g){var _=a[y]*u-a[y+1]*h,v=a[y]*h+a[y+1]*u;c=Math.min(c,_),p=Math.min(p,v),d=Math.max(d,_),f=Math.max(f,v)}var x=this.getResolutionForExtentInternal([c,p,d,f],[i[0]-o[1]-o[3],i[1]-o[0]-o[2]]);x=isNaN(x)?n:Math.max(x,n),x=this.getConstrainedResolution(x,s?0:1)
 ,h=-h;var w=(c+d)/2,b=(p+f)/2,T=[(w+=(o[1]-o[3])/2*x)*u-(b+=(o[0]-o[2])/2*x)*h,b*u+w*h],C=r.callback?r.callback:S;void 0!==r.duration?this.animateInternal({resolution:x,center:this.getConstrainedCenter(T,x),duration:r.duration,easing:r.easing},C):(this.targetResolution_=x,this.targetCenter_=T,this.applyTargetState_(!1,!0),Fs(C,!0))},e.prototype.centerOn=function(t,e,r){this.centerOnInternal(Mr(t,this.getProjection()),e,r)},e.prototype.centerOnInternal=function(t,e,r){var i=this.getRotation(),n=Math.cos(-i),o=Math.sin(-i),s=t[0]*n-t[1]*o,a=t[1]*n+t[0]*o,l=this.getResolution(),u=(s+=(e[0]/2-r[0])*l)*n-(a+=(r[1]-e[1]/2)*l)*(o=-o),h=a*n+s*o;this.setCenterInternal([u,h])},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Lr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[
 0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var r=e&&Mr(e,this.getProjection());this.adjustResolutionInternal(t,r)},e.prototype.adjustResolutionInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),n=this.constraints_.resolution(this.targetResolution_*t,0,i,r);e&&(this.targetCenter_=this.calculateCenterZoom(n,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=Mr(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,r);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(Mr(t,this.getProjection()))},e.prot
 otype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var r=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,r),n=this.getViewportSize_(i),o=this.constraints_.resolution(this.targetResolution_,0,n,r),s=this.constraints_.center(this.targetCenter_,o,n,r);this.get(xs)!==i&&this.set(xs,i),this.get(vs)!==o&&this.set(vs,o),this.get(_s)&&ir(this.get(_s),s)||this.set(_s,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,r){var i=void 0!==t?t:200,n=e||0,o=this.con
 straints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,n,s),l=this.constraints_.center(this.targetCenter_,a,s);if(0===i&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=r||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&ir(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:i,easing:Is,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(ms,1)},e.prototype.endInteraction=function(t,e,r){var i=r&&Mr(r,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,r){this.setHint(ms,-1),this.resolveConstraints(t,e,r)},e.prototype.getConstrainedCenter=function(t,e){var r=this.getViewp
 ortSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),r)},e.prototype.getConstrainedZoom=function(t,e){var r=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(r,e))},e.prototype.getConstrainedResolution=function(t,e){var r=e||0,i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,r,i)},e}(et);function Ns(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]+2*e,r[1]=t[1]+2*e,r}function js(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]*e+.5|0,r[1]=t[1]*e+.5|0,r}function Ds(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Gs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();var zs=function(t){
 function e(e){var r=t.call(this)||this,i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var r,i,n,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Yo({layers:t.layers});o[ns]=s,o[ss]=t.target,o[as]=void 0!==t.view?t.view:new ks,void 0!==t.controls&&(Array.isArray(t.controls)?r=new at(t.controls.slice()):(lt("function"==typeof t.controls.getArray,47),r=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new at(t.interactions.slice()):(lt("function"==typeof t.interactions.getArray,48),i=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?n=new at(t.overlays.slice()):(lt("function"==typeof t.overlays.getArray,49),n=t.overlays):n=new at;return{controls:r,interactions:i,keyboardEventTarget:e,overlays:n,values:o}}(e);return r.boundHandleBrowserEvent_=r.handleBrowserEvent.bind(r),r.maxTilesLoading_=void 0!==e.maxTilesLoadin
 g?e.maxTilesLoading:16,r.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:Nn,r.postRenderTimeoutHandle_,r.animationDelayKey_,r.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(r),r.coordinateToPixelTransform_=[1,0,0,1,0,0],r.pixelToCoordinateTransform_=[1,0,0,1,0,0],r.frameIndex_=0,r.frameState_=null,r.previousExtent_=null,r.viewPropertyListenerKey_=null,r.viewChangeListenerKey_=null,r.layerGroupPropertyListenerKeys_=null,r.viewport_=document.createElement("div"),r.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),r.viewport_.style.position="relative",r.viewport_.style.overflow="hidden",r.viewport_.style.width="100%",r.viewport_.style.height="100%",r.overlayContainer_=document.createElement("div"),r.overlayContainer_.style.position="absolute",r.overlayContainer_.style.zIndex="0",r.overlayContainer_.style.width="100%",r.overlayContainer_.style.height="100%",r.overlayContainer_.style.pointerEvents="none",r.overlayCont
 ainer_.className="ol-overlaycontainer",r.viewport_.appendChild(r.overlayContainer_),r.overlayContainerStopEvent_=document.createElement("div"),r.overlayContainerStopEvent_.style.position="absolute",r.overlayContainerStopEvent_.style.zIndex="0",r.overlayContainerStopEvent_.style.width="100%",r.overlayContainerStopEvent_.style.height="100%",r.overlayContainerStopEvent_.style.pointerEvents="none",r.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",r.viewport_.appendChild(r.overlayContainerStopEvent_),r.mapBrowserEventHandler_=null,r.moveTolerance_=e.moveTolerance,r.keyboardEventTarget_=i.keyboardEventTarget,r.keyHandlerKeys_=null,r.controls=i.controls||new at,r.interactions=i.interactions||new at,r.overlays_=i.overlays,r.overlayIdIndex_={},r.renderer_=null,r.handleResize_,r.postRenderFunctions_=[],r.tileQueue_=new gs(r.getTilePriority.bind(r),r.handleTileChange_.bind(r)),r.addEventListener(tt(ns),r.handleLayerGroupChanged_),r.addEventListener(tt(as),r.handleViewChang
 ed_),r.addEventListener(tt(os),r.handleSizeChanged_),r.addEventListener(tt(ss),r.handleTargetChanged_),r.setProperties(i.values),r.controls.forEach(function(t){t.setMap(this)}.bind(r)),r.controls.addEventListener(rt,function(t){t.element.setMap(this)}.bind(r)),r.controls.addEventListener(it,function(t){t.element.setMap(null)}.bind(r)),r.interactions.forEach(function(t){t.setMap(this)}.bind(r)),r.interactions.addEventListener(rt,function(t){t.element.setMap(this)}.bind(r)),r.interactions.addEventListener(it,function(t){t.element.setMap(null)}.bind(r)),r.overlays_.forEach(r.addOverlayInternal_.bind(r)),r.overlays_.addEventListener(rt,function(t){this.addOverlayInternal_(t.element)}.bind(r)),r.overlays_.addEventListener(it,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(r)),r}return Gs(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addContro
 l=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,r){if(this.frameState_){var i=this.getCoordinateFromPixelInternal(t),n=void 0!==(r=void 0!==r?r:{}).hitTolerance?r.hitTolerance*this.frameState_.pixelRatio:0,o=void 0!==r.layerFilter?r.layerFilter:w,s=!1!==r.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,n,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var r=[];return this.forEachFeatureAtPixel(t,(function(t){r.push(t)}),e),r},e.prototype.forEachLayerAtPixel=function(
 t,e,r){if(this.frameState_){var i=r||{},n=void 0!==i.hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,o=i.layerFilter||w;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,n,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:w,n=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,n,o,i,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),r="changedTouches"in t?t.changedTouches[0]:t;return[r.clientX-e.left,r.clientY-e.top]},e.prototype.getTarget=function(){return this.get(ss)},e.pro
 totype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Lr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?St(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(ns)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,r=t.length;e<r;++e){var i=t[e].layer.getSource();if(i&&i.loading)return!0}return!1},e.prototy
 pe.getPixelFromCoordinate=function(t){var e=Mr(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?St(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(os)},e.prototype.getView=function(){return this.get(as)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getTilePriority=function(t,e,r,i){return function(t,e,r,i,n){if(!(t&&r in t.wantedTiles))return 1/0;if(!t.wantedTiles[r][e.getKey()])return 1/0;var o=t.viewState.center,s=i[0]-o[0],a=i[1]-o[1];return 65536*Math.log(n)+Math.sqrt(s*s+a*a)/n}(this.frameState_,t,e,r,i)},e.prototype.handleBrowserEvent=function(t,e){var r=e||t.type,i=ne
 w qo(r,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,r=e.type;if(r===Ho||r===Y||r===D){var i=this.viewport_.getRootNode?this.viewport_.getRootNode():document,n=i===document?e.target:i.elementFromPoint(e.clientX,e.clientY);if(!i.contains(n)||this.overlayContainerStopEvent_.contains(n))return}t.frameState=this.frameState_;var o=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var s=o.length-1;s>=0;s--){var a=o[s];if(a.getActive())if(!a.handleEvent(t))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var r=this.maxTilesLoading_,i=r;if(t){var n=t.viewHints;if(n[ys]||n[ms]){var o=!Dn&&Date.now()-t.time>8;r=o?0:8,i=o?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,i))}!t||!this.hasListener(bn)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(bn,t);for(var s=this.post
 RenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(t){var e;if(this.getTarget()&&(e=this.getTargetElement()),t.oldValue){for(var r=0,i=this.keyHandlerKeys_.length;r<i;++r)X(this.keyHandlerKeys_[r]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(M,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Y,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(B,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),Wn(this.viewport_)}if(e){for(var n in e.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new ts(this,this.moveTolerance_),Zo)this.mapBrowserEventHandler_.addEventListener(Zo[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addE
 ventListener(M,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Y,this.boundHandleBrowserEvent_,!!Gn&&{passive:!1});var o=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.keyHandlerKeys_=[W(o,D,this.handleBrowserEvent,this),W(o,G,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(B,this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(X(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(X(this.viewChangeListenerKey
 _),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=W(t,c,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=W(t,O,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(X),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[W(t,c,this.render,this),W(t,O,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,r=t.length;e<r;++e){var i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.re
 nderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this.getSize(),r=this.getView(),i=this.frameState_,n=null;if(void 0!==e&&function(t){return t[0]>0&&t[1]>0}(e)&&r&&r.isDef()){var o=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=r.getState();n={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterItems:i?i.declutterItems:[],extent:ue(s.center,s.resolution,s.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:
 this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:o,wantedTiles:{}}}if(this.frameState_=n,this.renderer_.renderFrame(n),n){if(n.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,n.postRenderFunctions),i)(!this.previousExtent_||!ye(this.previousExtent_)&&!Jt(n.extent,this.previousExtent_))&&(this.dispatchEvent(new Vo(rs,this,i)),this.previousExtent_=Zt(this.previousExtent_));this.previousExtent_&&!n.viewHints[ys]&&!n.viewHints[ms]&&!Jt(n.extent,this.previousExtent_)&&(this.dispatchEvent(new Vo(is,this,n)),zt(n.extent,this.previousExtent_))}this.dispatchEvent(new Vo(es,this,n)),this.postRenderTimeoutHandle_=setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(ns,t)},e.prototype.setSize=function(t){this.set(os,t)},e.prototype.setTarget=function(t){this.set(ss,t)},e.prototype.setView=function(t){this.set(as,t)},e.prototype.updateSize=functi
 on(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,r=getComputedStyle(this.viewport_);r.width&&r.height&&(e=[parseInt(r.width,10),parseInt(r.height,10)]),t.setViewportSize(e)}},e}(et),Bs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Us=function(t){function e(e){var r=t.call(this)||this,i
 =e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),r.element=i||null,r.target_=null,r.map_=null,r.listenerKeys=[],e.render&&(r.render=e.render),e.target&&r.setTarget(e.target),r}return Bs(e,t),e.prototype.disposeInternal=function(){Wn(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&Wn(this.element);for(var e=0,r=this.listenerKeys.length;e<r;++e)X(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==S&&this.listenerKeys.push(W(t,es,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(et),Ys=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e)
 {for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ws=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).ulElement_=document.createElement("ul"),r.collapsed_=void 0===i.collapsed||i.collapsed,r.overrideCollapsible_=void 0!==i.collapsible,r.collapsible_=void 0===i.collapsible||i.collapsible,r.collapsible_||(r.collapsed_=!1);var n=void 0!==i.className?i.className:"ol-attribution",o=void 0!==i.tipLabel?i.tipLabel:"Attributions",s=void 0!==i.collapseLabel?i.collapseLabel:"»";"string"==typeof s?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=s):r.collapseLabel_=s;var a=void 0!==i.label?i.label:"i";"string"==typeof a?(r.label_=document.createElement("span"),r.label_.textContent=a):r.label_=a;var l=r.collapsible_&&!r.collapsed_?r.coll
 apseLabel_:r.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=o,u.appendChild(l),u.addEventListener(F,r.handleClick_.bind(r),!1);var h=n+" ol-unselectable ol-control"+(r.collapsed_&&r.collapsible_?" ol-collapsed":"")+(r.collapsible_?"":" ol-uncollapsible"),c=r.element;return c.className=h,c.appendChild(r.ulElement_),c.appendChild(u),r.renderedAttributions_=[],r.renderedVisible_=!0,r}return Ys(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},r=[],i=t.layerStatesArray,n=0,o=i.length;n<o;++n){var s=i[n];if(Pn(s,t.viewState)){var a=s.layer.getSource();if(a){var l=a.getAttributions();if(l){var u=l(t);if(u)if(this.overrideCollapsible_||!1!==a.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(u))for(var h=0,c=u.length;h<c;++h)u[h]in e||(r.push(u[h]),e[u[h]]=!0);else u in e||(r.push(u),e[u]=!0)}}}}return r},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),r=e.length>0;if(this.rendered
 Visible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!v(e,this.renderedAttributions_)){Vn(this.ulElement_);for(var i=0,n=e.length;i<n;++i){var o=document.createElement("li");o.innerHTML=e[i],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?Yn(this.collapseLabel_,this.label_):Yn(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.proto
 type.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(Us),Vs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Xs=function(t){function e(e){var r=this,i=e||{};r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var n=void 0!==i.className?i.className:"ol-rotate",o=void 0!==i.label?i.label:"⇧";r.label_=null,"string"==typeof o?(r.label_=document.createElement("span"),r.label_.className="ol-compass",r.label_.textContent=o):(r.label_=o,r.label_.classList.add("ol-compass"));var s=i.tipLabel?i.tipLabel:"Reset rotation",a=document.createElement("button");a.className=n+"-reset",a.setAttribute("type","button")
 ,a.title=s,a.appendChild(r.label_),a.addEventListener(F,r.handleClick_.bind(r),!1);var l=n+" ol-unselectable ol-control",u=r.element;return u.className=l,u.appendChild(a),r.callResetNorth_=i.resetNorth?i.resetNorth:void 0,r.duration_=void 0!==i.duration?i.duration:250,r.autoHide_=void 0===i.autoHide||i.autoHide,r.rotation_=void 0,r.autoHide_&&r.element.classList.add("ol-hidden"),r}return Vs(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:Is}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var r=e.viewState.rotation;if(r!=this.rotation_){var i="rotate("+r+"rad)";if(this.autoHide_){var n=this.element.classList.contains("ol-hidden");n||0!==r?n&&0!==r&&this.element.classList.remove("
 ol-hidden"):this.element.classList.add("ol-hidden")}this.label_.style.transform=i}this.rotation_=r}},e}(Us),qs=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Zs=function(t){function e(e){var r=this,i=e||{};r=t.call(this,{element:document.createElement("div"),target:i.target})||this;var n=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInLabel?i.zoomInLabel:"+",a=void 0!==i.zoomOutLabel?i.zoomOutLabel:"−",l=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",u=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n+"-in",h.setAttribute("type","button"),h.title=l,h.appendChild("string"==typeof s?document.createTextNo
 de(s):s),h.addEventListener(F,r.handleClick_.bind(r,o),!1);var c=document.createElement("button");c.className=n+"-out",c.setAttribute("type","button"),c.title=u,c.appendChild("string"==typeof a?document.createTextNode(a):a),c.addEventListener(F,r.handleClick_.bind(r,-o),!1);var p=n+" ol-unselectable ol-control",d=r.element;return d.className=p,d.appendChild(h),d.appendChild(c),r.duration_=void 0!==i.duration?i.duration:250,r}return qs(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var r=e.getZoom();if(void 0!==r){var i=e.getConstrainedZoom(r+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:Is})):e.setZoom(i)}}},e}(Us);function Ks(t){var e=t||{},r=new at;return(void 0===e.zoom||e.zoom)&&r.push(new Zs(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&r.push(new Xs(e.rotateOptions)),(void 0===e.attribution||e.attribution
 )&&r.push(new Ws(e.attributionOptions)),r}var Hs="active",Js=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function $s(t,e,r,i){var n=t.getZoom();if(void 0!==n){var o=t.getConstrainedZoom(n+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:r,duration:void 0!==i?i:250,easing:Is})}}var Qs=function(t){function e(e){var r=t.call(this)||this;return e&&e.handleEvent&&(r.handleEvent=e.handleEvent),r.map_=null,r.setActive(!0),r}return Js(e,t),e.prototype.getActive=function(){return this.get(Hs)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Hs,t)},e.prototype.setMap=functio
 n(t){this.map_=t},e}(et),ta=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ea=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.delta_=i.delta?i.delta:1,r.duration_=void 0!==i.duration?i.duration:250,r}return ta(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Zo.DBLCLICK){var r=t.originalEvent,i=t.map,n=t.coordinate,o=r.shiftKey?-this.delta_:this.delta_;$s(i.getView(),o,n,this.duration_),t.preventDefault(),e=!0}return!e},e}(Qs),ra=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t
 (e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function ia(t){for(var e=t.length,r=0,i=0,n=0;n<e;n++)r+=t[n].clientX,i+=t[n].clientY;return[r/e,i/e]}var na=function(t){function e(e){var r=this,i=e||{};return r=t.call(this,i)||this,i.handleDownEvent&&(r.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(r.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(r.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(r.handleUpEvent=i.handleUpEvent),i.stopDown&&(r.stopDown=i.stopDown),r.handlingDownUpSequence=!1,r.trackedPointers_={},r.targetPointers=[],r}return ra(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Zo.POINTERDRAG)this.handleDragEvent(t),t.preventDefault();else if(t.type==
 Zo.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==Zo.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Zo.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===Zo.POINTERDOWN||e===Zo.POINTERDRAG||e===Zo.POINTERUP}(t)){var e=t.originalEvent,r=e.pointerId.toString();t.type==Zo.POINTERUP?delete this.trackedPointers_[r]:(t.type==Zo.POINTERDOWN||r in this.trackedPointers_)&&(this.trackedPointers_[r]=e),this.targetPointers=E(this.trackedPointers_)}},e}(Qs);function oa(t){var e=arguments;return function(t){for(var r=!0,i=0,n=e.length;i<n&&(r=r&&e[i](t));++i);return r}}var sa=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKe
 y},aa=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},la=function(t){return t.target.getTargetElement().contains(document.activeElement)},ua=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||la(t)},ha=w,ca=function(t){var e=t.originalEvent;return 0==e.button&&!(An&&kn&&e.ctrlKey)},pa=b,da=function(t){return t.type==Zo.SINGLECLICK},fa=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ga=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ya=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},ma=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"mouse"==e.pointerType},_a=function(t){var e=t.originalEvent;return lt(void 0!==e,56),e.isPrimary&&0===e.button},va=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for
 (var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),xa=function(t){function e(e){var r=t.call(this,{stopDown:b})||this,i=e||{};r.kinetic_=i.kinetic,r.lastCentroid=null,r.lastPointersCount_,r.panning_=!1;var n=i.condition?i.condition:oa(fa,_a);return r.condition_=i.onFocusOnly?oa(ua,n):n,r.noKinetic_=!1,r}return va(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,r=ia(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var i=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],n=t.map.getView();or(i,n.getResolution()),nr(i,n.getRotation()),n.adjustCenterInternal(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.p
 rototype.handleUpEvent=function(t){var e=t.map,r=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),o=r.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-i*Math.cos(n),s[1]-i*Math.sin(n)]);r.animateInternal({center:r.getConstrainedCenter(a),duration:500,easing:Is})}return this.panning_&&(this.panning_=!1,r.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(na),wa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(va
 r r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ba=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{stopDown:b})||this).condition_=i.condition?i.condition:aa,r.lastAngle_=void 0,r.duration_=void 0!==i.duration?i.duration:250,r}return wa(e,t),e.prototype.handleDragEvent=function(t){if(ma(t)){var e=t.map,r=e.getView();if(r.getConstraints().rotation!==Es){var i=e.getSize(),n=t.pixel,o=Math.atan2(i[1]/2-n[1],n[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;r.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!ma(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!ma(t)&&(!(!ca(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(na),Sa=function(){var t=function(e,r){return(t=Object.setP
 rototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ta=function(t){function e(e){var r=t.call(this)||this;return r.geometry_=null,r.element_=document.createElement("div"),r.element_.style.position="absolute",r.element_.style.pointerEvents="auto",r.element_.className="ol-box "+e,r.map_=null,r.startPixel_=null,r.endPixel_=null,r}return Sa(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,r=this.element_.style;r.left=Math.min(t[0],e[0])+"px",r.top=Math.min(t[1],e[1])+"px",r.width=Math.abs(e[0]-t[0])+"px",r.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit
 ",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Pi([r])},e.prototype.getGeometry=function(){return this.geometry_},e}(p),Ca=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ea="boxstart",Ra="boxdrag",Pa="boxend",Ia=function(t){function e(e,r,i){var
  n=t.call(this,e)||this;return n.coordinate=r,n.mapBrowserEvent=i,n}return Ca(e,t),e}(h),Oa=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.box_=new Ta(i.className||"ol-dragbox"),r.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(r.onBoxEnd=i.onBoxEnd),r.startPixel_=null,r.condition_=i.condition?i.condition:ca,r.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:r.defaultBoxEndCondition,r}return Ca(e,t),e.prototype.defaultBoxEndCondition=function(t,e,r){var i=r[0]-e[0],n=r[1]-e[1];return i*i+n*n>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ia(Ra,t.coordinate,t))},e.prototype.handleUpEvent=function(t){return this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd(t),this.dispatchEvent(new Ia(Pa,t.coordinate,t))),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t
 )&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ia(Ea,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(na),La=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ma=function(t){function e(e){var r=this,i=e||{},n=i.condition?i.condition:ga;return(r=t.call(this,{condition:n,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,r.out_=void 0!==i.out&&i.out,r}return La(e,t),e.prototype.onBoxEnd=function(t){var e,r,i=this.getMap(),n=i.getView(),o=i.getSize(),s=this.getGeometry().getExtent();if(this.out_){var a=n.calculateExtentInternal(o),l=(e=[i.getPixelFromCoordinateI
 nternal(oe(s)),i.getPixelFromCoordinateInternal(de(s))],te(Zt(r),e));me(a,1/n.getResolutionForExtentInternal(l,o)),s=a}var u=n.getConstrainedResolution(n.getResolutionForExtentInternal(s,o)),h=n.getConstrainedCenter(ae(s),u);n.animateInternal({resolution:u,center:h,duration:this.duration_,easing:Is})},e}(Oa),Fa=37,Aa=38,ka=39,Na=40,ja=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Da=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.defaultCondition_=function(t){return fa(t)&&ya(t)},r.condition_=void 0!==i.condition?i.condition:r.defaultCondition_,r.duration_=void 0!==i.duration?i.duration:100,r.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,r}return ja(e,t),e.prototype.handleEvent=fu
 nction(t){var e=!1;if(t.type==D){var r=t.originalEvent.keyCode;if(this.condition_(t)&&(r==Na||r==Fa||r==ka||r==Aa)){var i=t.map.getView(),n=i.getResolution()*this.pixelDelta_,o=0,s=0;r==Na?s=-n:r==Fa?o=-n:r==ka?o=n:s=n;var a=[o,s];nr(a,i.getRotation()),function(t,e,r){var i=t.getCenterInternal();if(i){var n=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==r?r:250,easing:Ls,center:t.getConstrainedCenter(n)})}}(i,a,this.duration_),t.preventDefault(),e=!0}}return!e},e}(Qs),Ga=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),za=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.condition_=i.condition?i.condition:ya,r.delta_=i.delta?i.delta:1,r.duration_=void 0!==i.duration?i.duration:1
 00,r}return Ga(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==D||t.type==G){var r=t.originalEvent.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var i=t.map,n=r=="+".charCodeAt(0)?this.delta_:-this.delta_;$s(i.getView(),n,void 0,this.duration_),t.preventDefault(),e=!0}}return!e},e}(Qs),Ba=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ua="trackpad",Ya="wheel",Wa=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,i)||this).totalDelta_=0,r.lastDelta_=0,r.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,r.duration_=void 0!==i.duration?i.duration:250,r.timeout_=void 0!==i.timeout?i.timeout:80,r.useAnchor_=void 0===i.useAnchor||i.useAnchor,r.constrainResolution_=v
 oid 0!==i.constrainResolution&&i.constrainResolution;var n=i.condition?i.condition:ha;return r.condition_=i.onFocusOnly?oa(ua,n):n,r.lastAnchor_=null,r.startTime_=void 0,r.timeoutId_,r.mode_=void 0,r.trackpadEventGap_=400,r.trackpadTimeoutId_,r.deltaPerZoom_=300,r}return Ba(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==Y)return!0;t.preventDefault();var e,r=t.map,i=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==Y&&(e=i.deltaY,Fn&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=Nn),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var n=Date.now();void 0===this.startTime_&&(this.startTime_=n),(!this.mode_||n-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Ua:Ya);var o=r.getView();if(this.mode_===
 Ua&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=n,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(n-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var r=-we(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),$s(e,r,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t)
 {this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Qs),Va=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Xa=function(t){function e(e){var r=this,i=e||{},n=i;return n.stopDown||(n.stopDown=b),(r=t.call(this,n)||this).anchor_=null,r.lastAngle_=void 0,r.rotating_=!1,r.rotationDelta_=0,r.threshold_=void 0!==i.threshold?i.threshold:.3,r.duration_=void 0!==i.duration?i.duration:250,r}return Va(e,t),e.prototype.handleDragEvent=function(t){var e=0,r=this.targetPointers[0],i=this.targetPointers[1],n=Math.atan2(i.clientY-r.clientY,i.clientX-r.clientX);if(void 0!==this.lastAngle_){var o=n-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this
 .lastAngle_=n;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Es){var l=s.getViewport().getBoundingClientRect(),u=ia(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(u),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(na),qa=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototy
 pe,new i)}}(),Za=function(t){function e(e){var r=this,i=e||{},n=i;return n.stopDown||(n.stopDown=b),(r=t.call(this,n)||this).anchor_=null,r.duration_=void 0!==i.duration?i.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return qa(e,t),e.prototype.handleDragEvent=function(t){var e=1,r=this.targetPointers[0],i=this.targetPointers[1],n=r.clientX-i.clientX,o=r.clientY-i.clientY,s=Math.sqrt(n*n+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var u=a.getViewport().getBoundingClientRect(),h=ia(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var 
 e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(na);function Ka(t){var e=t||{},r=new at,i=new Xi(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&r.push(new ba),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&r.push(new ea({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&r.push(new xa({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&r.push(new Xa),(void 0===e.pinchZoom||e.pinchZoom)&&r.push(new Za({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(r.push(new Da),r.push(new za({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&r.push(new Wa({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&r.push(new Ma({duration:e.zoomDuration})),r}var Ha=function(){var t=function(e,r){return(t=Objec
 t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ja=function(t){function e(e){return(e=T({},e)).controls||(e.controls=Ks()),e.interactions||(e.interactions=Ka({onFocusOnly:!0})),t.call(this,e)||this}return Ha(e,t),e.prototype.createRenderer=function(){return new zo(this)},e}(zs),$a="bottom-left",Qa="bottom-center",tl="bottom-right",el="center-left",rl="center-center",il="center-right",nl="top-left",ol="top-center",sl="top-right",al=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}
 (),ll="element",ul="map",hl="offset",cl="position",pl="positioning",dl=function(t){function e(e){var r=t.call(this)||this;r.options=e,r.id=e.id,r.insertFirst=void 0===e.insertFirst||e.insertFirst,r.stopEvent=void 0===e.stopEvent||e.stopEvent,r.element=document.createElement("div"),r.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",r.element.style.position="absolute",r.element.style.pointerEvents="auto";var i=e.autoPan;return i&&"object"!=typeof i&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),r.autoPan=i||!1,r.rendered={transform_:"",visible:!0},r.mapPostrenderListenerKey=null,r.addEventListener(tt(ll),r.handleElementChanged),r.addEventListener(tt(ul),r.handleMapChanged),r.addEventListener(tt(hl),r.handleOffsetChanged),r.addEventListener(tt(cl),r.handlePositionChanged),r.addEventListener(tt(pl),r.handlePositioningChanged),void 0!==e.element&&r.setElement(e.element),r.setOffset(void 0!==e.offset?e.offset:[0,0]),r.setPositioning(void 
 0!==e.positioning?e.positioning:nl),void 0!==e.position&&r.setPosition(e.position),r}return al(e,t),e.prototype.getElement=function(){return this.get(ll)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(ul)},e.prototype.getOffset=function(){return this.get(hl)},e.prototype.getPosition=function(){return this.get(cl)},e.prototype.getPositioning=function(){return this.get(pl)},e.prototype.handleElementChanged=function(){Vn(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Wn(this.element),X(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=W(t,es,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan(
 )}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(ll,t)},e.prototype.setMap=function(t){this.set(ul,t)},e.prototype.setOffset=function(t){this.set(hl,t)},e.prototype.setPosition=function(t){this.set(cl,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(cl)){var r=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),n=this.getRect(i,[Bn(i),Un(i)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!Yt(r,n)){var a=n[0]-r[0],l=r[2]-n[2],u=n[1]-r[1],h=r[3]-n[3],c=[0,0];if(a<0?c[0]=a-s:l<0&&(c[0]=Math.abs(l)+s),u<0?c[1]=u-s:h<0&&(c[1]=Math.abs(h)+s),0!==c[0]||0!
 ==c[1]){var p=e.getView().getCenterInternal(),d=e.getPixelFromCoordinateInternal(p),f=[d[0]+c[0],d[1]+c[1]],g=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(f),duration:g.duration,easing:g.easing})}}}},e.prototype.getRect=function(t,e){var r=t.getBoundingClientRect(),i=r.left+window.pageXOffset,n=r.top+window.pageYOffset;return[i,n,i+e[0],n+e[1]]},e.prototype.setPositioning=function(t){this.set(pl,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var r=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(r,i)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var r=this.element.style,i=this.getOffset(),n=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+i[0])+"px",s=Math.round(t[1]+i[1])+"px",a="0%",l="0
 %";n==tl||n==il||n==sl?a="-100%":n!=Qa&&n!=rl&&n!=ol||(a="-50%"),n==$a||n==Qa||n==tl?l="-100%":n!=el&&n!=rl&&n!=il||(l="-50%");var u="translate("+a+", "+l+") translate("+o+", "+s+")";this.rendered.transform_!=u&&(this.rendered.transform_=u,r.transform=u,r.msTransform=u)},e.prototype.getOptions=function(){return this.options},e}(et),fl="arraybuffer",gl="json",yl="text",ml="xml",_l=!1;function vl(t,e,r,i){return function(n,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,o,s):t,!0),e.getType()==fl&&(a.responseType="arraybuffer"),a.withCredentials=_l,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var o=e.getType(),l=void 0;o==gl||o==yl?l=a.responseText:o==ml?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):o==fl&&(l=a.response),l?r.call(this,e.readFeatures(l,{extent:n,featureProjection:s}),e.readProjection(l)):i.call(this)}else i.call(this)}.bind(this),a.onerror=function(){i.call(this)}.bind(this),a.send()}}fun
 ction xl(t,e){return vl(t,e,(function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)}),S)}function wl(t,e){return[[-1/0,-1/0,1/0,1/0]]}var bl=function(){function t(t,e,r,i){this.minX=t,this.maxX=e,this.minY=r,this.maxY=i}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function()
 {return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Sl(t,e,r,i,n){return void 0!==n?(n.minX=t,n.maxX=e,n.minY=r,n.maxY=i,n):new bl(t,e,r,i)}var Tl=bl;function Cl(t,e,r,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=r,i):[t,e,r]}function El(t,e,r){return t+"/"+e+"/"+r}function Rl(t){return El(t[0],t[1],t[2])}function Pl(t){return t.split("/").map(Number)}function Il(t){return(t[1]<<t[0])+t[2]}var Ol=[0,0,0],Ll=function(){function t(t){var e,r,i,n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,lt((e=this.resolutions_,r=!0,i=function(t,e){return e-t}||d,e.every((function(t,n){if(0===n)return!0;var o=i(e[n-1],t);return!(o>0||r&&0===o)}))),17),!t.origins)for(var o=0,s=this.resolutions_.length-1;o<s;++o)if(n){if(this.resolutions_[o]/this.resolutions_[o+1]!==n){n=void 0;break}}else n=this.resolutions_[o]/this.resolutions_[o+1];this.zoomFactor_=n,this.maxZ
 oom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,lt(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=pe(a)),lt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,lt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,lt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){return new Tl(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))}),this):a&&this.calculateTileRanges_(a)}return t.prototype.forEachTileCoord=function(t,e,r){for(var i=this.getTileRangeForExtentAndZ(t,e),n=i.minX,o=i.max
 X;n<=o;++n)for(var s=i.minY,a=i.maxY;s<=a;++s)r([e,n,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,r,i){var n,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(n=t[1],o=t[2]):s=this.getTileCoordExtent(t,i);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?Sl(n=Math.floor(n/2),n,o=Math.floor(o/2),o,r):this.getTileRangeForExtentAndZ(s,a,r)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,r){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var i=2*t[1],n=2*t[2];return Sl(i,i+1,n,n+1,e)}var o=this.getTileCoordExtent(t,r);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},
 t.prototype.getTileRangeExtent=function(t,e,r){var i=this.getOrigin(t),n=this.getResolution(t),o=Ds(this.getTileSize(t),this.tmpSize_),s=i[0]+e.minX*o[0]*n,a=i[0]+(e.maxX+1)*o[0]*n;return qt(s,i[1]+e.minY*o[1]*n,a,i[1]+(e.maxY+1)*o[1]*n,r)},t.prototype.getTileRangeForExtentAndZ=function(t,e,r){var i=Ol;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var n=i[1],o=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),Sl(n,i[1],o,i[2],r)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),r=this.getResolution(t[0]),i=Ds(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*r,e[1]-(t[2]+.5)*i[1]*r]},t.prototype.getTileCoordExtent=function(t,e){var r=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=Ds(this.getTileSize(t[0]),this.tmpSize_),o=r[0]+t[1]*n[0]*i,s=r[1]-(t[2]+1)*n[1]*i;return qt(o,s,o+n[0]*i,s+n[1]*i,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,r){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,r)},t.prototype.getTi
 leCoordForXYAndResolution_=function(t,e,r,i,n){var o=this.getZForResolution(r),s=r/this.getResolution(o),a=this.getOrigin(o),l=Ds(this.getTileSize(o),this.tmpSize_),u=i?.5:0,h=i?.5:0,c=Math.floor((t-a[0])/r+u),p=Math.floor((a[1]-e)/r+h),d=s*c/l[0],f=s*p/l[1];return i?(d=Math.ceil(d)-1,f=Math.ceil(f)-1):(d=Math.floor(d),f=Math.floor(f)),Cl(o,d,f,n)},t.prototype.getTileCoordForXYAndZ_=function(t,e,r,i,n){var o=this.getOrigin(r),s=this.getResolution(r),a=Ds(this.getTileSize(r),this.tmpSize_),l=i?.5:0,u=i?.5:0,h=Math.floor((t-o[0])/s+l),c=Math.floor((o[1]-e)/s+u),p=h/a[0],d=c/a[1];return i?(p=Math.ceil(p)-1,d=Math.ceil(d)-1):(p=Math.floor(p),d=Math.floor(d)),Cl(r,p,d,n)},t.prototype.getTileCoordForCoordAndZ=function(t,e,r){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,r)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){r
 eturn this.fullTileRanges_?this.fullTileRanges_[t]:null},t.prototype.getZForResolution=function(t,e){return we(g(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,r=new Array(e),i=this.minZoom;i<e;++i)r[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=r},t}();function Ml(t){var e=t.getDefaultTileGrid();return e||(e=kl(t),t.setDefaultTileGrid(e)),e}function Fl(t){var e=t||{},r=e.extent||gr("EPSG:3857").getExtent(),i={extent:r,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Al(r,e.maxZoom,e.tileSize,e.maxResolution)};return new Ll(i)}function Al(t,e,r,i){for(var n=void 0!==e?e:42,o=he(t),s=fe(t),a=Ds(void 0!==r?r:256),l=i>0?i:Math.max(s/a[0],o/a[1]),u=n+1,h=new Array(u),c=0;c<u;++c)h[c]=l/Math.pow(2,c);return h}function kl(t,e,r,i){return function(t,e,r,i){var n=void 0!==i?i:Ot,o=Al(t,e,r);return new Ll({extent:t,origin:le(t,n),resolutions:o,tileSize:r})}(Nl(t),e,r,i)}function Nl(t){var e=
 (t=gr(t)).getExtent();if(!e){var r=180*mt[_t.DEGREES]/t.getMetersPerUnit();e=qt(-r,-r,r,r)}return e}var jl,Dl=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Gl(t,e){for(var r=Dl.length,i=0;i<r;++i)try{var n=t.getContext(Dl[i],e);if(n)return n}catch(t){}return null}var zl="http://www.w3.org/2001/XMLSchema-instance";function Bl(t,e){return lu().createElementNS(t,e)}function Ul(t,e){return function t(e,r,i){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)r?i.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(e.nodeValue);else{var n=void 0;for(n=e.firstChild;n;n=n.nextSibling)t(n,r,i)}return i}(t,e,[]).join("")}function Yl(t){return"documentElement"in t}function Wl(t){return(new DOMParser).parseFromString(t,"application/xml")}function Vl(t,e){return function(r,i){var n=t.call(void 0!==e?e:this,r,i);void 0!==n&&m(i[i.length-1],n)}}function Xl(t,e){return function(r,i){var n=t.call(void 0!==e?e:this,r,i);void 0!==n&&i[i.length-1].push(n)}}func
 tion ql(t,e){return function(r,i){var n=t.call(void 0!==e?e:this,r,i);void 0!==n&&(i[i.length-1]=n)}}function Zl(t,e,r){return function(i,n){var o=t.call(void 0!==r?r:this,i,n);if(void 0!==o){var s=n[n.length-1],a=void 0!==e?e:i.localName,l=void 0;a in s?l=s[a]:(l=[],s[a]=l),l.push(o)}}}function Kl(t,e,r){return function(i,n){var o=t.call(void 0!==r?r:this,i,n);void 0!==o&&(n[n.length-1][void 0!==e?e:i.localName]=o)}}function Hl(t,e){return function(r,i,n){t.call(void 0!==e?e:this,r,i,n),n[n.length-1].node.appendChild(r)}}function Jl(t,e){var r,i;return function(e,n,o){if(void 0===r){r={};var s={};s[e.localName]=t,r[e.namespaceURI]=s,i=$l(e.localName)}nu(r,i,n,o)}}function $l(t,e){var r=t;return(function(t,i,n){var o=i[i.length-1].node,s=r;return void 0===s&&(s=n),Bl(void 0!==e?e:o.namespaceURI,s)})}var Ql=$l();function tu(t,e){for(var r=e.length,i=new Array(r),n=0;n<r;++n)i[n]=t[e[n]];return i}function eu(t,e,r){var i,n,o=void 0!==r?r:{};for(i=0,n=t.length;i<n;++i)o[t[i]]=e;return 
 o}function ru(t,e,r,i){var n;for(n=e.firstElementChild;n;n=n.nextElementSibling){var o=t[n.namespaceURI];if(void 0!==o){var s=o[n.localName];void 0!==s&&s.call(i,n,r)}}}function iu(t,e,r,i,n){return i.push(t),ru(e,r,i,n),i.pop()}function nu(t,e,r,i,n,o){for(var s,a,l=(void 0!==n?n:r).length,u=0;u<l;++u)void 0!==(s=r[u])&&void 0!==(a=e.call(void 0!==o?o:this,s,i,void 0!==n?n[u]:void 0))&&t[a.namespaceURI][a.localName].call(o,a,s,i)}function ou(t,e,r,i,n,o,s){return n.push(t),nu(e,r,i,n,o,s),n.pop()}var su=void 0;var au=void 0;function lu(){return void 0===au&&"undefined"!=typeof document&&(au=document.implementation.createDocument("","",null)),au}var uu=35044;function hu(t){switch(t){case 34962:return Float32Array;case 34963:return Uint32Array;default:return Float32Array}}var cu=function(){function t(t,e){this.array=null,this.type=t,lt(34962===t||34963===t,62),this.usage=void 0!==e?e:uu}return t.prototype.ofSize=function(t){this.array=new(hu(this.type))(t)},t.prototype.fromArray=func
 tion(t){this.array=hu(this.type).from(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(hu(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}(),pu="webglcontextlost",du="webglcontextrestored",fu=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t.vertexShader||"\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n
   }\n"),e.compileShader(r);var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord);\n  }\n"),e.compileShader(i),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,r),e.attachShader(this.renderTargetProgram_,i),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Objec
 t.keys(t.uniforms).forEach(function(r){this.uniforms_.push({value:t.uniforms[r],location:e.getUniformLocation(this.renderTargetProgram_,r)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),r=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,r[0],r[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==r[0]||this.renderTargetTextureSize_[1]!==r[1]){this.renderTargetTextureSize_=r;var i=e.RGBA,n=e.RGBA,o=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,i,r[0],r[1],0,n,o,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}
 },t.prototype.apply=function(t,e){var r=this.getGL(),i=t.size;r.bindFramebuffer(r.FRAMEBUFFER,e?e.getFrameBuffer():null),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.bindBuffer(r.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),r.useProgram(this.renderTargetProgram_),r.enableVertexAttribArray(this.renderTargetAttribLocation_),r.vertexAttribPointer(this.renderTargetAttribLocation_,2,r.FLOAT,!1,0,0),r.uniform2f(this.renderTargetUniformLocation_,i[0],i[1]),r.uniform1i(this.renderTargetTextureLocation_,0),this.applyUniforms(t),r.drawArrays(r.TRIANGLES,0,6)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,r=this.getGL(),i=1;this.uniforms_.forEach((function(n){if((e="function"==typeof n.value?n.value(t):n.value)instanceof HTMLCa
 nvasElement||e instanceof ImageData)n.texture||(n.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+i]),r.bindTexture(r.TEXTURE_2D,n.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e instanceof ImageData?r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,e.width,e.height,0,r.UNSIGNED_BYTE,new Uint8Array(e.data)):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),r.uniform1i(n.location,i++);else if(Array.isArray(e))switch(e.length){case 2:return void r.uniform2f(n.location,e[0],e[1]);case 3:return void r.uniform3f(n.location,e[0],e[1],e[2]);case 4:return void r.uniform4f(n.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(n.location,e)}))},t}();function gu(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var yu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__
 proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),mu="u_projectionMatrix",_u="u_offsetScaleMatrix",vu="u_offsetRotateMatrix",xu="u_time",wu="u_zoom",bu="u_resolution",Su={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126};function Tu(t){for(var e=0,r=0;r<t.length;r++){var i=t[r];e+=i.size*Cu(i.type)}return e}function Cu(t){switch(t){case Su.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Su.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Su.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Su.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var Eu=function(t){function e(e){var r=t.call(this)||this,i=e||{};r.boundHandleWebGLContextLost_=r.handleWebGLContextLost.bind(r),r.boundHandleWebGLContextRestored_=r.handleWebGLContextRestored.
 bind(r),r.canvas_=document.createElement("canvas"),r.canvas_.style.position="absolute",r.canvas_.style.left="0",r.gl_=Gl(r.canvas_);var n=r.getGL();if(r.bufferCache_={},r.currentProgram_=null,lt(f(function(){if(!jl){var t=Gl(document.createElement("canvas"));t&&(jl=t.getSupportedExtensions())}return jl}(),"OES_element_index_uint"),63),n.getExtension("OES_element_index_uint"),r.canvas_.addEventListener(pu,r.boundHandleWebGLContextLost_),r.canvas_.addEventListener(du,r.boundHandleWebGLContextRestored_),r.offsetRotateMatrix_=[1,0,0,1,0,0],r.offsetScaleMatrix_=[1,0,0,1,0,0],r.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.uniformLocations_={},r.attribLocations_={},r.uniforms_=[],i.uniforms)for(var o in i.uniforms)r.uniforms_.push({name:o,value:i.uniforms[o]});return r.postProcessPasses_=i.postProcesses?i.postProcesses.map((function(t){return new fu({webGlContext:n,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new fu({webGlCon
 text:n})],r.shaderCompileErrors_=null,r.startTime_=Date.now(),r}return yu(e,t),e.prototype.bindBuffer=function(t){var e=this.getGL(),r=o(t),i=this.bufferCache_[r];i||(i={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[r]=i);e.bindBuffer(t.getType(),i.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),r=o(t),i=this.bufferCache_[r];e.isContextLost()||e.deleteBuffer(i.buffer),delete this.bufferCache_[r]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(pu,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(du,this.boundHandleWebGLContextRestored_)},e.prototype.prepareDraw=function(t){var e=this.getGL(),r=this.getCanvas(),i=t.size,n=t.pixelRatio;r.width=i[0]*n,r.height=i[1]*n,r.style.width=i[0]+"px",r.style.height=i[1]+"px",e.useProgram(this.currentProgram_);for(var o=this.postProcessPasses_.
 length-1;o>=0;o--)this.postProcessPasses_[o].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,r){var i=this.getGL(),n=e.getSize();i.bindFramebuffer(i.FRAMEBUFFER,e.getFramebuffer()),i.viewport(0,0,n[0],n[1]),i.bindTexture(i.TEXTURE_2D,e.getTexture()),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,r?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var r=this.getGL(),i=r.UNSIGNED_INT,n=e-t,o=4*t;r.drawElements(r.TRIANGLES,n,i,o)},e.prototype.finalizeDraw=function(t){for(var e=0;e<this.postProcessPasses_.length;e++)this.postProcessPasses_[e].apply(t,this.postProcessPasses_[e+1]||null)},e.prototype.getCanvas=function()
 {return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,r=t.viewState.rotation,i=xt(this.offsetScaleMatrix_);Tt(i,2/e[0],2/e[1]);var n,o,s,a,l=xt(this.offsetRotateMatrix_);0!==r&&(n=l,o=-r,s=Math.cos(o),a=Math.sin(o),wt(n,bt(vt,s,a,-a,s,0,0))),this.setUniformMatrixValue(_u,gu(this.tmpMat4_,i)),this.setUniformMatrixValue(vu,gu(this.tmpMat4_,l)),this.setUniformFloatValue(xu,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(wu,t.viewState.zoom),this.setUniformFloatValue(bu,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,r=this.getGL(),i=0;this.uniforms_.forEach(function(n){if((e="function"==typeof n.value?n.value(t):n.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)n.texture||(n.prevValue=void 0,n.texture=r.createTexture()),r.activeTexture(r["TEXTURE"+i]),r.bindTexture(r.TEXTURE_2D,n.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEA
 R),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&n.prevValue!==e&&(n.prevValue=e,r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e)),r.uniform1i(this.getUniformLocation(n.name),i++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(n.name,gu(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void r.uniform2f(this.getUniformLocation(n.name),e[0],e[1]);case 3:return void r.uniform3f(this.getUniformLocation(n.name),e[0],e[1],e[2]);case 4:return void r.uniform4f(this.getUniformLocation(n.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(this.getUniformLocation(n.name),e)}.bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compi
 leShader=function(t,e){var r=this.getGL(),i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),i},e.prototype.getProgram=function(t,e){var r=this.getGL(),i=this.compileShader(t,r.FRAGMENT_SHADER),n=this.compileShader(e,r.VERTEX_SHADER);this.shaderCompileErrors_=null,r.getShaderInfoLog(i)&&(this.shaderCompileErrors_="Fragment shader compilation failed:\n"+r.getShaderInfoLog(i)),r.getShaderInfoLog(n)&&(this.shaderCompileErrors_=(this.shaderCompileErrors_||"")+"Vertex shader compilation failed:\n"+r.getShaderInfoLog(n));var o=r.createProgram();return r.attachShader(o,i),r.attachShader(o,n),r.linkProgram(o),o},e.prototype.getShaderCompileErrors=function(){return this.shaderCompileErrors_},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.
 attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var r=t.size,i=t.viewState.rotation,n=t.viewState.resolution,o=t.viewState.center;return xt(e),Ct(e,0,0,2/(n*r[0]),2/(n*r[1]),-i,-o[0],-o[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,r,i,n){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,e,r,!1,i,n))},e.prototype.enableAttributes=function(t){for(var e=Tu(t),r=0,i=0;i<t.length;i++){var n=t[i];this.enableAttributeArray_(n.name,n.size,n.type||5126,e,r),r+=n.size*Cu(n.type)}},e.prototype.handleWebGLContextLost=function(){C(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextResto
 red=function(){},e.prototype.createTexture=function(t,e,r){var i=this.getGL(),n=r||i.createTexture(),o=i.RGBA,s=i.RGBA,a=i.UNSIGNED_BYTE;return i.bindTexture(i.TEXTURE_2D,n),e?i.texImage2D(i.TEXTURE_2D,0,o,s,a,e):i.texImage2D(i.TEXTURE_2D,0,o,t[0],t[1],0,s,a,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),n},e}(p),Ru=new Uint8Array(4),Pu=function(){function t(t,e){this.helper_=t;var r=t.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){v(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t
 =this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return Ru[0]=0,Ru[1]=0,Ru[2]=0,Ru[3]=0,Ru;this.readAll();var r=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return Ru[0]=this.data_[4*r],Ru[1]=this.data_[4*r+1],Ru[2]=this.data_[4*r+2],Ru[3]=this.data_[4*r+3],Ru},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),Iu=function(){var t=function
 (e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ou=function(t){function e(e){var r=t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes})||this;return r.matrixIds_=e.matrixIds,r}return Iu(e,t),e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(Ll),Lu=Ou;function Mu(t,e,r){var i=[],n=[],o=[],s=[],a=[],l=void 0!==r?r:[],u=t.SupportedCRS,h=gr(u.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||gr(u),c=h.getMetersPerUnit(),p="ne"==h.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,e){return e.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.f
 orEach((function(e){if(!(l.length>0)||_(l,(function(r){return e.Identifier==r.TileMatrix||-1===e.Identifier.indexOf(":")&&t.Identifier+":"+e.Identifier===r.TileMatrix}))){n.push(e.Identifier);var r=28e-5*e.ScaleDenominator/c,u=e.TileWidth,h=e.TileHeight;p?o.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):o.push(e.TopLeftCorner),i.push(r),s.push(u==h?u:[u,h]),a.push([e.MatrixWidth,e.MatrixHeight])}})),new Ou({extent:e,origins:o,resolutions:i,matrixIds:n,tileSizes:s,sizes:a})}var Fu=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ds(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.g
 etRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return i()},t.prototype.getImage=function(t){return i()},t.prototype.getHitDetectionImage=function(t){return i()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return i()},t.prototype.getImageSize=function(){return i()},t.prototype.getHitDetectionImageSize=function(){return i()},t.prototype.getOrigin=function(){return i()},t.prototype.getSize=function(){return i()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Ds(t)},t.prototype.listenI
 mageChange=function(t){i()},t.prototype.load=function(){i()},t.prototype.unlistenImageChange=function(t){i()},t}(),Au=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ku=function(t){function e(e){var r=this,i=void 0!==e.rotateWithView&&e.rotateWithView;return(r=t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_={},r.hitDetectionCanvas_={},r.fill_=void 0!==e.fill?e.fill:null,r.origin_=[0,0],r.points_=e.points,r.radius_=void 0!==e.radius?e.radius:e.radius1,r.radius2_=e.radius2,r.angle_=void 0!==e.angle?e.angle:0,r.stroke_=void 0!==e.stroke?e.stroke:null,r.anchor_=null,r.size_=null,r.imageSize_=null
 ,r.hitDetectionImageSize_=null,r.render(),r}return Au(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionCanvas_[t||1]){var e=this.createRenderOptions();this.createHitDetectionCanvas_(e,t||1)}return this.hitDetectionCanvas_[t||1]},e.prototype.getImage=function(t){if(!this.canvas_[t||1]){var e=this.createRenderOptions(),r=zn(e.size*t||1,e.size*t||1);this.draw_(e,r,0,0,t||1),this.canvas_[t||1
 ]=r.canvas}return this.canvas_[t||1]},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return To},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.createRenderOptions=function(){var t,e="round",r="round",i=0,n=null,o=0,s=0;return this.stroke_&&(null===(t=this.stroke_.getColor())&&(t="#000"),t=Ln(t),void 0===(s=this.stroke_.getWidth())&&(s=1),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void
  0===(r=this.stroke_.getLineJoin())&&(r="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(i=this.stroke_.getMiterLimit())&&(i=10)),{strokeStyle:t,strokeWidth:s,size:2*(this.radius_+s)+1,lineCap:e,lineDash:n,lineDashOffset:o,lineJoin:r,miterLimit:i}},e.prototype.render=function(){var t=this.createRenderOptions(),e=zn(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_[1]=e.canvas;var r=e.canvas.width,i=r,n=this.getDisplacement();this.hitDetectionImageSize_=[t.size,t.size],this.createHitDetectionCanvas_(t,1),this.anchor_=[r/2-n[0],r/2+n[1]],this.size_=[r,r],this.imageSize_=[i,i]},e.prototype.draw_=function(t,e,r,i,n){var o,s,a;e.setTransform(n,0,0,n,0,0),e.translate(r,i),e.beginPath();var l=this.points_;if(l===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var u=void 0!==this.radius2_?this.radius2_:this.radius_;for(u!==this.radius_&&(l*=2),o=0;o<=l;o++)s=2*o*Math.PI/l-Math.PI/2+this.angle_,a=o%2==0?this.radius_:u,e.lineTo(t.size/2+a*Math.cos(s),t.size
 /2+a*Math.sin(s))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=Ln(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t,e){if(this.hitDetectionCanvas_[e]=this.getImage(e),this.fill_){var r=this.fill_.getColor(),i=0;if("string"==typeof r&&(r=tn(r)),null===r?i=1:Array.isArray(r)&&(i=4===r.length?r[3]:1),0===i){var n=zn(t.size*e,t.size*e);this.hitDetectionCanvas_[e]=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0,e)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,r,i,n){e.setTransform(n,0,0,n,0,0),e.translate(r,i),e.beginPath();var o=this.points_;if(o===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var s=void 0!==this.radius2_?this.radius2_:this.radius_;s!==this.radius_&&(o*=2);var 
 a=void 0,l=void 0,u=void 0;for(a=0;a<=o;a++)u=2*a*Math.PI/o-Math.PI/2+this.angle_,l=a%2==0?this.radius_:s,e.lineTo(t.size/2+l*Math.cos(u),t.size/2+l*Math.sin(u))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(Fu),Nu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ju=function(t){function e(e){var r=e||{};return t.call(this,{points:1/0,fill:r.fill,radius:r.radius,stroke:r.stroke,displacement:void 0!==r.displacement?r.displacement:[0,0]})||this}return Nu(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:th
 is.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(ku),Du=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),Gu="fraction",zu="pixels",Bu="bottom-left",Uu="bottom-right",Yu="top-left",Wu="top-right",Vu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Xu=function(
 t){function e(e,r,i,n){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=i,o.resolution=r,o.state=n,o}return Vu(e,t),e.prototype.changed=function(){this.dispatchEvent(O)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return i()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){i()},e}(I),qu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Zu(t,e,r){var i=t;if(i.src&&Dn){var n=i.decode(),o=!0;return n.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.mes
 sage?e():r())})),function(){o=!1}}var s=[V(i,z,e),V(i,L,r)];return function(){s.forEach(X)}}var Ku=function(t){function e(e,r,i,n,o,s){var a=t.call(this,e,r,i,bo)||this;return a.src_=n,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=bo,a.imageLoadFunction_=s,a}return qu(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Co,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=he(this.extent)/this.image_.height),this.state=To,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=bo&&this.state!=Co||(this.state=So,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=Zu(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}
 (Xu),Hu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ju=null,$u=function(t){function e(e,r,i,n,o,s){var a=t.call(this)||this;return a.hitDetectionImage_={},a.image_=e||new Image,null!==n&&(a.image_.crossOrigin=n),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=i,a.src_=r,a.tainted_,a}return Hu(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===To){Ju||(Ju=zn(1,1)),Ju.drawImage(this.image_,0,0);try{Ju.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Ju=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(O)},e.prototype.handleImageError_=function(){this.imageState_=Co,this.unlistenImage_(),this.dis
 patchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=To,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_[t])if(this.isTainted_()){var e=this.color_?t:1,r=this.size_[0],i=this.size_[1],n=zn(Math.ceil(r*e),Math.ceil(i*e));n.scale(e,e),n.fillRect(0,0,r,i),this.hitDetectionImage_[t]=n.canvas}else this.hitDetectionImage_[t]=this.image_;return this.hitDetectionImage_[t]},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState
 _==bo){this.imageState_=So;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Zu(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var r=e.getContext("2d");if(r.scale(t,t),r.drawImage(this.image_,0,0),this.isTainted_()){var i=this.color_;return r.globalCompositeOperation="multiply",r.fillStyle="rgb("+i[0]+","+i[1]+","+i[2]+")",r.fillRect(0,0,e.width,e.height),r.globalCompositeOperation="destination-in",void r.drawImage(this.image_,0,0)}for(var n=r.getImageData(0,0,e.width,e.height),o=n.data,s=this.color_[0]/255,a=this.color_[1]/255,l=this.color_[2]/255,u=0,h=o.length;u<h;u+=4)o[u]*=s,o[u+1]*=a,o[u+2]*=l;r.putImageData(n,0,0)}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}
 ,e}(I);var Qu=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),th=function(t){function e(e){var r=this,i=e||{},n=void 0!==i.opacity?i.opacity:1,s=void 0!==i.rotation?i.rotation:0,a=void 0!==i.scale?i.scale:1,l=void 0!==i.rotateWithView&&i.rotateWithView;(r=t.call(this,{opacity:n,rotation:s,scale:a,displacement:void 0!==i.displacement?i.displacement:[0,0],rotateWithView:l})||this).anchor_=void 0!==i.anchor?i.anchor:[.5,.5],r.normalizedAnchor_=null,r.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:Yu,r.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:Gu,r.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:Gu,r.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var u=void 0!==i.img?i.img:null,h=v
 oid 0!==i.imgSize?i.imgSize:null,c=i.src;lt(!(void 0!==c&&u),4),lt(!u||u&&h,5),void 0!==c&&0!==c.length||!u||(c=u.src||o(u)),lt(void 0!==c&&c.length>0,6);var p=void 0!==i.src?bo:To;return r.color_=void 0!==i.color?tn(i.color):null,r.iconImage_=function(t,e,r,i,n,o){var s=sn.get(e,i,o);return s||(s=new $u(t,e,r,i,n,o),sn.set(e,i,o,s)),s}(u,c,h,r.crossOrigin_,p,r.color_),r.offset_=void 0!==i.offset?i.offset:[0,0],r.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:Yu,r.origin_=null,r.size_=void 0!==i.size?i.size:null,r}return Qu(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:A
 rray.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Gu||this.anchorYUnits_==Gu){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Gu&&(t[0]*=e[0]),this.anchorYUnits_==Gu&&(t[1]*=e[1])}if(this.anchorOrigin_!=Yu){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Wu&&this.anchorOrigin_!=Uu||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Bu&&this.anchorOrigin_!=Uu||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconI
 mage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if(this.offsetOrigin_!=Yu){var r=this.getSize(),i=this.iconImage_.getSize();if(!r||!i)return null;t=t.slice(),this.offsetOrigin_!=Wu&&this.offsetOrigin_!=Uu||(t[0]=i[0]-r[0]-t[0]),this.offsetOrigin_!=Bu&&this.offsetOrigin_!=Uu||(t[1]=i[1]-r[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(O,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChang
 e=function(t){this.iconImage_.removeEventListener(O,t)},e}(Fu),eh=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){retu
 rn this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),rh=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=sh,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone()
 :void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geo
 metryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=sh,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var ih=null;function nh(t,e){if(!ih){var r=new Du({color:"rgba(255,255,255,0.4)"}),i=new eh({color:"#3399CC",width:1.25});ih=[new rh({image:new ju({fill:r,stroke:i,radius:5}),fill:r,stroke:i})]}return ih}function oh(){var t={},e=[255,255,255,1],r=[0,153,255,1];return t[gt.POLYGON]=[new rh({fill:new Du({color:[255,255,255,.5]})})],t[gt.MULTI_POLYGON]=t[gt.POLYGON],t[gt.LINE_STRING]=[new rh({stroke:new eh({color:e,width:5})}),new rh({stroke:new eh({color:r,width:3})})],t[gt.MULTI_LINE_STRING]=t[gt.LINE_STRING],t[gt.CIRCLE]=t[gt.POLYGON].concat(t[gt.LINE_STRING]),t[gt.POINT]=[new rh({image:new ju({radius:6,fill:new Du({color:r}),stroke:new eh({color:e,width:1.5})}),zIndex:1/0})],t[gt.MULTI_POINT]=t[gt.POINT],t[gt.GEOMETRY_COLLECTION]=t[gt.POLYGON].concat(t[gt.LINE_STRING],t[gt.POINT]),t
 }function sh(t){return t.getGeometry()}var ah=rh,lh="point",uh="line",hh=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=Ds(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new Du({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:lh,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overf
 low:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){ret
 urn this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWi
 thView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Ds(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}(),ch=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ph=function(t){function e(e,r,i){var n=t.call(this)||this,o=i||
 {};return n.tileCoord=e,n.state=r,n.interimTile=null,n.hifi=!0,n.key="",n.transition_=void 0===o.transition?250:o.transition,n.transitionStarts_={},n}return ch(e,t),e.prototype.changed=function(){this.dispatchEvent(O)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==cs)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==cs){t.interimTile=null;break}t.getState()==hs?e=t:t.getState()==us?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==ps&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.p
 rototype.load=function(){i()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var r=this.transitionStarts_[t];if(r){if(-1===r)return 1}else r=e,this.transitionStarts_[t]=r;var i=e-r+1e3/60;return i>=this.transition_?1:Ps(i/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(I),dh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();var fh,gh=function(t){function e(e,r,i,n,o,s){var a=t.call(this,e,r,s)||this;return a.crossOrigin_=n,a.src_=i,a.image_=new Image,null!==n&&(a.image_.crossOrigin=n),a.unlisten_=null,a.tileLoadFunction_=o,a}return dh(e,
 t),e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){var t;this.state=ps,this.unlistenImage_(),this.image_=((t=zn(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=cs:this.state=ds,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==ps&&(this.state=us,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==us&&(this.state=hs,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Zu(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(ph),yh=function(){function t(t,e,r,i,n,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=Sr(this.targetProj_,this.sourcePr
 oj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=i,this.errorThresholdSquared_=n*n,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&fe(i)==fe(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?fe(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?fe(this.targetProj_.getExtent()):null;var l=pe(r),u=de(r),h=se(r),c=oe(r),p=this.transformInv_(l),d=this.transformInv_(u),f=this.transformInv_(h),g=this.transformInv_(c),y=10+(o?Math.max(0,Math.ceil(Se(ne(r)/(o*o*256*256)))):0);if(this.addQuad_(l,u,h,c,p,d,f,g,y),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,r){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0]
 [0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var r=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-r<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,r,i,n,o){this.triangles_.push({source:[i,n,o],target:[t,e,r]})},t.prototype.addQuad_=function(t,e,r,i,n,o,s,a,l){var u=Dt([n,o,s,a]),h=this.sourceWorldWidth_?fe(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=fe(Dt([t,e,r,i]))/this.targetWorldWidth_>.25||d;!p&&this.sourceProj_.isGlobal()&&h&&(d=h>.25||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||g
 e(u,this.maxSourceExtent_)){var f=0;if(!(d||isFinite(n[0])&&isFinite(n[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)d=!0;else if(1!=(f=(isFinite(n[0])&&isFinite(n[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!d){var g=[(t[0]+r[0])/2,(t[1]+r[1])/2],y=this.transformInv_(g),m=void 0;if(p)m=(Pe(n[0],c)+Pe(s[0],c))/2-Pe(y[0],c);else m=(n[0]+s[0])/2-y[0];var _=(n[1]+s[1])/2-y[1];d=m*m+_*_>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-r[0])<=Math.abs(t[1]-r[1])){var v=[(e[0]+r[0])/2,(e[1]+r[1])/2],x=this.transformInv_(v),w=[(i[0]+t[0])/2,(i[1]+t[1])/2],b=this.transformInv_(w);this.addQuad_(t,e,v,w,n,o,x,b,l-1),this.addQuad_(w,v,r,i,b,x,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],T=this.transformInv_(S),C=[(r[0]+i[0])/2,(r[1]+i[1])/2],E=this.transformInv_(C);this.addQuad_(t,S,C,i,n,T,E,a,l-1),this.addQuad_(S
 ,e,r,C,T,o,s,E,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,r,i,n,s,a),0==(14&f)&&this.addTriangle_(t,r,e,n,s,o),f&&(0==(13&f)&&this.addTriangle_(e,i,t,o,a,n),0==(7&f)&&this.addTriangle_(e,i,r,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,r,i){var n=e.source;Qt(t,n[0]),Qt(t,n[1]),Qt(t,n[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),mh={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function _h(t,e,r,i,n){t.beginPath(),t.moveTo(0,0),t.lineTo(e,r),t.lineTo(i,n),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(r,n)),t.restore()}function vh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function xh(t,e,r,i){var n=Tr(r,e,t),o=yr(e,i,r),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||Ut(l,n)){var u=yr(t,o,n)/o;
 isFinite(u)&&u>0&&(o/=u)}return o}function wh(t,e,r,i,n,o,s,a,l,u,h,c){var p=zn(Math.round(r*t),Math.round(r*e));if(T(p,c),0===l.length)return p.canvas;function d(t){return Math.round(t*r)/r}p.scale(r,r),p.globalCompositeOperation="lighter";var f=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,r){$t(f,t.extent)}));var g=fe(f),y=he(f),m=zn(Math.round(r*g/i),Math.round(r*y/i));T(m,c);var _=r/i;l.forEach((function(t,e,r){var i=t.extent[0]-f[0],n=-(t.extent[3]-f[3]),o=fe(t.extent),s=he(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,i*_,n*_,o*_,s*_)}));var v=pe(s);return a.getTriangles().forEach((function(t,e,n){var s=t.source,a=t.target,l=s[0][0],u=s[0][1],h=s[1][0],g=s[1][1],y=s[2][0],_=s[2][1],x=d((a[0][0]-v[0])/o),w=d(-(a[0][1]-v[1])/o),b=d((a[1][0]-v[0])/o),S=d(-(a[1][1]-v[1])/o),T=d((a[2][0]-v[0])/o),C=d(-(a[2][1]-v[1])/o),E=l,R=u;l=0,u=0;var P=function(t){for(var e=t.length,r=0;r<e;r++){for(var i=r,n=Math.abs(t[r][r]),o=r+1;o<
 e;o++){var s=Math.abs(t[o][r]);s>n&&(n=s,i=o)}if(0===n)return null;var a=t[i];t[i]=t[r],t[r]=a;for(var l=r+1;l<e;l++)for(var u=-t[l][r]/t[r][r],h=r;h<e+1;h++)r==h?t[l][h]=0:t[l][h]+=u*t[r][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var d=p-1;d>=0;d--)t[d][e]-=t[d][p]*c[p]}return c}([[h-=E,g-=R,0,0,b-x],[y-=E,_-=R,0,0,T-x],[0,0,h,g,S-w],[0,0,y,_,C-w]]);if(P){if(p.save(),p.beginPath(),function(){if(void 0===fh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",_h(t,4,5,4,0),_h(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;fh=vh(e,0)||vh(e,4)||vh(e,8)}return fh}()||c===mh){p.moveTo(b,S);for(var I=x-b,O=w-S,L=0;L<4;L++)p.lineTo(b+d((L+1)*I/4),S+d(L*O/3)),3!=L&&p.lineTo(b+d((L+1)*I/4),S+d((L+1)*O/3));p.lineTo(T,C)}else p.moveTo(b,S),p.lineTo(x,w),p.lineTo(T,C);p.clip(),p.transform(P[0],P[2],P[1],P[3],x,w),p.translate(f[0]-E,f[3]-R),p.scale(i/r,-i/r),p.drawImage(m.canvas,0,0),p.restore()
 }})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,r){var i=t.target,n=(i[0][0]-v[0])/o,s=-(i[0][1]-v[1])/o,a=(i[1][0]-v[0])/o,l=-(i[1][1]-v[1])/o,u=(i[2][0]-v[0])/o,h=-(i[2][1]-v[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(n,s),p.lineTo(u,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var bh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Sh=function(t){function e(e,r,i,n,o,s,a,l,u,h,c,p){var d=t.call(this,o,us)||this;d.renderEdges_=void 0!==c&&c,d.contextOptions_=p,d.pixelRatio_=a,d.gutter_=l,d.canvas_=null,d.sourceTileGrid_=r,d.targetTileGrid_=n,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.
 sourceZ_=0;var f=n.getTileCoordExtent(d.wrappedTileCoord_),g=d.targetTileGrid_.getExtent(),y=d.sourceTileGrid_.getExtent(),m=g?ce(f,g):f;if(0===ne(m))return d.state=ds,d;var _=e.getExtent();_&&(y=y?ce(y,_):_);var v=n.getResolution(d.wrappedTileCoord_[0]),x=function(t,e,r,i){var n=ae(r),o=xh(t,e,n,i);return(!isFinite(o)||o<=0)&&ie(r,(function(r){return o=xh(t,e,r,i),isFinite(o)&&o>0})),o}(e,i,m,v);if(!isFinite(x)||x<=0)return d.state=ds,d;var w=void 0!==h?h:.5;if(d.triangulation_=new yh(e,i,m,y,x*w,v),0===d.triangulation_.getTriangles().length)return d.state=ds,d;d.sourceZ_=r.getZForResolution(x);var b=d.triangulation_.calculateSourceExtent();if(y&&(e.canWrapX()?(b[1]=we(b[1],y[1],y[3]),b[3]=we(b[3],y[1],y[3])):b=ce(b,y)),ne(b)){for(var S=r.getTileRangeForExtentAndZ(b,d.sourceZ_),T=S.minX;T<=S.maxX;T++)for(var C=S.minY;C<=S.maxY;C++){var E=u(d.sourceZ_,T,C,a);E&&d.sourceTiles_.push(E)}0===d.sourceTiles_.length&&(d.state=ds)}else d.state=ds;return d}return bh(e,t),e.prototype.getImage
 =function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,r,i){e&&e.getState()==cs&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=ps;else{var e=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(e),i="number"==typeof r?r:r[0],n="number"==typeof r?r:r[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=wh(i,n,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=cs}this.changed()},e.prototype.load=function(){if(this.state==us){this.state=hs,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,r,i){var n=e.getState();if(n==us||n==hs){t++;var o=W(e,O,(function(r){var i=e.g
 etState();i!=cs&&i!=ps&&i!=ds||(X(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach((function(t,e,r){t.getState()==us&&t.load()})),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(X),this.sourcesListenerKeys_=null},e}(ph),Th=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var r=this.entries_[t];return lt(void 0!==r,15),r===this.newest_||(r===th
 is.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_},t.prototype.remove=function(t){var e=this.entries_[t];return lt(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.n
 ewest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){lt(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(),Ch=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Eh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ch(e,t),e.prototype.expireCache=func
 tion(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Pl(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Rl(e.tileCoord)),e.release())}.bind(this))}},e}(Th),Rh="tileloadstart",Ph="tileloadend",Ih="tileloaderror",Oh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Lh(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Mh=function(t){function e(e){var r=t.call(this)||this;return r.projection_=gr(e.projection),r.attributions_=Lh(e.attributions),r.attributionsCollapsible_=void 0===e.attributionsCollapsi
 ble||e.attributionsCollapsible,r.loading=!1,r.state_=void 0!==e.state?e.state:Cn,r.wrapX_=void 0!==e.wrapX&&e.wrapX,r}return Oh(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return i()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Lh(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(et),Fh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(
 e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ah=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;r.opaque_=void 0!==e.opaque&&e.opaque,r.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,r.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var i=e.tileGrid;return i&&Ds(i.getTileSize(i.getMinZoom()),[256,256]),r.tileCache=new Eh(e.cacheSize||0),r.tmpSize=[0,0],r.key_=e.key||"",r.tileOptions={transition:e.transition},r.zDirection=e.zDirection?e.zDirection:0,r}return Fh(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);r&&r.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,r,i){var n=this.getTileCacheForProjection(t);if(!n)return!1;for(var o,s,a,l=!0,u=r.minX;u<=r.maxX;++u)for(var h=r.minY;h<=r.max
 Y;++h)s=El(e,u,h),a=!1,n.containsKey(s)&&(a=(o=n.get(s)).getState()===cs)&&(a=!1!==i(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,r,n,o){return i()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Ml(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!wr(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,r){var i=this.getTileGridForProjection(r),n=this.getTilePixelRatio(e),o=Ds(i.getTileSize(t),this.tmpSize);return 1==n?o:js(o,n,this.tmpSize)},e.p
 rototype.getTileCoordForTileUrlFunction=function(t,e){var r=void 0!==e?e:this.getProjection(),i=this.getTileGridForProjection(r);return this.getWrapX()&&r.isGlobal()&&(t=function(t,e,r){var i=e[0],n=t.getTileCoordCenter(e),o=Nl(r);if(Ut(o,n))return e;var s=fe(o),a=Math.ceil((o[0]-n[0])/s);return n[0]+=s*a,t.getTileCoordForCoordAndZ(n,i)}(i,t,r)),function(t,e){var r=t[0],i=t[1],n=t[2];if(e.getMinZoom()>r||r>e.getMaxZoom())return!1;var o,s=e.getExtent();return!(o=s?e.getTileRangeForExtentAndZ(s,r):e.getFullTileRange(r))||o.containsXY(i,n)}(t,i)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var r=this.getTileCacheForProjection(e);t>r.highWaterMark&&(r.highWaterMark=t)},e.prototype.useTile=function(t,e,r,i){},e}(Mh),kh=function(t){function e(e,r){var i=t.call(this,e)||this;return i.tile=r,i}return Fh(e,t),e}(h),Nh=Ah;function jh(t,e){var r=/\{z\}/g,i=/\{x\
 }/g,n=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(r,s[0].toString()).replace(i,s[1].toString()).replace(n,s[2].toString()).replace(o,(function(){var t=s[0],r=e.getFullTileRange(t);return lt(r,55),(r.getHeight()-s[2]-1).toString()})):void 0}}function Dh(t,e){for(var r=t.length,i=new Array(r),n=0;n<r;++n)i[n]=jh(t[n],e);return Gh(i)}function Gh(t){return 1===t.length?t[0]:function(e,r,i){if(e){var n=Pe(Il(e),t.length);return t[n](e,r,i)}}}function zh(t,e,r){}function Bh(t){var e=[],r=/\{([a-z])-([a-z])\}/.exec(t);if(r){var i=r[1].charCodeAt(0),n=r[2].charCodeAt(0),o=void 0;for(o=i;o<=n;++o)e.push(t.replace(r[0],String.fromCharCode(o)));return e}if(r=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(r[2],10),a=parseInt(r[1],10);a<=s;a++)e.push(t.replace(r[0],a.toString()));return e}return e.push(t),e}var Uh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProp
 erty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Yh=function(t){function e(r){var i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,opaque:r.opaque,projection:r.projection,state:r.state,tileGrid:r.tileGrid,tilePixelRatio:r.tilePixelRatio,wrapX:r.wrapX,transition:r.transition,key:r.key,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=r.tileLoadFunction,r.tileUrlFunction&&(i.tileUrlFunction=r.tileUrlFunction.bind(i)),i.urls=null,r.urls?i.setUrls(r.urls):r.url&&i.setUrl(r.url),i.tileLoadingKeys_={},i}return Uh(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileC
 hange=function(t){var e,r=t.target,i=o(r),n=r.getState();n==hs?(this.tileLoadingKeys_[i]=!0,e=Rh):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=n==ps?Ih:n==cs?Ph:void 0),null!=e&&this.dispatchEvent(new kh(e,r))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=Bh(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Dh(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,r){},e.prototype.useTile=function(t,e,r){var i=El(t,e,r);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(Nh),Wh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||
 function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Vh(t,e){t.getImage().src=e}var Xh=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Vh,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return r.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,r.tileClass=void 0!==e.tileClass?e.tileClass:gh,r.tileCacheForProjection={},r.tileGridForProjection={},r.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,r.contextOptions_=!1===e.imageSmoothing?mh:void 0,r.renderReprojectionEdges_=!1,
 r}return Wh(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);for(var i in this.tileCache.expireCache(this.tileCache==r?e:{}),this.tileCacheForProjection){var n=this.tileCacheForProjection[i];n.expireCache(n==r?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!wr(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!wr(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=functi
 on(t){var e=this.getProjection();if(!this.tileGrid||e&&!wr(e,t)){var r=o(t);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Ml(t)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||wr(e,t))return this.tileCache;var r=o(t);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new Eh(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,r,i,n,o){var s=[t,e,r],a=this.getTileCoordForTileUrlFunction(s,n),l=a?this.tileUrlFunction(a,i,n):void 0,u=new this.tileClass(s,void 0!==l?us:ds,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(O,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,r,i,n){var o=this.getProjection();if(o&&n&&!wr(o,n)){var s=this.getTileCacheForProjection(n),a=[t,e,r],l=void 0,u=Rl(a);s.containsKey(u)&&(l=s.get(u));var h=this.
 getKey();if(l&&l.key==h)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(n),d=this.getTileCoordForTileUrlFunction(a,n),f=new Sh(o,c,n,p,a,d,this.getTilePixelRatio(i),this.getGutter(),function(t,e,r,i){return this.getTileInternal(t,e,r,i,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return f.key=h,l?(f.interimTile=l,f.refreshInterimChain(),s.replace(u,f)):s.set(u,f),f}return this.getTileInternal(t,e,r,i,o||n)},e.prototype.getTileInternal=function(t,e,r,i,n){var o=null,s=El(t,e,r),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,r,i,n,a),l.getState()==us?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,r,i,n,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderRepr
 ojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var r=gr(t);if(r){var i=o(r);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}},e}(Yh);function qh(t,e,r,i){var n=document.createElement("script"),s="olc_"+o(e);function a(){delete window[s],n.parentNode.removeChild(n)}n.async=!0,n.src=t+(-1==t.indexOf("?")?"?":"&")+(i||"callback")+"="+s;var l=setTimeout((function(){a(),r&&r()}),1e4);window[s]=function(t){clearTimeout(l),a(),e(t)},document.getElementsByTagName("head")[0].appendChild(n)}var Zh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();var Kh=function(t){function e(e){var r=this,i=void 
 0!==e.hidpi&&e.hidpi;return(r=t.call(this,{cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,opaque:!0,projection:gr("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Tn,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition})||this).hidpi_=i,r.culture_=void 0!==e.culture?e.culture:"en-us",r.maxZoom_=void 0!==e.maxZoom?e.maxZoom:-1,r.apiKey_=e.key,r.imagerySet_=e.imagerySet,qh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+r.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+r.apiKey_+"&c="+r.culture_,r.handleImageryMetadataResponse.bind(r),void 0,"jsonp"),r}return Zh(e,t),e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.l
 ength&&1==t.resourceSets[0].resources.length){var e=t.resourceSets[0].resources[0],r=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,i=Nl(this.getProjection()),n=this.hidpi_?2:1,o=e.imageWidth==e.imageHeight?e.imageWidth/n:[e.imageWidth/n,e.imageHeight/n],s=Fl({extent:i,minZoom:e.zoomMin,maxZoom:r,tileSize:o});this.tileGrid=s;var a=this.culture_,l=this.hidpi_;if(this.tileUrlFunction=Gh(e.imageUrlSubdomains.map((function(t){var r=[0,0,0],i=e.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,e,n){if(t){Cl(t[0],t[1],t[2],r);var o=i;return l&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",function(t){var e,r,i=t[0],n=new Array(i),o=1<<i-1;for(e=0;e<i;++e)r=48,t[1]&o&&(r+=1),t[2]&o&&(r+=2),n[e]=String.fromCharCode(r),o>>=1;return n.join("")}(r))}}}))),e.imageryProviders){var u=br(gr("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var r=[],i=t.viewState,n=this.getTileGrid(),o=n.getZForResolution(i.resolution,this.zDirection),s=n.getTileCoordForCo
 ordAndZ(i.center,o)[0];return e.imageryProviders.map((function(e){for(var i=!1,n=e.coverageAreas,o=0,a=n.length;o<a;++o){var l=n[o];if(s>=l.zoomMin&&s<=l.zoomMax){var h=l.bbox;if(ge(_e([h[1],h[0],h[3],h[2]],u),t.extent)){i=!0;break}}}i&&r.push(e.attribution)})),r.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),r}.bind(this))}this.setState(Cn)}else this.setState(En)},e}(Xh),Hh=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Jh=function(t){function e(e){var r=e||{},i=void 0!==r.projection?r.projection:"EPSG:3857",n=void 0!==r.tileGrid?r.tileGrid:Fl({extent:Nl(i),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoo
 m,tileSize:r.tileSize});return t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,opaque:r.opaque,projection:i,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this}return Hh(e,t),e}(Xh),$h=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Qh=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,maxZoom:v
 oid 0!==e.maxZoom?e.maxZoom:18,minZoom:e.minZoom,projection:e.projection,wrapX:e.wrapX})||this;return r.account_=e.account,r.mapId_=e.map||"",r.config_=e.config||{},r.templateCache_={},r.initializeMap_(),r}return $h(e,t),e.prototype.getConfig=function(){return this.config_},e.prototype.updateConfig=function(t){T(this.config_,t),this.initializeMap_()},e.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},e.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var r=new XMLHttpRequest;r.addEventListener("load",this.handleInitResponse_.bind(this,t)),r.addEventListener("error",this.handleInitError_.bind(this)),r.open("POST",e),r.setRequestHeader("Content-type","application/json"),r.send(JSON.stringify(this.config_))}},e.prototype.handleInitResponse_=function(t,e){var r=e.target;if(
 !r.status||r.status>=200&&r.status<300){var i=void 0;try{i=JSON.parse(r.responseText)}catch(t){return void this.setState(En)}this.applyTemplate_(i),this.templateCache_[t]=i,this.setState(Cn)}else this.setState(En)},e.prototype.handleInitError_=function(t){this.setState(En)},e.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},e}(Jh),tc=r(1),ec=r.n(tc),rc=function(){function t(t){this.rbush_=new ec.a(t),this.items_={}}return t.prototype.insert=function(t,e){var r={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(r),this.items_[o(e)]=r},t.prototype.load=function(t,e){for(var r=new Array(e.length),i=0,n=e.length;i<n;i++){var s=t[i],a=e[i],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};r[i]=l,this.items_[o(a)]=l}this.rbush_.load(r)},t.prototype.remove=function(t){var e=o(t),r=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(r)},t.prototype.up
 date=function(t,e){var r=this.items_[o(e)];Jt([r.minX,r.minY,r.maxX,r.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var r,i=0,n=t.length;i<n;i++)if(r=e(t[i]))return r;return r},t.prototype.isEmpty=function(){return R(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return qt(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),ic="addfeature",nc="changefeature",oc="clea
 r",sc="removefeature",ac=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),lc=function(t){function e(e,r){var i=t.call(this,e)||this;return i.feature=r,i}return ac(e,t),e}(h),uc=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{attributions:i.attributions,projection:void 0,state:Cn,wrapX:void 0===i.wrapX||i.wrapX})||this).loader_=S,r.format_=i.format,r.overlaps_=void 0===i.overlaps||i.overlaps,r.url_=i.url,void 0!==i.loader?r.loader_=i.loader:void 0!==r.url_&&(lt(r.format_,7),r.loader_=xl(r.url_,r.format_)),r.strategy_=void 0!==i.strategy?i.strategy:wl;var n,o,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return r.featuresRtree_=s?new rc:null,r.loadedExtentsRtree_=new rc,r.nullGeometryFeatures_={
 },r.idIndex_={},r.uidIndex_={},r.featureChangeKeys_={},r.featuresCollection_=null,Array.isArray(i.features)?o=i.features:i.features&&(o=(n=i.features).getArray()),s||void 0!==n||(n=new at(o)),void 0!==o&&r.addFeaturesInternal(o),void 0!==n&&r.bindFeaturesCollection_(n),r}return ac(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=o(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var r=t.getGeometry();if(r){var i=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new lc(ic,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[W(e,O,this.handleFeatureChange_,this),W(e,c,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var r=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?r=!1:this.idIndex_[i.toStr
 ing()]=e),r&&(lt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),r},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],r=[],i=[],n=0,s=t.length;n<s;n++){var a=o(u=t[n]);this.addToIndex_(a,u)&&r.push(u)}n=0;for(var l=r.length;n<l;n++){var u;a=o(u=r[n]);this.setupChangeEvents_(a,u);var h=u.getGeometry();if(h){var c=h.getExtent();e.push(c),i.push(u)}else this.nullGeometryFeatures_[a]=u}this.featuresRtree_&&this.featuresRtree_.load(e,i);n=0;for(var p=r.length;n<p;n++)this.dispatchEvent(new lc(ic,r[n]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(ic,(function(r){e||(e=!0,t.push(r.feature),e=!1)})),this.addEventListener(sc,(function(r){e||(e=!0,t.remove(r.feature),e=!1)})),t.addEventListener(rt,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(it,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresColle
 ction_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(X)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var r in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var i=new lc(oc);this.dispatchEvent(i),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var r=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(r,(function(r){return r.getGeometry().intersectsCoordinate(t)?e(r):void 0}))},e.prototype.forEachFeatureInExtent=f
 unction(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(r){if(r.getGeometry().intersectsExtent(t)){var i=e(r);if(i)return i}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),R(this.nullGeometryFeatures_)||m(t,E(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray():[]},e.prototype.getClosestFeatureToCoordinate=function(t,e)
 {var r=t[0],i=t[1],n=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||w;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),u=s;if((s=e.closestPointXY(r,i,o,s))<u){n=t;var h=Math.sqrt(s);a[0]=r-h,a[1]=i-h,a[2]=r+h,a[3]=i+h}}})),n},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,r=o(e),i=e.getGeometry();if(i){var n=i.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(n,e)):this.featuresRtree_&&this.featuresRtree_.update(n,e)}else r in this.n
 ullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[r]=e);var s=e.getId();if(void 0!==s){var a=s.toString();this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[r]=e;this.changed(),this.dispatchEvent(new lc(nc,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:o(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&R(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,r){var i=this.loadedExtentsRtree_,n=this.strategy_(t,e);this.loading=!1;for(var o=function(t,o){var a=n[t];i.forEachInExtent(a,(function(t){return Yt(t.extent,a)}))||(s.loader_.call(s,a,e,r),i.insert(a,{extent:a.slice()}),s.loading=s.loader_!==S)},s=this,a=0,l=n.length;a<l;++a)o(a)},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedE
 xtent=function(t){var e,r=this.loadedExtentsRtree_;r.forEachInExtent(t,(function(r){if(Jt(r.extent,t))return e=r,!0})),e&&r.remove(e)},e.prototype.removeFeature=function(t){var e=o(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=o(t);this.featureChangeKeys_[e].forEach(X),delete this.featureChangeKeys_[e];var r=t.getId();void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new lc(sc,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===t){delete this.idIndex_[r],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){lt(this.format_,7),this.setLoader(xl(t,this.format_))},e}(Mh),hc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&functi
 on(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),cc=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return r.resolution=void 0,r.distance=void 0!==e.distance?e.distance:20,r.features=[],r.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return lt(e.getType()==gt.POINT,10),e},r.boundRefresh_=r.refresh.bind(r),r.setSource(e.source||null),r}return hc(e,t),e.prototype.clear=function(e){this.features.length=0,t.prototype.clear.call(this,e)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,r){this.source.loadFeatures(t,e,r),e!==this.resolution&&(this.clear(),this.resolution=e,this.cluster(),this.addFeatures(this.features))},e.prototype.setDistance=
 function(t){this.distance=t,this.refresh()},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(O,this.boundRefresh_),this.source=t,t&&t.addEventListener(O,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,r=this.source.getFeatures(),i={},n=0,s=r.length;n<s;n++){var a=r[n];if(!(o(a)in i)){var l=this.geometryFunction(a);if(l){Kt(l.getCoordinates(),t),Gt(t,e,t);var u=this.source.getFeaturesInExtent(t);u=u.filter((function(t){var e=o(t);return!(e in i)&&(i[e]=!0,!0)})),this.features.push(this.createCluster(u))}}}},e.prototype.createCluster=function(t){for(var e=[0,0],r=t.length-1;r>=0;--r){var i=this.geometryFunction(t[r]);i?Qe(e,i.getCoordinates()):t.splice(r,1)}or(e,1/t.length);var n=new ht(new pi(e));return n.set("features",t),n},e}(uc),pc=function
 (){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),dc="default",fc="truncated",gc=function(t){function e(e,r,i,n,o,s,a){var l=t.call(this,r,i,n,o,s,a)||this;return l.zoomifyImage_=null,l.tileSize_=e,l}return pc(e,t),e.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var e=t.prototype.getImage.call(this);if(this.state==cs){var r=this.tileSize_;if(e.width==r[0]&&e.height==r[1])return this.zoomifyImage_=e,e;var i=zn(r[0],r[1]);return i.drawImage(e,0,0),this.zoomifyImage_=i.canvas,i.canvas}return e},e}(gh),yc=function(t){function e(e){var r=this,i=e,n=i.size,o=void 0!==i.tierSizeCalculation?i.tierSizeCalculation:dc,s=i.tilePixelRatio||1,a=n[0],l=n[1],u=[],h=i.tileSize||256,c=h*s;switch(o){case
  dc:for(;a>c||l>c;)u.push([Math.ceil(a/c),Math.ceil(l/c)]),c+=c;break;case fc:for(var p=a,d=l;p>c||d>c;)u.push([Math.ceil(p/c),Math.ceil(d/c)]),p>>=1,d>>=1;break;default:lt(!1,53)}u.push([1,1]),u.reverse();for(var f=[s],g=[0],y=1,m=u.length;y<m;y++)f.push(s<<y),g.push(u[y-1][0]*u[y-1][1]+g[y-1]);f.reverse();var _=new Ll({tileSize:h,extent:i.extent||[0,-l,a,0],resolutions:f}),v=i.url;v&&-1==v.indexOf("{TileGroup}")&&-1==v.indexOf("{tileIndex}")&&(v+="{TileGroup}/{z}-{x}-{y}.jpg");var x=Bh(v),w=h*s;var b=Gh(x.map((function(t){return function(e,r,i){if(e){var n=e[0],o=e[1],s=e[2],a=o+s*u[n][0],l={z:n,x:o,y:s,tileIndex:a,TileGroup:"TileGroup"+((a+g[n])/w|0)};return t.replace(/\{(\w+?)\}/g,(function(t,e){return l[e]}))}}}))),S=gc.bind(null,Ds(h*s));(r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,projection:i.projection,tilePixelRatio:s,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:S,tileGrid:_
 ,tileUrlFunction:b,transition:i.transition})||this).zDirection=i.zDirection;var T=b(_.getTileCoordForCoordAndResolution(ae(_.getExtent()),f[f.length-1]),1,null),C=new Image;return C.addEventListener("error",function(){w=h,this.changed()}.bind(r)),C.src=T,r}return pc(e,t),e}(Xh),mc=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var i=Array(t),n=0;for(e=0;e<r;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,n++)i[n]=o[s];return i},_c="version1",vc="version2",xc="version3",wc={};wc[_c]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},wc[vc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg
 "],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},wc[xc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},wc.none={none:{supports:[],formats:[],qualities:[]}};var bc=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Sc=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Tc=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var Cc={};Cc[_c]=function(t){var e=t.getComplianceLevelSupportedFeatures();return void 0===e&&(e=wc[_c].level0),{url:void 0===t.imag
 eInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:mc(e.formats,[void 0===t.imageInfo.formats?[]:t.imageInfo.formats]),qualities:mc(e.qualities,[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities]),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},Cc[vc]=function(t){var e=t.getComplianceLevelSupportedFeatures(),r=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,i=r&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],n=r&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=r&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes
 ?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:mc(e.supports,i),formats:mc(e.formats,n),qualities:mc(e.qualities,o)}},Cc[xc]=function(t){var e=t.getComplianceLevelSupportedFeatures(),r=void 0===t.imageInfo.extraFormats?e.formats:mc(e.formats,t.imageInfo.extraFormats),i=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return["jpg","png","gif"].includes(t)})).reduce((function(t,e){return void 0===t&&r.includes(e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.wid
 th,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:mc(e.supports,t.imageInfo.extraFeatures),formats:r,qualities:void 0===t.imageInfo.extraQualities?e.qualities:mc(e.qualities,t.imageInfo.extraQualities),preferredFormat:i}};var Ec=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var e=0;e<t.length;e++)switch(t[e]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return _c;case"http://iiif.io/api/image
 /2/context.json":return vc;case"http://iiif.io/api/image/3/context.json":return xc;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(_c)&&this.imageInfo.identifier)return _c}lt(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case _c:if(bc.test(this.imageInfo.profile))return this.imageInfo.profile;break;case xc:if(Tc.test(this.imageInfo.profile))return this.imageInfo.profile;break;case vc:if("string"==typeof this.imageInfo.profile&&Sc.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&Sc.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var e=this.getComplianceLevelEntryFromProfile(t);if(void 0!==e){var r=e.match(/level[0-2](?:\.json)?$/g);return 
 Array.isArray(r)?r[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?wc.none.none:wc[t][e]}},t.prototype.getTileSourceOptions=function(t){var e=t||{},r=this.getImageApiVersion();if(void 0!==r){var i=void 0===r?void 0:Cc[r](this);if(void 0!==i)return{url:i.url,version:r,size:[this.imageInfo.width,this.imageInfo.height],sizes:i.sizes,format:void 0!==e.format&&i.formats.includes(e.format)?e.format:void 0!==i.preferredFormat?i.preferredFormat:"jpg",supports:i.supports,quality:e.quality&&i.qualities.includes(e.quality)?e.quality:i.qualities.includes("native")?"native":"default",resolutions:Array.isArray(i.resolutions)?i.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:i.tileSize}}},t}(),Rc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||functi
 on(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Pc(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Ic=function(t){function e(e){var r=this,i=e||{},n=i.url||"";n+=n.lastIndexOf("/")===n.length-1||""===n?"":"/";var o=i.version||vc,s=i.sizes||[],a=i.size;lt(null!=a&&Array.isArray(a)&&2==a.length&&!isNaN(a[0])&&a[0]>0&&!isNaN(a[1])&&a[1]>0,60);var l,u,h,c=a[0],p=a[1],d=i.tileSize,f=i.tilePixelRatio||1,g=i.format||"jpg",y=i.quality||(i.version==_c?"native":"default"),m=i.resolutions||[],_=i.supports||[],v=i.extent||[0,-p,c,0],x=null!=s&&Array.isArray(s)&&s.length>0,w=void 0!==d&&("number"==typeof d&&Number.isInteger(d)&&d>0||Array.isArray(d)&&d.length>0),b=null!=_&&Array.isArray(_)&&(_.includes("regionByPx")||_.includes("regionByPct"))&&(_.includes("sizeByWh")||_.includes("sizeByH")||_.includes("sizeByW")||_.include
 s("sizeByPct"));if(m.sort((function(t,e){return e-t})),w||b)if(null!=d&&("number"==typeof d&&Number.isInteger(d)&&d>0?(l=d,u=d):Array.isArray(d)&&d.length>0&&((1==d.length||null==d[1]&&Number.isInteger(d[0]))&&(l=d[0],u=d[0]),2==d.length&&(Number.isInteger(d[0])&&Number.isInteger(d[1])?(l=d[0],u=d[1]):null==d[0]&&Number.isInteger(d[1])&&(l=d[1],u=d[1])))),void 0!==l&&void 0!==u||(l=256,u=256),0==m.length)for(var S=h=Math.max(Math.ceil(Math.log(c/l)/Math.LN2),Math.ceil(Math.log(p/u)/Math.LN2));S>=0;S--)m.push(Math.pow(2,S));else{var T=Math.max.apply(Math,m);h=Math.round(Math.log(T)/Math.LN2)}else if(l=c,u=p,m=[],x){s.sort((function(t,e){return t[0]-e[0]})),h=-1;var C=[];for(S=0;S<s.length;S++){var E=c/s[S][0];m.length>0&&m[m.length-1]==E?C.push(S):(m.push(E),h++)}if(C.length>0)for(S=0;S<C.length;S++)s.splice(C[S]-S,1)}else m.push(1),s.push([c,p]),h=0;var R=new Ll({tileSize:[l,u],extent:v,origin:pe(v),resolutions:m}),P=gc.bind(null,Ds(d||256).map((function(t){return t*f})));return(r=t
 .call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,state:i.state,tileClass:P,tileGrid:R,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:function(t,e,r){var i,a,d=t[0];if(!(d>h)){var f=t[1],v=t[2],S=m[d];if(!(void 0===f||void 0===v||void 0===S||f<0||Math.ceil(c/S/l)<=f||v<0||Math.ceil(p/S/u)<=v)){if(b||w){var T=f*l*S,C=v*u*S,E=l*S,R=u*S,P=l,I=u;if(T+E>c&&(E=c-T),C+R>p&&(R=p-C),T+l*S>c&&(P=Math.floor((c-T+S-1)/S)),C+u*S>p&&(I=Math.floor((p-C+S-1)/S)),0==T&&E==c&&0==C&&R==p)i="full";else if(!b||_.includes("regionByPx"))i=T+","+C+","+E+","+R;else if(_.includes("regionByPct")){i="pct:"+Pc(T/c*100)+","+Pc(C/p*100)+","+Pc(E/c*100)+","+Pc(R/p*100)}o!=xc||b&&!_.includes("sizeByWh")?!b||_.includes("sizeByW")?a=P+",":_.includes("sizeByH")?a=","+I:_.includes("sizeByWh")?a=P+","+I:_.includes("sizeByP
 ct")&&(a="pct:"+Pc(100/S)):a=P+","+I}else if(i="full",x){var O=s[d][0],L=s[d][1];a=o==xc?O==c&&L==p?"max":O+","+L:O==c?"full":O+","}else a=o==xc?"max":"full";return n+i+"/"+a+"/0/"+y+"."+g}}},transition:i.transition})||this).zDirection=i.zDirection,r}return Rc(e,t),e}(Xh),Oc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Lc=function(t){function e(e,r,i,n,o,s,a){var l=this,u=e.getExtent(),h=r.getExtent(),c=h?ce(i,h):i,p=xh(e,r,ae(c),n),d=new yh(e,r,c,u,.5*p,n),f=s(d.calculateSourceExtent(),p,o),g=f?bo:Eo,y=f?f.getPixelRatio():1;return(l=t.call(this,i,n,y,g)||this).targetProj_=r,l.maxSourceExtent_=u,l.triangulation_=d,l.targetResolution_=n,l.targetExtent_=i,l.sourceImage_=f,l.sourcePixelRatio_=y,l.contextOpt
 ions_=a,l.canvas_=null,l.sourceListenerKey_=null,l}return Oc(e,t),e.prototype.disposeInternal=function(){this.state==So&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==To){var e=fe(this.targetExtent_)/this.targetResolution_,r=he(this.targetExtent_)/this.targetResolution_;this.canvas_=wh(e,r,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.contextOptions_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==bo){this.state=So,this.changed();var t=this.sourceImage_.getState();t==To||t==Co?this.reproject_():(this.sourceListenerKey_=W(this.sourceImage_,O,(function(t){var e=this.sourceIma
 ge_.getState();e!=To&&e!=Co||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){X(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(Xu),Mc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Fc="imageloadstart",Ac="imageloadend",kc="imageloaderror",Nc=function(t){function e(e,r){var i=t.call(this,e)||this;return i.image=r,i}return Mc(e,t),e}(h);function jc(t,e){t.getImage().src=e}var Dc=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state})||this;return r.resolutions_=void 0!==e.resolutions?e.resolutions:null,r.reprojectedImage_=null,r.reprojectedRevision_=0,r.contextOptions_=!1==
 =e.imageSmoothing?mh:void 0,r}return Mc(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=g(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,r,i){var n=this.getProjection();if(n&&i&&!wr(n,i)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&wr(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==e&&Jt(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Lc(n,i,t,e,r,function(t,e,r){return this.getImageInternal(t,e,r,n)}.bind(this),this.contextOptions_),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return n&&(i=n),this.getImageInternal(t,e,r,i)},e.prototype.getImageInternal=function(t,e,r,n){retur
 n i()},e.prototype.handleImageChange=function(t){var e=t.target;switch(e.getState()){case So:this.loading=!0,this.dispatchEvent(new Nc(Fc,e));break;case To:this.loading=!1,this.dispatchEvent(new Nc(Ac,e));break;case Co:this.loading=!1,this.dispatchEvent(new Nc(kc,e))}},e}(Mh);function Gc(t,e){var r=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&r.push(t+"="+encodeURIComponent(e[t]))}));var i=r.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+i}var zc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Bc=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{attributions:i.attributions,imageSmoothing:i.imageSmoothing,projection:i.projection,resolutions:
 i.resolutions})||this).crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,r.hidpi_=void 0===i.hidpi||i.hidpi,r.url_=i.url,r.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:jc,r.params_=i.params||{},r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==i.ratio?i.ratio:1.5,r}return zc(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,i){if(void 0===this.url_)return null;e=this.findNearestResolution(e),r=this.hidpi_?r:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==r&&Yt(n.getExtent(),t))return n;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};T(o,this.params_);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.ratio_){var l=this.ratio_*fe(t)/2,u=this.ratio_*he(t)/2;t[0]=s-l,t[1]=a-u,t[2]=s+l,t[3]=a+u}var h=e/r,c=Math.ceil(fe(t)/h),p=Math.ceil(he(t)/h);t[0]=s-h*c/2,t[2]=s+h*c/2,t[1]=a-h*p/2,t[3]=a+h*p/2,this.imageSize_[0]
 =c,this.imageSize_[1]=p;var d=this.getRequestUrl_(t,this.imageSize_,r,i,o);return this.image_=new Ku(t,e,r,d,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(O,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,i,n){var o=i.getCode().split(":").pop();n.SIZE=e[0]+","+e[1],n.BBOX=t.join(","),n.BBOXSR=o,n.IMAGESR=o,n.DPI=Math.round(90*r);var s=this.url_,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&lt(!1,50),Gc(a,n)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){T(this.params_,t),this.image_=null,this.changed()}
 ,e}(Dc),Uc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Yc=function(t){function e(e,r,i,n,o){var s=this,a=void 0!==o?bo:To;return(s=t.call(this,e,r,i,a)||this).loader_=void 0!==o?o:null,s.canvas_=n,s.error_=null,s}return Uc(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=Co):this.state=To,this.changed()},e.prototype.load=function(){this.state==bo&&(this.state=So,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(Xu),Wc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e
 )e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Vc=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{attributions:i.attributions,imageSmoothing:i.imageSmoothing,projection:i.projection,resolutions:i.resolutions,state:i.state})||this).canvasFunction_=i.canvasFunction,r.canvas_=null,r.renderedRevision_=0,r.ratio_=void 0!==i.ratio?i.ratio:1.5,r}return Wc(e,t),e.prototype.getImageInternal=function(t,e,r,i){e=this.findNearestResolution(e);var n=this.canvas_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==r&&Yt(n.getExtent(),t))return n;me(t=t.slice(),this.ratio_);var o=[fe(t)/e*r,he(t)/e*r],s=this.canvasFunction_.call(this,t,e,r,o,i);return s&&(n=new Yc(t,e,r,s)),this.canvas_=n,this.renderedRevision_=this.getRevision(),n},e}(Dc),Xc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto_
 _:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();var qc=function(t){function e(e){var r=t.call(this,{imageSmoothing:e.imageSmoothing,projection:e.projection,resolutions:e.resolutions})||this;return r.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,r.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,r.params_=e.params||{},r.url_=e.url,r.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:jc,r.hidpi_=void 0===e.hidpi||e.hidpi,r.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,r.ratio_=void 0!==e.ratio?e.ratio:1,r.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,r.image_=null,r.renderedRevision_=0,r}return Xc(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,i){e=this.findNearestResolution(e),r=this
 .hidpi_?r:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==r&&Yt(n.getExtent(),t))return n;1!=this.ratio_&&me(t=t.slice(),this.ratio_);var o=[fe(t)/e*r,he(t)/e*r];if(void 0!==this.url_){var s=this.getUrl(this.url_,this.params_,t,o,i);(n=new Ku(t,e,r,s,this.crossOrigin_,this.imageLoadFunction_)).addEventListener(O,this.handleImageChange.bind(this))}else n=null;return this.image_=n,this.renderedRevision_=this.getRevision(),n},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.updateParams=function(t){T(this.params_,t),this.changed()},e.prototype.getUrl=function(t,e,r,i,n){var o=function(t,e,r,i){var n=fe(t),o=he(t),s=e[0],a=e[1],l=.0254/i;return a*n>s*o?n*r/(s*l):o*r/(a*l)}(r,i,this.metersPerUnit_,this.displayDpi_),s=ae(r),a={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI
 :this.displayDpi_,SETDISPLAYWIDTH:Math.round(i[0]),SETDISPLAYHEIGHT:Math.round(i[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return T(a,e),Gc(t,a)},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e}(Dc),Zc=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Kc=function(t){function e(e){var r=this,i=void 0!==e.crossOrigin?e.crossOrigin:null,n=void 0!==e.imageLoadFunction?e.imageLoadFunction:jc;return(r=t.call(this,{attributions:e.attributions,imageSmoothing:e.imageSmoothing,projection:gr(e.projection)})||this).url_=e.url,r.imageExtent_=e.imageExtent,r.image_=new Ku(r.imageExtent_,void 0,1,r.url_,i,n),r.imageSize_=e.imageSize?e.imageSize:null
 ,r.image_.addEventListener(O,r.handleImageChange.bind(r)),r}return Zc(e,t),e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,r,i){return ge(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==To){var r=this.image_.getExtent(),i=this.image_.getImage(),n=void 0,o=void 0;this.imageSize_?(n=this.imageSize_[0],o=this.imageSize_[1]):(n=i.width,o=i.height);var s=he(r)/o,a=Math.ceil(fe(r)/s);if(a!=n){var l=zn(a,o),u=l.canvas;l.drawImage(i,0,0,n,o,0,0,u.width,u.height),this.image_.setImage(u)}}t.prototype.handleImageChange.call(this,e)},e}(Dc),Hc="carmentaserver",Jc="geoserver",$c="mapserver",Qc="qgis",tp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(
 ){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ep=[101,101],rp=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{attributions:i.attributions,imageSmoothing:i.imageSmoothing,projection:i.projection,resolutions:i.resolutions})||this).crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,r.url_=i.url,r.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:jc,r.params_=i.params||{},r.v13_=!0,r.updateV13_(),r.serverType_=i.serverType,r.hidpi_=void 0===i.hidpi||i.hidpi,r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==i.ratio?i.ratio:1.5,r}return tp(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,i){if(void 0!==this.url_){var n=gr(r),o=this.getProjection();o&&o!==n&&(e=xh(o,n,t,e),t=Tr(t,n,o));var s=ue(t,e,0,ep),a={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};T(a,this.params_,i);var l=Math.floor((t[0]-
 s[0])/e),u=Math.floor((s[3]-t[1])/e);return a[this.v13_?"I":"X"]=l,a[this.v13_?"J":"Y"]=u,this.getRequestUrl_(s,ep,1,o||n,a)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.url_){var r={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(!(!Array.isArray(i)||1===i.length))return;r.LAYER=i}if(void 0!==t){var n=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*n*39.37*(25.4/.28)}return T(r,e),Gc(this.url_,r)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,i){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==r||this.hidpi_&&void 0!==this.serverType_||(r=1);var n=e/r,o=ae(t),s=ue(o,n,0,[Math.ceil(fe(t)/n),Math.ceil(he(t)/n)]),a=ue(o,n,0,[Math.ceil(this.ratio_*fe(t)/n),Math.ceil(this.ratio_*he(t)/n)]),l=this.image_;if(l&&this.renderedRevision_==this.getRevision()&&l.getResolution()==e&&l.getPixelRati
 o()==r&&Yt(l.getExtent(),s))return l;var u={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};T(u,this.params_),this.imageSize_[0]=Math.round(fe(a)/n),this.imageSize_[1]=Math.round(he(a)/n);var h=this.getRequestUrl_(a,this.imageSize_,r,i,u);return this.image_=new Ku(a,e,r,h,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(O,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,i,n){if(lt(void 0!==this.url_,9),n[this.v13_?"CRS":"SRS"]=i.getCode(),"STYLES"in this.params_||(n.STYLES=""),1!=r)switch(this.serverType_){case Jc:var o=90*r+.5|0;"FORMAT_OPTIONS"in n?n.FORMAT_OPTIONS+=";dpi:"+o:n.FORMAT_OPTIONS="dpi:"+o;break;case $c:n.MAP_RESOLUTION=90*r;break;case Hc:case Qc:n.DPI=90*r;break;default:lt(!1,8)}n.WIDTH=e[0],n.HEIGHT=e[1];var s,a=i.getAxisOrientation();return s=this.v13_&&
 "ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,n.BBOX=s.join(","),Gc(this.url_,n)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){T(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||"1.3.0";this.v13_=$e(t,"1.3")>=0},e}(Dc),ip=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),np='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',op=function(t){functio
 n e(e){var r,i=e||{};r=void 0!==i.attributions?i.attributions:[np];var n=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",o=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:r,cacheSize:i.cacheSize,crossOrigin:n,imageSmoothing:i.imageSmoothing,opaque:void 0===i.opaque||i.opaque,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,url:o,wrapX:i.wrapX,attributionsCollapsible:!1})||this}return ip(e,t),e}(Jh),sp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ap=function(t){function e(e){var r=e||{};return t.call(this,r)||this}return sp(e,t),e}(In),lp=function(){var t=functio
 n(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),up=function(t){function e(e){var r=t.call(this)||this;return r.boundHandleImageChange_=r.handleImageChange_.bind(r),r.layer_=e,r}return lp(e,t),e.prototype.getFeatures=function(t){return i()},e.prototype.prepareFrame=function(t){return i()},e.prototype.renderFrame=function(t,e){return i()},e.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},e.prototype.createLoadedTileFinder=function(t,e,r){return function(i,n){var o=this.loadedTileCallback.bind(this,r,i);return t.forEachLoadedTile(e,i,n,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){},e.prototype.getDataAtPixel=function(t,e,r){return i()},e.prototype.getLayer=fun
 ction(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===To&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=To&&e!=Co&&t.addEventListener(O,this.boundHandleImageChange_),e==bo&&(t.load(),e=t.getState()),e==To},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Cn&&t.changed()},e}(K),hp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),cp=function(t){function e(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=[1,0,0,1,0,0],r.pixelTransform=[1,0,0,1,0,0],r.inversePixelTransform=[1,0,0,1,0,0]
 ,r.context=null,r.containerReused=!1,r}return hp(e,t),e.prototype.useContainer=function(t,e,r){var i,n,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(n=a.getContext("2d")));if(!n||0!==n.canvas.width&&n.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=n,this.containerReused=!0),!this.container){(i=document.createElement("div")).className=o;var s=i.style;s.position="absolute",s.width="100%",s.height="100%";var a=(n=zn()).canvas;i.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=i,this.context=n}},e.prototype.clip=function(t,e,r){var i=e.pixelRatio,n=e.size[0]*i/2,o=e.size[1]*i/2,s=e.viewState.rotation,a=pe(r),l=de(r),u=se(r),h=oe(r);St(e.coordinateToPixelTransform,a),St(e.coordinateToPixelTransform,l),St(e.coordinateToPixelTransform,u),St(e.coordinateToPixel
 Transform,h),t.save(),uo(t,-s,n,o),t.beginPath(),t.moveTo(a[0]*i,a[1]*i),t.lineTo(l[0]*i,l[1]*i),t.lineTo(u[0]*i,u[1]*i),t.lineTo(h[0]*i,h[1]*i),t.clip(),uo(t,s,n,o)},e.prototype.clipUnrotated=function(t,e,r){var i=pe(r),n=de(r),o=se(r),s=oe(r);St(e.coordinateToPixelTransform,i),St(e.coordinateToPixelTransform,n),St(e.coordinateToPixelTransform,o),St(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;St(a,i),St(a,n),St(a,o),St(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,r){var i=this.getLayer();if(i.hasListener(t)){var n=new Do(t,this.inversePixelTransform,r,e);i.dispatchEvent(n)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(_n,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(vn,t,e)},e.prototype.getRenderTransform=func
 tion(t,e,r,i,n,o,s){var a=n/2,l=o/2,u=i/e,h=-u,c=-t[0]+s,p=-t[1];return Ct(this.tempTransform,a,l,u,h,-r,c,p)},e.prototype.getDataAtPixel=function(t,e,r){var i,n=St(this.inversePixelTransform,t.slice()),o=this.context;try{var s=Math.round(n[0]),a=Math.round(n[1]),l=document.createElement("canvas"),u=l.getContext("2d");l.width=1,l.height=1,u.clearRect(0,0,1,1),u.drawImage(o.canvas,s,a,1,1,0,0,1,1),i=u.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:i}return 0===i[3]?null:i},e}(up),pp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),dp=function(t){function e(e){var r=t.call(this,e)||this;return r.image_=null,r}return pp(e,t),e.prototype.getImage=function(){return this.image_?t
 his.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],r=t.pixelRatio,i=t.viewState,n=i.resolution,o=this.getLayer().getSource(),s=t.viewHints,a=t.extent;if(void 0!==e.extent&&(a=ce(a,Ar(e.extent,i.projection))),!s[ys]&&!s[ms]&&!ye(a))if(o){var l=i.projection,u=o.getImage(a,n,r,l);u&&this.loadImage(u)&&(this.image_=u)}else this.image_=null;return!!this.image_},e.prototype.renderFrame=function(t,e){var r=this.image_,i=r.getExtent(),n=r.getResolution(),o=r.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,u=l.center,h=l.resolution,c=t.size,p=a*n/(h*o),d=Math.round(c[0]*a),f=Math.round(c[1]*a),g=l.rotation;if(g){var y=Math.round(Math.sqrt(d*d+f*f));d=y,f=y}Ct(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,g,-d/2,-f/2),Et(this.inversePixelTransform,this.pixelTransform);var m=po(this.pixelTransform);this.useContainer(e,m,s.opacity);var _=this.context,v=_.canvas;v.width!=d||v.height!=f?(v.width=d,v.height=
 f):this.containerReused||_.clearRect(0,0,d,f);var x=!1;if(s.extent){var w=Ar(s.extent,l.projection);(x=!Yt(w,t.extent)&&ge(w,t.extent))&&this.clipUnrotated(_,t,w)}var b=r.getImage(),S=Ct(this.tempTransform,d/2,f/2,p,p,0,o*(i[0]-u[0])/n,o*(u[1]-i[3])/n);this.renderedResolution=n*a/o;var C=S[4],E=S[5],R=b.width*S[0],P=b.height*S[3];if(T(_,this.getLayer().getSource().getContextOptions()),this.preRender(_,t),R>=.5&&P>=.5){var I=s.opacity,O=void 0;1!==I&&(O=this.context.globalAlpha,this.context.globalAlpha=I),this.context.drawImage(b,0,0,+b.width,+b.height,Math.round(C),Math.round(E),Math.round(R),Math.round(P)),1!==I&&(this.context.globalAlpha=O)}return this.postRender(_,t),x&&_.restore(),m!==v.style.transform&&(v.style.transform=m),this.container},e}(cp),fp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){thi
 s.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),gp=function(t){function e(e){return t.call(this,e)||this}return fp(e,t),e.prototype.createRenderer=function(){return new dp(this)},e}(ap),yp="preload",mp="useInterimTilesOnError",_p=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),vp=function(t){function e(e){var r=this,i=e||{},n=T({},i);return delete n.preload,delete n.useInterimTilesOnError,(r=t.call(this,n)||this).setPreload(void 0!==i.preload?i.preload:0),r.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),r}return _p(e,t),e.prototype.getPreload=function(){return this.get(yp)},e.prototype.setPreload=function(t){this.set(yp
 ,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(mp)},e.prototype.setUseInterimTilesOnError=function(t){this.set(mp,t)},e}(In),xp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),wp=function(t){function e(e){var r=t.call(this,e)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=[1/0,1/0,-1/0,-1/0],r.tmpTileRange_=new Tl(0,0,0,0),r}return xp(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),r=t.getState(),i=e.getUseInterimTilesOnError();return r==cs||r==ds||r==ps&&!i},e.prototype.getTile=function(t,e,r,i){var n=i.pixelRatio,o=i.viewState.projection,s=this.ge
 tLayer(),a=s.getSource().getTile(t,e,r,n,o);return a.getState()==ps&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(cs)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,r,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,r,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var r=t.layerStatesArray[t.layerIndex],i=t.viewState,n=i.projection,s=i.resolution,a=i.center,l=i.rotation,u=t.pixelRatio,h=this.getLayer(),c=h.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(n),g=f.getZForResolution(s,c.zDirection),y=f.getResolution(g),m=t.extent,_=r.extent&&Ar(r.extent,n);_&&(m=ce(m,Ar(r.extent,n)));var v=c.getTilePixelRatio(u),x=Math.round(t.size[0]*v),w=Math.round(t.size[1]*v);if(l){var b=Math.round(Math.sqrt(x*x+w*w));x=b,w=b}var S=y*x/2/v,C=y*w/2/v,E=[a[0]-S,a[1]-C,a[0]+S,a[1]+C],R=f.getTileRangeForExtentAndZ(m,g)
 ,P={};P[g]={};var I=this.createLoadedTileFinder(c,n,P),O=this.tmpExtent,L=this.tmpTileRange_;this.newTiles_=!1;for(var M=R.minX;M<=R.maxX;++M)for(var F=R.minY;F<=R.maxY;++F){var A=this.getTile(g,M,F,t);if(this.isDrawableTile(A)){var k=o(this);if(A.getState()==cs){P[g][A.tileCoord.toString()]=A;var N=A.inTransition(k);this.newTiles_||!N&&-1!==this.renderedTiles.indexOf(A)||(this.newTiles_=!0)}if(1===A.getAlpha(k,t.time))continue}var j=f.getTileCoordChildTileRange(A.tileCoord,L,O),D=!1;j&&(D=I(g+1,j)),D||f.forEachTileCoordParentTileRange(A.tileCoord,I,L,O)}var G=y/s;Ct(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/v,1/v,l,-x/2,-w/2);var z=po(this.pixelTransform);this.useContainer(e,z,r.opacity);var B=this.context,U=B.canvas;Et(this.inversePixelTransform,this.pixelTransform),Ct(this.tempTransform,x/2,w/2,G,G,0,-x/2,-w/2),U.width!=x||U.height!=w?(U.width=x,U.height=w):this.containerReused||B.clearRect(0,0,x,w),_&&this.clipUnrotated(B,t,_),T(B,c.getContextOptions()),this.preRender(B,t),t
 his.renderedTiles.length=0;var Y,W,V,X=Object.keys(P).map(Number);X.sort(d),1!==r.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],W=[]):X=X.reverse();for(var q=X.length-1;q>=0;--q){var Z=X[q],K=c.getTilePixelSize(Z,u,n),H=f.getResolution(Z)/y,J=K[0]*H*G,$=K[1]*H*G,Q=f.getTileCoordForCoordAndZ(pe(E),Z),tt=f.getTileCoordExtent(Q),et=St(this.tempTransform,[v*(tt[0]-E[0])/y,v*(E[3]-tt[3])/y]),rt=v*c.getGutterForProjection(n),it=P[Z];for(var nt in it){var ot=(A=it[nt]).tileCoord,st=et[0]-(Q[1]-ot[1])*J,at=Math.round(st+J),lt=et[1]-(Q[2]-ot[2])*$,ut=Math.round(lt+$),ht=at-(M=Math.round(st)),ct=ut-(F=Math.round(lt)),pt=g===Z;if(!(N=pt&&1!==A.getAlpha(o(this),t.time)))if(Y){B.save(),V=[M,F,M+ht,F,M+ht,F+ct,M,F+ct];for(var dt=0,ft=Y.length;dt<ft;++dt)if(g!==Z&&Z<W[dt]){var gt=Y[dt];B.beginPath(),B.moveTo(V[0],V[1]),B.lineTo(V[2],V[3]),B.lineTo(V[4],V[5]),B.lineTo(V[6],V[7]),B.moveTo(gt[6],gt[7]),B.lineTo(gt[4],gt[5]),B.lineTo(gt[2],gt[3]),B.lineTo(gt[0],gt[1]),B.cli
 p()}Y.push(V),W.push(Z)}else B.clearRect(M,F,ht,ct);this.drawTileImage(A,t,M,F,ht,ct,rt,pt,r.opacity),Y&&!N&&B.restore(),this.renderedTiles.push(A),this.updateUsedTiles(t.usedTiles,c,A)}}return this.renderedRevision=p,this.renderedResolution=y,this.extentChanged=!this.renderedExtent_||!Jt(this.renderedExtent_,E),this.renderedExtent_=E,this.renderedPixelRatio=u,this.renderedProjection=n,this.manageTilePyramid(t,c,f,u,n,m,g,h.getPreload()),this.scheduleExpireCache(t,c),this.postRender(B,t),r.extent&&B.restore(),z!==U.style.transform&&(U.style.transform=z),this.container},e.prototype.drawTileImage=function(t,e,r,i,n,s,a,l,u){var h=this.getTileImage(t);if(h){var c=o(this),p=l?t.getAlpha(c,e.time):1,d=u*p,f=d!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,r,i,n,s),f&&this.context.restore(),1!==p?e.animate=!0:l&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:nul
 l},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var r=function(t,e,r){var i=o(t);i in r.usedTiles&&t.expireCache(r.viewState.projection,r.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(r)}},e.prototype.updateUsedTiles=function(t,e,r){var i=o(e);i in t||(t[i]={}),t[i][r.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,r,i,n,s,a,l,u){var h=o(e);h in t.wantedTiles||(t.wantedTiles[h]={});var c,p,d,f,g,y,m=t.wantedTiles[h],_=t.tileQueue,v=0;for(y=r.getMinZoom();y<=a;++y)for(p=r.getTileRangeForExtentAndZ(s,y,p),d=r.getResolution(y),f=p.minX;f<=p.maxX;++f)for(g=p.minY;g<=p.maxY;++g)a-y<=l?(++v,(c=e.getTile(y,f,g,i,n)).getState()==us&&(m[c.getKey()]=!0,_.isKeyQueued(c.getKey())||_.enqueue([c,h,r.getTileCoordCenter(c.tileCoord),d])),void 0!==u&&u(c)):e.useTile(y,f,g,n);e.updateCacheSize(v,n)},e}(cp);wp.prototype.getLayer;var bp=wp,Sp=function(){var t=function(e,r){return(t=Object.setPrototypeOf|
 |{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Tp=function(t){function e(e){return t.call(this,e)||this}return Sp(e,t),e.prototype.createRenderer=function(){return new bp(this)},e}(vp),Cp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ep=!0;try{new ImageData(10,10)}catch(t){Ep=!1}var Rp=document.createElement("canvas").getContext("2d");function Pp(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function r(t,r,i){return e?new ImageData(t,r,i):{data:t,width:r,height:i}}return function(e){v
 ar i,n,o=e.buffers,s=e.meta,a=e.imageOps,l=e.width,u=e.height,h=o.length,c=o[0].byteLength;if(a){var p=new Array(h);for(n=0;n<h;++n)p[n]=r(new Uint8ClampedArray(o[n]),l,u);i=t(p,s).data}else{i=new Uint8ClampedArray(c);var d=new Array(h),f=new Array(h);for(n=0;n<h;++n)d[n]=new Uint8ClampedArray(o[n]),f[n]=[0,0,0,0];for(var g=0;g<c;g+=4){for(var y=0;y<h;++y){var m=d[y];f[y][0]=m[g],f[y][1]=m[g+1],f[y][2]=m[g+2],f[y][3]=m[g+3]}var _=t(f,s);i[g]=_[0],i[g+1]=_[1],i[g+2]=_[2],i[g+3]=_[3]}}return i.buffer}}function Ip(t,e){var r=Object.keys(t.lib||{}).map((function(e){return"var "+e+" = "+t.lib[e].toString()+";"})).concat(["var __minion__ = ("+Pp.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),i=new Blob(r,{type:"text/javascript"}),n=URL.createObjectURL(i),o=new Worker(n);return o.addEventListener("message",e),o}var Op=fu
 nction(t){function e(e){var r,i=t.call(this)||this;i._imageOps=!!e.imageOps;var n=[];if(r=0===e.threads?0:i._imageOps?1:e.threads||1)for(var o=0;o<r;++o)n[o]=Ip(e,i._onWorkerMessage.bind(i,o));else n[0]=function(t,e){var r=Pp(t.operation),i=!1;return{postMessage:function(t){setTimeout((function(){i||e({data:{buffer:r(t),meta:t.meta}})}),0)},terminate:function(){i=!0}}}(e,i._onWorkerMessage.bind(i,0));return i._workers=n,i._queue=[],i._maxQueueLength=e.queue||1/0,i._running=0,i._dataLookup={},i._job=null,i}return Cp(e,t),e.prototype.process=function(t,e,r){this._enqueue({inputs:t,meta:e,callback:r}),this._dispatch()},e.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},e.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var t=this._queue.shift();this._job=t;var e=t.inputs[0].width,r=t.inputs[0].height,i=t.inputs.map((function(t){return t.data.buffer})),n=this._workers.length
 ;if(this._running=n,1===n)this._workers[0].postMessage({buffers:i,meta:t.meta,imageOps:this._imageOps,width:e,height:r},i);else for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/n),a=0;a<n;++a){for(var l=a*s,u=[],h=0,c=i.length;h<c;++h)u.push(i[a].slice(l,l+s));this._workers[a].postMessage({buffers:u,meta:t.meta,imageOps:this._imageOps,width:e,height:r},u)}}},e.prototype._onWorkerMessage=function(t,e){this.disposed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())},e.prototype._resolveJob=function(){var t,e,r=this._job,i=this._workers.length;if(1===i)t=new Uint8ClampedArray(this._dataLookup[0].buffer),e=this._dataLookup[0].meta;else{var n=r.inputs[0].data.length;t=new Uint8ClampedArray(n),e=new Array(n);for(var o=4*Math.ceil(n/4/i),s=0;s<i;++s){var a=this._dataLookup[s].buffer,l=s*o;t.set(new Uint8ClampedArray(a),l),e[s]=this._dataLookup[s].meta}}this._job=null,this._dataLookup={},r.callback(null,function(t,e,r){if(Ep)return new ImageData(t,e,r);v
 ar i=Rp.createImageData(e,r);return i.data.set(t),i}(t,r.inputs[0].width,r.inputs[0].height),e),this._dispatch()},e.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},e}(p),Lp="beforeoperations",Mp="afteroperations",Fp="pixel",Ap="image",kp=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.extent=r.extent,n.resolution=r.viewState.resolution/r.pixelRatio,n.data=i,n}return Cp(e,t),e}(h),Np=function(t){function e(e){var r=t.call(this,{projection:null})||this;r.processor_=null,r.operationType_=void 0!==e.operationType?e.operationType:Fp,r.threads_=void 0!==e.threads?e.threads:1,r.layers_=function(t){for(var e=t.length,r=new Array(e),i=0;i<e;++i)r[i]=Gp(t[i]);return r}(e.sources);for(var i,n=r.changed.bind(r),o=0,s=r.layers_.length;o<s;++o)r.layers_[o].addEventListener(O,n);return r.tileQueue_=new gs((function(){return 1}),r.changed.bind(r)),r.requestedFrameState_,r.renderedImageCanvas_=null,r.r
 enderedRevision_,r.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],extent:null,index:0,layerIndex:0,layerStatesArray:(i=r.layers_,i.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:r.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},declutterItems:[]},r.setAttributions((function(t){for(var r=[],i=0,n=e.sources.length;i<n;++i){var o=e.sources[i],s=(o instanceof Mh?o:o.getSource()).getAttributions();if("function"==typeof s){var a=s(t);r.push.apply(r,a)}}return 0!==r.length?r:null})),void 0!==e.operation&&r.setOperation(e.operation,e.lib),r}return Cp(e,t),e.prototype.setOperation=function(t,e){this.processor_&&this.processor_.dispose(),this.processor_=new Op({operation:t,imageOps:this.operationType_===Ap,queue:1,lib:e,threads:this.threads_}),this.changed()},e.prototype.updateFrameState_=function(t,e,r){var i=T({},this.frameState_);i.vi
 ewState=T({},i.viewState);var n=ae(t);i.extent=t.slice(),i.size[0]=Math.round(fe(t)/e),i.size[1]=Math.round(he(t)/e),i.time=1/0;var o=i.viewState;return o.center=n,o.projection=r,o.resolution=e,i},e.prototype.allSourcesReady_=function(){for(var t=!0,e=0,r=this.layers_.length;e<r;++e)if(this.layers_[e].getSource().getState()!==Cn){t=!1;break}return t},e.prototype.getImage=function(t,e,r,i){if(!this.allSourcesReady_())return null;var n=this.updateFrameState_(t,e,i);if(this.requestedFrameState_=n,this.renderedImageCanvas_){var o=this.renderedImageCanvas_.getResolution(),s=this.renderedImageCanvas_.getExtent();e===o&&Jt(t,s)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),n.tileQueue.loadMoreTiles(16,16),n.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},e.prototype.processSources_=function(){for(var t=this.requestedFrameState_,e=this.layers_.length,r=new Array(e),i=
 0;i<e;++i){t.layerIndex=i;var n=Dp(this.layers_[i],t);if(!n)return;r[i]=n}var o={};this.dispatchEvent(new kp(Lp,t,o)),this.processor_.process(r,o,this.onWorkerComplete_.bind(this,t))},e.prototype.onWorkerComplete_=function(t,e,r,i){if(!e&&r){var n=t.extent,o=t.viewState.resolution;if(o===this.requestedFrameState_.viewState.resolution&&Jt(n,this.requestedFrameState_.extent)){var s;if(this.renderedImageCanvas_)s=this.renderedImageCanvas_.getImage().getContext("2d");else s=zn(Math.round(fe(n)/o),Math.round(he(n)/o)),this.renderedImageCanvas_=new Yc(n,o,1,s.canvas);s.putImageData(r,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new kp(Mp,t,i))}}},e.prototype.getImageInternal=function(){return null},e.prototype.disposeInternal=function(){this.processor_&&this.processor_.dispose(),t.prototype.disposeInternal.call(this)},e}(Dc);Np.prototype.dispose;var jp=null;function Dp(t,e){var r=t.getRenderer();if(!r)throw new Error("Unsupported layer type: "+t);if(!r.
 prepareFrame(e))return null;var i,n=e.size[0],o=e.size[1],s=r.renderFrame(e,null);if(s&&(i=s.firstElementChild),!(i instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+i);if(i.width===n&&i.height===o)return i.getContext("2d").getImageData(0,0,n,o);if(jp){var a=jp.canvas;a.width!==n||a.height!==o?jp=zn(n,o):jp.clearRect(0,0,n,o)}else jp=zn(n,o);return jp.drawImage(i,0,0,n,o),jp.getImageData(0,0,n,o)}function Gp(t){var e;return t instanceof Mh?t instanceof Nh?e=new Tp({source:t}):t instanceof Dc&&(e=new gp({source:t})):e=t,e}var zp=Np,Bp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Up=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="h
 ttps://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',np],Yp={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},Wp={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Vp=function(t){function e(e){var r=e.layer.indexOf("-"),i=-1==r?e.layer:e.layer.slice(0,r),n=Wp[i],o=Yp[e.layer],s=void 0!==e.url?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+o.extension;return t.call(this,{attributions:Up,cacheSize:e.cacheSize,crossOrigin:"anonymous",imageSmoothing:e.imageSmoothing,maxZoom:null!=e.
 maxZoom?e.maxZoom:n.maxZoom,minZoom:null!=e.minZoom?e.minZoom:n.minZoom,opaque:o.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:s,wrapX:e.wrapX})||this}return Bp(e,t),e}(Jh),Xp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),qp=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition})||this).params_=i.
 params||{},r.hidpi_=void 0===i.hidpi||i.hidpi,r.tmpExtent_=[1/0,1/0,-1/0,-1/0],r.setKey(r.getKeyForParams_()),r}return Xp(e,t),e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,i,n,o){var s=this.urls;if(s){var a,l=n.getCode().split(":").pop();if(o.SIZE=e[0]+","+e[1],o.BBOX=r.join(","),o.BBOXSR=l,o.IMAGESR=l,o.DPI=Math.round(o.DPI?o.DPI*i:90*i),1==s.length)a=s[0];else a=s[Pe(Il(t),s.length)];return Gc(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},e.prototype.updateParams=function(t){T(this.params_,t),this.setKey(this.getKeyForParams_())},e.prototype.tileUrlFunction=function(t,e,r){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(r)),!(i.getResolutions().length<=t[0])){1==e||th
 is.hidpi_||(e=1);var n=i.getTileCoordExtent(t,this.tmpExtent_),o=Ds(i.getTileSize(t[0]),this.tmpSize);1!=e&&(o=js(o,e,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return T(s,this.params_),this.getRequestUrl_(t,o,n,e,r,s)}},e}(Xh),Zp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Kp=function(t){function e(e,r,i){var n=t.call(this,e,cs)||this;return n.tileSize_=r,n.text_=i,n.canvas_=null,n}return Zp(e,t),e.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,e=zn(t[0],t[1]);return e.strokeStyle="grey",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="grey",e.strokeStyle="white",e.textAlign="center",e.textBaseline="middle",e.font="24px sans-serif",e.lineWidth
 =4,e.strokeText(this.text_,t[0]/2,t[1]/2,t[0]),e.fillText(this.text_,t[0]/2,t[1]/2,t[0]),this.canvas_=e.canvas,e.canvas},e.prototype.load=function(){},e}(ph),Hp=function(t){function e(e){var r=e||{};return t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection})||this}return Zp(e,t),e.prototype.getTile=function(t,e,r){var i=El(t,e,r);if(this.tileCache.containsKey(i))return this.tileCache.get(i);var n=Ds(this.tileGrid.getTileSize(t)),o=[t,e,r],s=this.getTileCoordForTileUrlFunction(o),a=void 0;a=s?"z:"+s[0]+" x:"+s[1]+" y:"+s[2]:"none";var l=new Kp(o,n,a);return this.tileCache.set(i,l),l},e}(Jh),Jp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}
 }(),$p=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:gr("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:Tn,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition})||this;if(r.tileJSON_=null,r.tileSize_=e.tileSize,e.url)if(e.jsonp)qh(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var i=new XMLHttpRequest;i.addEventListener("load",r.onXHRLoad_.bind(r)),i.addEventListener("error",r.onXHRError_.bind(r)),i.open("GET",e.url),i.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):lt(!1,51);return r}return Jp(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHR
 Error_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,r=gr("EPSG:4326"),i=this.getProjection();if(void 0!==t.bounds){var n=br(r,i);e=_e(t.bounds,n)}var o=t.minzoom||0,s=t.maxzoom||22,a=Fl({extent:Nl(i),maxZoom:s,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=a,this.tileUrlFunction=Dh(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var l=void 0!==e?e:r.getExtent();this.setAttributions((function(e){return ge(l,e.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState(Cn)},e.prototype.handleTileJSONError=function(){this.setState(En)},e}(Xh),Qp=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new
  i)}}(),td=function(t){function e(e){var r=this,i=e||{},n=i.params||{},o=!("TRANSPARENT"in n)||n.TRANSPARENT;return(r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:!o,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition})||this).gutter_=void 0!==i.gutter?i.gutter:0,r.params_=n,r.v13_=!0,r.serverType_=i.serverType,r.hidpi_=void 0===i.hidpi||i.hidpi,r.tmpExtent_=[1/0,1/0,-1/0,-1/0],r.updateV13_(),r.setKey(r.getKeyForParams_()),r}return Qp(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,i){var n=gr(r),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(n));var a=s.getZForResolution(e,this.zDirection),l=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=l[0])){var u=s.getResolution(l[
 0]),h=s.getTileCoordExtent(l,this.tmpExtent_),c=Ds(s.getTileSize(l[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=Ns(c,p,this.tmpSize),h=Gt(h,u*p,h)),o&&o!==n&&(u=xh(o,n,t,u),h=Cr(h,n,o),t=Tr(t,n,o));var d={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};T(d,this.params_,i);var f=Math.floor((t[0]-h[0])/u),g=Math.floor((h[3]-t[1])/u);return d[this.v13_?"I":"X"]=f,d[this.v13_?"J":"Y"]=g,this.getRequestUrl_(l,c,h,1,o||n,d)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var r={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(!(!Array.isArray(i)||1===i.length))return;r.LAYER=i}if(void 0!==t){var n=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*n*39.37*(25.4/.28)}return T(r,e),Gc(this.urls[0],r)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){re
 turn this.params_},e.prototype.getRequestUrl_=function(t,e,r,i,n,o){var s=this.urls;if(s){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=i)switch(this.serverType_){case Jc:var a=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case $c:o.MAP_RESOLUTION=90*i;break;case Hc:case Qc:o.DPI=90*i;break;default:lt(!1,52)}var l,u=n.getAxisOrientation(),h=r;if(this.v13_&&"ne"==u.substr(0,2)){var c=void 0;c=r[0],h[0]=r[1],h[1]=c,c=r[2],h[2]=r[3],h[3]=c}if(o.BBOX=h.join(","),1==s.length)l=s[0];else l=s[Pe(Il(t),s.length)];return Gc(l,o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.updateParams=function(t){T(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=functi
 on(){var t=this.params_.VERSION||"1.3.0";this.v13_=$e(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,e,r){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(r)),!(i.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var n=i.getResolution(t[0]),o=i.getTileCoordExtent(t,this.tmpExtent_),s=Ds(i.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=Ns(s,a,this.tmpSize),o=Gt(o,n*a,o)),1!=e&&(s=js(s,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return T(l,this.params_),this.getRequestUrl_(t,s,o,e,r,l)}},e}(Xh),ed=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),rd=function(t){function e(e,r,i,n,o,s){va
 r a=t.call(this,e,r)||this;return a.src_=i,a.extent_=n,a.preemptive_=o,a.grid_=null,a.keys_=null,a.data_=null,a.jsonp_=s,a}return ed(e,t),e.prototype.getImage=function(){return null},e.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),r=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),i=this.grid_[Math.floor((1-r)*this.grid_.length)];if("string"!=typeof i)return null;var n=i.charCodeAt(Math.floor(e*i.length));n>=93&&n--,n>=35&&n--;var o=null;if((n-=32)in this.keys_){var s=this.keys_[n];o=this.data_&&s in this.data_?this.data_[s]:s}return o},e.prototype.forDataAtCoordinate=function(t,e,r){this.state==ds&&!0===r?(this.state=us,V(this,O,(function(r){e(this.getData(t))}),this),this.loadInternal_()):!0===r?setTimeout(function(){e(this.getData(t))}.bind(this),0):e(this.getData(t))},e.prototype.getKey=function(){return this.src_},e.prototype.handleError_=function(){this.state=ps,this.changed()},e.pro
 totype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=cs,this.changed()},e.prototype.loadInternal_=function(){if(this.state==us)if(this.state=hs,this.jsonp_)qh(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(r)}else this.handleError_()},e.prototype.onXHRError_=function(t){this.handleError_()},e.prototype.load=function(){this.preemptive_?this.loadInternal_():this.setState(ds)},e}(ph),id=function(t){function e(e){var r=t.call(this,{projection:gr("EPSG:3857"),state:Tn})||this;if(r.preemptive_=void 0===e.preemptive||e.preemptive,r.tileUrlFunction_=zh,r.template
 _=void 0,r.jsonp_=e.jsonp||!1,e.url)if(r.jsonp_)qh(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var i=new XMLHttpRequest;i.addEventListener("load",r.onXHRLoad_.bind(r)),i.addEventListener("error",r.onXHRError_.bind(r)),i.open("GET",e.url),i.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):lt(!1,51);return r}return ed(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTemplate=function(){return this.template_},e.prototype.forDataAtCoordinateAndResolution=function(t,e,r,i){if(this.tileGrid){var n=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,n);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,r
 ,i)}else!0===i?setTimeout((function(){r(null)}),0):r(null)},e.prototype.handleTileJSONError=function(){this.setState(En)},e.prototype.handleTileJSONResponse=function(t){var e,r=gr("EPSG:4326"),i=this.getProjection();if(void 0!==t.bounds){var n=br(r,i);e=_e(t.bounds,n)}var o=t.minzoom||0,s=t.maxzoom||22,a=Fl({extent:Nl(i),maxZoom:s,minZoom:o});this.tileGrid=a,this.template_=t.template;var l=t.grids;if(l){if(this.tileUrlFunction_=Dh(l,a),void 0!==t.attribution){var u=void 0!==e?e:r.getExtent();this.setAttributions((function(e){return ge(u,e.extent)?[t.attribution]:null}))}this.setState(Cn)}else this.setState(En)},e.prototype.getTile=function(t,e,r,i,n){var o=El(t,e,r);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,e,r],a=this.getTileCoordForTileUrlFunction(s,n),l=this.tileUrlFunction_(a,i,n),u=new rd(s,void 0!==l?us:ds,void 0!==l?l:"",this.tileGrid.getTileCoordExtent(s),this.preemptive_,this.jsonp_);return this.tileCache.set(o,u),u},e.prototype.useTile=function
 (t,e,r){var i=El(t,e,r);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(Nh),nd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),od=function(t){function e(e,r,i,n,o,s){var a=t.call(this,e,r,s)||this;return a.extent=null,a.format_=n,a.features_=null,a.loader_,a.projection=null,a.resolution,a.tileLoadFunction_=o,a.url_=i,a}return nd(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.getKey=function(){return this.url_},e.prototype.load=function(){this.state==us&&(this.setState(hs),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){th
 is.setFeatures(t)},e.prototype.onError=function(){this.setState(ps)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(cs)},e.prototype.setLoader=function(t){this.loader_=t},e}(ph),sd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ad=[],ld=function(t){function e(e,r,i,n){var o=t.call(this,e,r,{transition:0})||this;return o.context_={},o.executorGroups={},o.loadingSourceTiles=0,o.errorSourceTileKeys={},o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=null,o.wantedResolution,o.getSourceTiles=n.bind(void 0,o),o.sourceZ=-1,o.hifi=!1,o.wrappedTileCoord=i,o}return sd(e,t),e.prototype.getContext=function(t){var e=o(t);return e in this.context_||(this.context_[e]=zn(1,1,ad)),this.context
 _[e]},e.prototype.hasContext=function(t){return o(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=o(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedZ:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)ad.push(this.context_[e].canvas);t.prototype.release.call(this)},e}(ph),ud=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),hd=function(t){function e(e){var r=th
 is,i=e.projection||"EPSG:3857",n=e.extent||Nl(i),o=e.tileGrid||Fl({extent:n,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:i,state:e.state,tileGrid:o,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:cd,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,r.loadingTiles_={},r.sourceTileCache=new Eh(r.tileCache.highWaterMark),r.overlaps_=null==e.overlaps||e.overlaps,r.tileClass=e.tileClass?e.tileClass:od,r.tileGrids_={},r}return ud(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],r=this.tileCache;if(0===r.getCount())return e;var i=Pl(r.peekFirstKey())[0],n=this.tileGrid;return r.forEach((function(r){if(r.tileCoord[0]==
 =i&&r.getState()===cs)for(var o=r.getSourceTiles(),s=0,a=o.length;s<a;++s){var l=o[s],u=l.tileCoord;if(ge(t,n.getTileCoordExtent(u))){var h=l.getFeatures();if(h)for(var c=0,p=h.length;c<p;++c){var d=h[c],f=d.getGeometry();ge(t,f.getExtent())&&e.push(d)}}}})),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,r){t.prototype.expireCache.call(this,e,r),this.sourceTileCache.expireCache({})},e.prototype.getSourceTiles=function(t,e,r){var i=r.wrappedTileCoord,n=this.getTileGridForProjection(e),o=n.getTileCoordExtent(i),s=i[0],a=n.getResolution(s);Gt(o,-a,o);var l=this.tileGrid,u=l.getExtent();u&&ce(o,u,o);var h,c,p,d=l.getZForResolution(a,1),f=l.getMinZoom(),g=r.sourceTiles;if(g&&g.length>0&&g[0].tileCoord[0]===d)h=g,c=!0,p=d;else{h=[],p=d+1;do{--p,c=!0,l.forEachTileCoord(o,p,function(i){var n,o=this.tileUrlFunction(i,t,e);if(void 0!==o)if(this.sourceTileCache.con
 tainsKey(o)){var s=(n=this.sourceTileCache.get(o)).getState();if(s===cs||s===ps||s===ds)return void h.push(n)}else p===d&&((n=new this.tileClass(i,us,o,this.format_,this.tileLoadFunction)).extent=l.getTileCoordExtent(i),n.projection=e,n.resolution=l.getResolution(i[0]),this.sourceTileCache.set(o,n),n.addEventListener(O,this.handleTileChange.bind(this)),n.load());c=c&&n&&n.getState()===cs,n&&n.getState()!==ds&&r.getState()===us&&(r.loadingSourceTiles++,n.addEventListener(O,(function t(){var e=n.getState(),i=n.getKey();if(e===cs||e===ps){e===cs?(n.removeEventListener(O,t),r.loadingSourceTiles--,delete r.errorSourceTileKeys[i]):e===ps&&(r.errorSourceTileKeys[i]=!0);var o=Object.keys(r.errorSourceTileKeys).length;r.loadingSourceTiles-o==0&&(r.hifi=0===o,r.sourceZ=d,r.setState(cs))}})))}.bind(this)),c||(h.length=0)}while(!c&&p>f)}return r.getState()===us&&r.setState(hs),c&&(r.hifi=d===p,r.sourceZ=p,r.getState()<cs?r.setState(cs):g&&v(h,g)||(r.sourceTiles=h)),h},e.prototype.getTile=functi
 on(t,e,r,i,n){var o,s=El(t,e,r),a=this.getKey();if(this.tileCache.containsKey(s)&&(o=this.tileCache.get(s)).key===a)return o;var l=[t,e,r],u=this.getTileCoordForTileUrlFunction(l,n),h=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(n);if(u&&h){var p=c.getTileCoordExtent(u);Gt(p,-c.getResolution(t),p),ge(h,p)||(u=null)}var d=!0;if(null!==u){var f=this.tileGrid,g=c.getResolution(t),y=f.getZForResolution(g,1),m=c.getTileCoordExtent(u);Gt(m,-g,m),f.forEachTileCoord(m,y,function(t){d=d&&!this.tileUrlFunction(t,i,n)}.bind(this))}var _=new ld(l,d?ds:us,u,this.getSourceTiles.bind(this,i,n));return _.key=a,o?(_.interimTile=o,_.refreshInterimChain(),this.tileCache.replace(s,_)):this.tileCache.set(s,_),_},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),r=this.tileGrids_[e];if(!r){var i=this.tileGrid;r=kl(t,void 0,i?i.getTileSize(i.getMinZoom()):void 0),this.tileGrids_[e]=r}return r},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSi
 ze=function(t,e,r){var i=Ds(this.getTileGridForProjection(r).getTileSize(t),this.tmpSize);return[Math.round(i[0]*e),Math.round(i[1]*e)]},e.prototype.updateCacheSize=function(e,r){t.prototype.updateCacheSize.call(this,2*e,r)},e}(Yh);function cd(t,e){var r=vl(e,t.getFormat(),t.onLoad.bind(t),t.onError.bind(t));t.setLoader(r)}var pd="KVP",dd="REST",fd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),gd=function(t){function e(e){var r=this,i=void 0!==e.requestEncoding?e.requestEncoding:pd,n=e.tileGrid,o=e.urls;return void 0===o&&void 0!==e.url&&(o=Bh(e.url)),(r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,projection:e.projection,reprojec
 tionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:n,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:o,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition})||this).version_=void 0!==e.version?e.version:"1.0.0",r.format_=void 0!==e.format?e.format:"image/jpeg",r.dimensions_=void 0!==e.dimensions?e.dimensions:{},r.layer_=e.layer,r.matrixSet_=e.matrixSet,r.style_=e.style,r.requestEncoding_=i,r.setKey(r.getKeyForDimensions_()),o&&o.length>0&&(r.tileUrlFunction=Gh(o.map(r.createFromWMTSTemplate.bind(r)))),r}return fd(e,t),e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(Gh(t.map(this.createFromWMTSTemplate.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return
  this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var r in this.dimensions_)e[t++]=r+"-"+this.dimensions_[r];return e.join("/")},e.prototype.updateDimensions=function(t){T(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var e=this.requestEncoding_,r={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e==pd&&T(r,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e==pd?Gc(t,r):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in r?r[e.toLowerCase()]:t}));var i=this.tileGrid,n=this.dimensions_;return function(r,o,s){if(r){var a={TileMatrix:i.getMatrixId(r[0]),TileCol:r[1],TileRow:r[2]};T(a,n);var l=t;return l=e==pd?Gc(l,a):l.replace(/\{(\w+?)\}/g,(function(t,e){return a[e]}))}}},e}(Xh);var yd=function(){var t=function(e,r){return(
 t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),md="renderOrder",_d=function(t){function e(e){var r=this,i=e||{},n=T({},i);return delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,(r=t.call(this,n)||this).declutter_=void 0!==i.declutter&&i.declutter,r.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,r.style_=null,r.styleFunction_=void 0,r.setStyle(i.style),r.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,r.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,r}return yd(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.ge
 tRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(md)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.setRenderOrder=function(t){this.set(md,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:nh,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var r;if(Array.isArray(t))r=t;else lt("function"==typeof t.getZIndex,41),r=[t];e=function(){return r}}return e}(this.style_),this.changed()},e}(In),vd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructo
 r=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),xd="GENERATE_BUFFERS",wd=function(t){function e(e,r){var i=t.call(this,e)||this,n=r||{};return i.helper=new Eu({postProcesses:n.postProcesses,uniforms:n.uniforms}),i}return vd(e,t),e.prototype.disposeInternal=function(){this.helper.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getShaderCompileErrors=function(){return this.helper.getShaderCompileErrors()},e}(up);var bd=wd,Sd=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var 
 b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};'],{type:"application/javascript"}),Td=URL.createObjectURL(Sd);var Cd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){fu
 nction i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ed=function(t){function e(e,r){var i=this,n=r.uniforms||{},s=[1,0,0,1,0,0];n[mu]=s,(i=t.call(this,e,{uniforms:n,postProcesses:r.postProcesses})||this).sourceRevision_=-1,i.verticesBuffer_=new cu(34962,35048),i.hitVerticesBuffer_=new cu(34962,35048),i.indicesBuffer_=new cu(34963,35048),i.program_=i.helper.getProgram(r.fragmentShader,r.vertexShader),i.hitDetectionEnabled_=!(!r.hitFragmentShader||!r.hitVertexShader),i.hitProgram_=i.hitDetectionEnabled_&&i.helper.getProgram(r.hitFragmentShader,r.hitVertexShader);var a=r.attributes?r.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:Su.FLOAT}})):[];i.attributes=[{name:"a_position",size:2,type:Su.FLOAT},{name:"a_index",size:1,type:Su.FLOAT}].concat(a),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Su.FLOAT},{name:"a_index",size:1,type:Su.FLOAT},{name:"a_hitColor",size:4,type:Su.FLOAT},{name:"a_featureUid",
 size:1,type:Su.FLOAT}].concat(a),i.customAttributes=r.attributes?r.attributes:[],i.previousExtent_=[1/0,1/0,-1/0,-1/0],i.currentTransform_=s,i.renderTransform_=[1,0,0,1,0,0],i.invertRenderTransform_=[1,0,0,1,0,0],i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_=i.hitDetectionEnabled_&&new Pu(i.helper),i.worker_=new Worker(Td),i.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===xd){var r=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=r,Et(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.rende
 rInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(i)),i.featureCache_={},i.featureCount_=0;var l=i.getLayer().getSource();return i.sourceListenKeys_=[W(l,ic,i.handleSourceFeatureAdded_,i),W(l,nc,i.handleSourceFeatureChanged_,i),W(l,sc,i.handleSourceFeatureDelete_,i),W(l,oc,i.handleSourceFeatureClear_,i)],l.forEachFeature(function(t){this.featureCache_[o(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(i)),i}return Cd(e,t),e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[o(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[o(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[o(e)],this.featureCount_--},e.prototype.handleSou
 rceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var r=this.helper.getCanvas(),i=t.layerStatesArray[t.layerIndex].opacity;return i!==parseFloat(r.style.opacity)&&(r.style.opacity=String(i)),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),r},e.prototype.prepareFrame=function(t){var e=this.getLayer(),r=e.getSource(),i=t.viewState,n=!t.viewHints[ys]&&!t.viewHints[ms],o=!Jt(this.previousExtent_,t.extent),s=this.sourceRevision_<r.getRevision();if(s&&(this.sourceRevision_=r.getRevision()),n&&(o||s)){var a=i.projection,l=i.resolution,u=e instanceof _d?e.getRenderBuffer():0,h=Gt(t.extent,u*l);r.loadFeatures(h,l,a),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),wt(this.currentTransform_,this.invertRenderTransfor
 m_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,e);var r,i,n=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===n||(this.renderInstructions_=new Float32Array(n)),this.hitDetectionEnabled_){var o=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===o||(this.hitRenderInstructions_=new Float32Array(o))}var s,a,l,u=[],h=[],c=0,p=0;for(var d in this.featureCache_)if((i=(r=this.featureCache_[d]).geometry)&&i.getType()===gt.POINT){u[0]=i.getFlatCoordinates()[0],u[1]=i.getFlatCoordinates()[1],St(e,u),a=p+6,l=void 0,(l=h||[])[0]=Math.floor(a/256/256/256)/255,l[1]=Math.floor(a/256/256)%256/255,l[2]=Math.floor(a/2
 56)%256/255,l[3]=a%256/255,s=l,this.renderInstructions_[c++]=u[0],this.renderInstructions_[c++]=u[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=u[0],this.hitRenderInstructions_[p++]=u[1],this.hitRenderInstructions_[p++]=s[0],this.hitRenderInstructions_[p++]=s[1],this.hitRenderInstructions_[p++]=s[2],this.hitRenderInstructions_[p++]=s[3],this.hitRenderInstructions_[p++]=Number(d));for(var f=void 0,g=0;g<this.customAttributes.length;g++)f=this.customAttributes[g].callback(r.feature,r.properties),this.renderInstructions_[c++]=f,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[p++]=f)}var y={type:xd,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(y.projectionTransform=e,this.worker_.postMessage(y,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var m={type:xd,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.lengt
 h};m.projectionTransform=e,m.hitDetection=!0,this.worker_.postMessage(m,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){if(lt(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var o=St(e.coordinateToPixelTransform,t.slice()),s=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),a=function(t){var e=0;return e+=Math.round(256*t[0]*256*256*255),e+=Math.round(256*t[1]*256*255),e+=Math.round(256*t[2]*255),e+=Math.round(255*t[3])}([s[0]/255,s[1]/255,s[2]/255,s[3]/255]),l=this.hitRenderInstructions_[a],u=Math.floor(l).toString(),h=this.getLayer().getSource().getFeatureByUid(u);return h?i(h,this.getLayer()):void 0}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(t
 his.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){X(t)})),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(bd),Rd={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Pd=[Rd.FILL],Id=[Rd.STROKE],Od=[Rd.BEGIN_PATH],Ld=[Rd.CLOSE_PATH],Md=Rd,Fd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ad=function
 (t){function e(e,r,i,n){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=r,o.pixelRatio=n,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return Fd(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatCoordinates=function(t,e,r,i,n,o){var s=this.coordinates.length,a=this.getBufferedMaxExtent();o&&(e+=i);var l,u,h,c=t[e],p=t[e+1],d=this.tmpCoordinate_,f=!0;for(l=e+i;l<r;l+=i)d[0]=t[l],d[1]=t[l+1],(h=Vt(a,d))!==u?(f&&(this.coordinates[s++]=c,this.coordinates[s++]=p),this.coordinates[s++]=d[0],this.coordinates[s++]=d[1],f=!1):h===Ft?(this.coordinates[s++]=d[0],this.coordinates[s++]=d[1],f=!1):f=!0,c=d[0],p=d[1],u=h;return(n&&f||l===e+i)&&(this.coordinates[s++]=c,this.coordinates[s++]=p),s},e.prototype.drawCustomCoordinate
 s_=function(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){var a=r[o],l=this.appendFlatCoordinates(t,e,a,i,!1,!1);n.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,r){this.beginGeometry(t,e);var i,n,o,s,a,l=t.getType(),u=t.getStride(),h=this.coordinates.length;if(l==gt.MULTI_POLYGON){i=t.getOrientedFlatCoordinates(),s=[];var c=t.getEndss();a=0;for(var p=0,d=c.length;p<d;++p){var f=[];a=this.drawCustomCoordinates_(i,a,c[p],u,f),s.push(f)}this.instructions.push([Md.CUSTOM,h,s,t,r,si])}else l==gt.POLYGON||l==gt.MULTI_LINE_STRING?(o=[],i=l==gt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(i,0,t.getEnds(),u,o),this.instructions.push([Md.CUSTOM,h,o,t,r,oi])):l==gt.LINE_STRING||l==gt.MULTI_POINT?(i=t.getFlatCoordinates(),n=this.appendFlatCoordinates(i,0,i.length,u,!1,!1),this.instructions.push([Md.CUSTOM,h,n,t,r,ni])):l==gt.POINT&&(i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),n=this.coordinates.length,this.instructions.push([
 Md.CUSTOM,h,n,t,r]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){var r=t.getExtent();this.beginGeometryInstruction1_=[Md.BEGIN_GEOMETRY,e,0,r],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Md.BEGIN_GEOMETRY,e,0,r],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var r,i,n=e.length,o=-1;for(t=0;t<n;++t)(i=(r=e[t])[0])==Md.END_GEOMETRY?o=t:i==Md.BEGIN_GEOMETRY&&(r[2]=t,y(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var r=this.state;if(t){var i=t.getColor();r.fillStyle=Ln(i||"#000")}else r.fillStyle=void 0;if(e){var n=e.getColor();r.strokeStyle=Ln(n||"#000");var o=e.getLineCap();r.lineCap=void 0!==o?o:"round";va
 r s=e.getLineDash();r.lineDash=s?s.slice():Kn;var a=e.getLineDashOffset();r.lineDashOffset=a||0;var l=e.getLineJoin();r.lineJoin=void 0!==l?l:"round";var u=e.getWidth();r.lineWidth=void 0!==u?u:1;var h=e.getMiterLimit();r.miterLimit=void 0!==h?h:10,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,r=[Md.SET_FILL_STYLE,e];return"string"!=typeof e&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Md.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void
  0!==r&&this.instructions.push(e.call(this,t)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var r=t.strokeStyle,i=t.lineCap,n=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=r||t.currentLineCap!=i||n!=t.currentLineDash&&!v(t.currentLineDash,n)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==r&&e.call(this,t),t.currentStrokeStyle=r,t.currentLineCap=i,t.currentLineDash=n,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[Md.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_
 &&(this.bufferedMaxExtent_=zt(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Gt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(On),kd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Nd=function(t){function e(e,r,i,n){var o=t.call(this,e,r,i,n)||this;return o.declutterGroups_=null,o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o}return kd(e,t),e.prototype.drawCoordinates_=function(t,e,r,i){return this.appendFlatCoordinates(t,e,r,i,!1,!
 1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),i=t.getStride(),n=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,i);this.instructions.push([Md.DRAW_IMAGE,n,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([Md.DRAW_IMAGE,n,o,this.hitDetectionImage_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRati
 o/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),i=t.getStride(),n=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,i);this.instructions.push([Md.DRAW_IMAGE,n,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([Md.DRAW_IMAGE,n,o,this.hitDetectionImage_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,thi
 s.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var r=t.getAnchor(),i=t.getSize(),n=t.getHitDetectionImage(this.pixelRatio),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.declutterGroups_=e,this.hitDetectionImage_=n,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rota
 teWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0]},e}(Ad),jd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Dd=function(t){function e(e,r,i,n){return t.call(this,e,r,i,n)||this}return jd(e,t),e.prototype.drawFlatCoordinates_=function(t,e,r,i){var n=this.coordinates.length,o=this.appendFlatCoordinates(t,e,r,i,!1,!1),s=[Md.MOVE_TO_LINE_TO,n,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),r},e.prototype.drawLineString=function(t,e){var r=this.state,i=r.strokeStyle,n=r.lineWidth;if(void 0!==i&&void 0!==n){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Md.SET_STROKE_STY
 LE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Od);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(Id),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var r=this.state,i=r.strokeStyle,n=r.lineWidth;if(void 0!==i&&void 0!==n){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Md.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Od);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinates_(s,l,o[u],a);this.hitDetectionInstructions.push(Id),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Id),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},
 e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Id),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Od)},e}(Ad),Gd=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),zd=function(t){function e(e,r,i,n){return t.call(this,e,r,i,n)||this}return Gd(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,r,i){var n=this.state,o=void 0!==n.fillStyle,s=void 0!==n.strokeStyle,a=r.length;this.instructions.push(Od),this.hitDetectionInstructions.push(Od);for(var l=0;l<a;++l){var u=r[l],h=this.coordinates.length,c=this.appendFlatCoordinates(t,e,u,i,!0,!s),p=[Md.MOVE_TO_LINE_TO,h,c];this.instr
 uctions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(Ld),this.hitDetectionInstructions.push(Ld)),e=u}return o&&(this.instructions.push(Pd),this.hitDetectionInstructions.push(Pd)),s&&(this.instructions.push(Id),this.hitDetectionInstructions.push(Id)),e},e.prototype.drawCircle=function(t,e){var r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0!==i||void 0!==n){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([Md.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([Md.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,s,!1,!1);var l=[Md.CIRCLE,a];this.instructions.push(Od,l),this.hitDetectionInstructions.push(Od,l),void 0!==r.fillStyle&&(this.instructions.push(Pd),this.hitDetectionInstructions.push(Pd)
 ),void 0!==r.strokeStyle&&(this.instructions.push(Id),this.hitDetectionInstructions.push(Id)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0!==i||void 0!==n){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([Md.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([Md.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0!==i||void 0!==n){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([Md.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([Md.SET_STROKE_STYLE,r.s
 trokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinatess_(s,l,o[u],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var r=this.coordinates,i=0,n=r.length;i<n;++i)r[i]=ei(r[i],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(Ad);function Bd(t,e,r,i,n){var o,s,a,l,u,h,c,p,d,f=r,g=r,y=0,m=0,_=r;for(o=r;o<i;o+=n){var v=e[o],x=e[o+1];void 0!==l&&(p=v-l,d=x-u,a=Math.sqrt(p*p+d*d),void 0!==h&&(m+=s,Math.acos((h*p+c*d)/(s*a))>t&&(m>y&&(y=m,f=_,g=o),m=0,_=o-n)),s=a,h=p,c=d),l=v,u=x}return(m+=a)>y?[_,o]:[f,g]}var Ud=function(){var t=function(e,r){return(t=Object.
 setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Yd={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Wd={Circle:zd,Default:Ad,Image:Nd,LineString:Dd,Polygon:zd,Text:function(t){function e(e,r,i,n){var o=t.call(this,e,r,i,n)||this;return o.declutterGroups_,o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o}return Ud(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.pr
 ototype.drawText=function(t,e){var r=this.textFillState_,i=this.textStrokeState_,n=this.textState_;if(""!==this.text_&&n&&(r||i)){var o,s,a=this.coordinates.length,l=t.getType(),u=null,h=2,c=2;if(n.placement===uh){if(!ge(this.getBufferedMaxExtent(),t.getExtent()))return;var p=void 0;if(u=t.getFlatCoordinates(),c=t.getStride(),l==gt.LINE_STRING)p=[u.length];else if(l==gt.MULTI_LINE_STRING)p=t.getEnds();else if(l==gt.POLYGON)p=t.getEnds().slice(0,1);else if(l==gt.MULTI_POLYGON){var d=t.getEndss();for(p=[],o=0,s=d.length;o<s;++o)p.push(d[o][0])}this.beginGeometry(t,e);for(var f=n.textAlign,g=0,y=void 0,m=0,_=p.length;m<_;++m){if(null==f){var v=Bd(n.maxAngle,u,g,p[m],c);g=v[0],y=v[1]}else y=p[m];for(o=g;o<y;o+=c)this.coordinates.push(u[o],u[o+1]);h=this.coordinates.length,g=p[m];var x=this.declutterGroups_?0===m?this.declutterGroups_[0]:[].concat(this.declutterGroups_[0]):null;this.drawChars_(a,h,x),a=h}this.endGeometry(e)}else{var w=null;switch(n.overflow||(w=[]),l){case gt.POINT:case 
 gt.MULTI_POINT:h=(u=t.getFlatCoordinates()).length;break;case gt.LINE_STRING:u=t.getFlatMidpoint();break;case gt.CIRCLE:u=t.getCenter();break;case gt.MULTI_LINE_STRING:h=(u=t.getFlatMidpoints()).length;break;case gt.POLYGON:u=t.getFlatInteriorPoint(),n.overflow||w.push(u[2]/this.resolution),c=3;break;case gt.MULTI_POLYGON:var b=t.getFlatInteriorPoints();for(u=[],o=0,s=b.length;o<s;o+=3)n.overflow||w.push(b[o+2]/this.resolution),u.push(b[o],b[o+1]);if(0==(h=u.length))return}h=this.appendFlatCoordinates(u,0,h,c,!1,!1),this.saveTextStates_(),(n.backgroundFill||n.backgroundStroke)&&(this.setFillStrokeStyle(n.backgroundFill,n.backgroundStroke),n.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),n.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var S=n.padding;if(S!=Hn&&(n.scale[0]<0||n.scale[1]<
 0)){var T=n.padding[0],C=n.padding[1],E=n.padding[2],R=n.padding[3];n.scale[0]<0&&(C=-C,R=-R),n.scale[1]<0&&(T=-T,E=-E),S=[T,C,E,R]}var P=this.pixelRatio;this.instructions.push([Md.DRAW_IMAGE,a,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,S==Hn?Hn:S.map((function(t){return t*P})),!!n.backgroundFill,!!n.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,w]);var I=1/P;this.hitDetectionInstructions.push([Md.DRAW_IMAGE,a,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[I,I],NaN,S,!!n.backgroundFill,!!n.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,w]),this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,r=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,
 lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var n=this.textKey_;n in this.textStates||(this.textStates[n]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});var o=this.fillKey_;r&&(o in this.fillStates||(this.fillStates[o]={fillStyle:r.fillStyle}))},e.prototype.drawChars_=function(t,e,r){var i=this.textStrokeState_,n=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();var l=this.pixelRatio,u=Yd[n.textBaseline],h=this.textOffsetY_*l,c=this.text_,p=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([Md.DRAW_CHARS,t,e,u,r,n.overflow,a,n.maxAngle,l,h,o,p*l,c,s,1]),this.hitDetectionInstructions.push([Md.DRAW_CHARS,t,e,u,r,n.overflow,a,n.maxAngle,1,h,o,p,c,s,1/l])},e.prototype.setTextStyle=function(t,e){var r,i,n;if(t){this.declutterGroups_=e;var s=t.getFill();s?((i=this.textFillState_)||(i={},this.te
 xtFillState_=i),i.fillStyle=Ln(s.getColor()||"#000")):(i=null,this.textFillState_=i);var a=t.getStroke();if(a){(n=this.textStrokeState_)||(n={},this.textStrokeState_=n);var l=a.getLineDash(),u=a.getLineDashOffset(),h=a.getWidth(),c=a.getMiterLimit();n.lineCap=a.getLineCap()||"round",n.lineDash=l?l.slice():Kn,n.lineDashOffset=void 0===u?0:u,n.lineJoin=a.getLineJoin()||"round",n.lineWidth=void 0===h?1:h,n.miterLimit=void 0===c?10:c,n.strokeStyle=Ln(a.getColor()||"#000")}else n=null,this.textStrokeState_=n;r=this.textState_;var p=t.getFont()||"10px sans-serif";no(p);var d=t.getScaleArray();r.overflow=t.getOverflow(),r.font=p,r.maxAngle=t.getMaxAngle(),r.placement=t.getPlacement(),r.textAlign=t.getTextAlign(),r.textBaseline=t.getTextBaseline()||"middle",r.backgroundFill=t.getBackgroundFill(),r.backgroundStroke=t.getBackgroundStroke(),r.padding=t.getPadding()||Hn,r.scale=void 0===d?[1,1]:d;var f=t.getOffsetX(),g=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation();this.text_=t.getTex
 t()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0===m?0:m,this.strokeKey_=n?("string"==typeof n.strokeStyle?n.strokeStyle:o(n.strokeStyle))+n.lineCap+n.lineDashOffset+"|"+n.lineWidth+n.lineJoin+n.miterLimit+"["+n.lineDash.join()+"]":"",this.textKey_=r.font+r.scale+(r.textAlign||"?")+(r.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+o(i.fillStyle):""}else this.text_=""},e}(Ad)},Vd=function(){function t(t,e,r,i,n){this.declutter_=n,this.declutterGroups_=null,this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=r,this.buildersByZIndex_={}}return t.prototype.addDeclutter=function(t){var e=null;return this.declutter_&&(t?(e=this.declutterGroups_)[0][0]++:(e=[[1]],this.declutterGroups_=e)),e},t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var r=this.buildersByZIndex_[e];for(var i in r){var n=r[i].finish();t[
 e][i]=n}}return t},t.prototype.getBuilder=function(t,e){var r=void 0!==t?t.toString():"0",i=this.buildersByZIndex_[r];void 0===i&&(i={},this.buildersByZIndex_[r]=i);var n=i[e];void 0===n&&(n=new(0,Wd[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=n);return n},t}();function Xd(t,e,r,i,n,o,s,a,l,u,h,c){var p,d=[];if(c){var f=jr(t,e,r,i,c,[t[e],t[e+1]]);p=f[0]>f[f.length-i]}else p=t[e]>t[r-i];for(var g,y,m=n.length,_=t[e],v=t[e+1],x=t[e+=i],w=t[e+1],b=0,S=Math.sqrt(Math.pow(x-_,2)+Math.pow(w-v,2)),T=!1,C=0;C<m;++C){for(var E=n[g=p?m-C-1:C],R=a*l(u,E,h),P=o+R/2;e<r-i&&b+S<P;)_=x,v=w,x=t[e+=i],w=t[e+1],b+=S,S=Math.sqrt(Math.pow(x-_,2)+Math.pow(w-v,2));var I=P-b,O=Math.atan2(w-v,x-_);if(p&&(O+=O>0?-Math.PI:Math.PI),void 0!==y){var L=O-y;if(T=T||0!==L,L+=L>Math.PI?-2*Math.PI:L<-Math.PI?2*Math.PI:0,Math.abs(L)>s)return null}y=O;var M=I/S,F=Ie(_,x,M),A=Ie(v,w,M);d[g]=[F,A,R/2,O,E],o+=R}return T?d:[[d[0][0],d[0][1],d[0][2],d[0][3],n]]}function qd(t,e,r,i){for(var 
 n=t[e],o=t[e+1],s=0,a=e+i;a<r;a+=i){var l=t[a],u=t[a+1];s+=Math.sqrt((l-n)*(l-n)+(u-o)*(u-o)),n=l,o=u}return s}var Zd=[1/0,1/0,-1/0,-1/0],Kd=[1,0,0,1,0,0],Hd=[],Jd=[],$d=[],Qd=[],tf=function(){function t(t,e,r,i,n){this.overlaps=r,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.declutterItems=[],this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderBuffer_=n,this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,r,i){var n=t+e+r+i;if(this.labels_[n])return this.labels_[n];var o=i?this.strokeStates[i]:null,s=r?this.fillStates[r]:null,a=this.textStates[e],l=this.pixelRatio,u=[a.scale[0]*l,a.scale[1]*l],h=Yd[a.textAlign||"center"],c=i&&o.lineWidth?o.lineWidth:0,p=t.spl
 it("\n"),d=p.length,f=[],g=function(t,e,r){for(var i=e.length,n=0,o=0;o<i;++o){var s=ao(t,e[o]);n=Math.max(n,s),r.push(s)}return n}(a.font,p,f),y=oo(a.font),m=g+c,_=[],v=(m+2)*u[0],x=(y*d+c)*u[1],w={width:v<0?Math.floor(v):Math.ceil(v),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:_};(1==u[0]&&1==u[1]||_.push("scale",u),_.push("font",a.font),i)&&(_.push("strokeStyle",o.strokeStyle),_.push("lineWidth",c),_.push("lineCap",o.lineCap),_.push("lineJoin",o.lineJoin),_.push("miterLimit",o.miterLimit),(jn?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(_.push("setLineDash",[o.lineDash]),_.push("lineDashOffset",o.lineDashOffset)));r&&_.push("fillStyle",s.fillStyle),_.push("textBaseline","middle"),_.push("textAlign","center");var b,S=.5-h,T=h*m+S*c;if(i)for(b=0;b<d;++b)_.push("strokeText",[p[b],T+S*f[b],.5*(c+y)+b*y]);if(r)for(b=0;b<d;++b)_.push("fillText",[p[b],T+S*f[b],.5*(c+y)+b*y]);return this.labels_[n]=w,w},t.prototype.replayTextBackground
 _=function(t,e,r,i,n,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],a&&(t.fillStyle=o[1]),this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.replayImageOrLabel_=function(t,e,r,i,n,o,s,a,l,u,h,c,p,d,f,g,y,m,_){var v=m||_;r-=o*=d[0],i-=s*=d[1];var x=g+h>n.width?n.width-h:g,w=l+c>n.height?n.height-c:l,b=y[3]+x*d[0]+y[1],S=y[0]+w*d[1]+y[2],T=r-y[3],C=i-y[0];(v||0!==p)&&(Hd[0]=T,Qd[0]=T,Hd[1]=C,Jd[1]=C,Jd[0]=T+b,$d[0]=Jd[0],$d[1]=C+S,Qd[1]=$d[1]);var E=null;if(0!==p){var R=r+o,P=i+s;E=Ct(Kd,R,P,1,1,p,-R,-P),St(Kd,Hd),St(Kd,Jd),St(Kd,$d),St(Kd,Qd),qt(Math.min(Hd[0],Jd[0],$d[0],Qd[0]),Math.min(Hd[1],Jd[1],$d[1],Qd[1]),Math.max(Hd[0],Jd[0],$d[0],Qd[0]),Math.max(Hd[1],Jd[1],$d[1],Qd[1]),Zd)}else qt(T,C,T+b,C+S,Zd);this.renderBuffer_[0]=Math.max(this.renderBuffer_[0],fe(Zd)),this.renderBuffer_[1]=Math.max(this.renderBuffer_[1],he(Zd));var I=t.canvas,O=_?_[2]*d[0]/2:0,L=this.re
 nderBuffer_,M=Zd[0]-O<=(I.width+L[0])/e&&Zd[2]+O>=-L[0]/e&&Zd[1]-O<=(I.height+L[1])/e&&Zd[3]+O>=-L[1]/e;if(f&&(r=Math.round(r),i=Math.round(i)),a){if(!M&&1==a[0])return!1;var F=M?[t,E?E.slice(0):null,u,n,h,c,x,w,r,i,d,Zd.slice()]:null;F&&(v&&F.push(m,_,Hd.slice(0),Jd.slice(0),$d.slice(0),Qd.slice(0)),a.push(F))}else M&&(v&&this.replayTextBackground_(t,Hd,Jd,$d,Qd,m,_,!1),ho(t,E,u,n,h,c,x,w,r,i,d));return!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=St(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;t.save(),t.translate(e[0]%r,e[1]%r),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.renderDeclutter=function(t,e,r,i){for(var n=[],o=1,s=t.length;o<s;++o){var a=(c=t[o])[11];n.push({minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:e})}i||(i=new ec.a(9));var 
 l=!1;for(o=0,s=n.length;o<s;++o)if(i.collides(n[o])){l=!0;break}if(!l){i.load(n);for(var u=1,h=t.length;u<h;++u){var c,p=(c=t[u])[0],d=p.globalAlpha;d!==r&&(p.globalAlpha=r),c.length>12&&this.replayTextBackground_(c[0],c[14],c[15],c[16],c[17],c[12],c[13],!0),ho.apply(void 0,c),d!==r&&(p.globalAlpha=d)}}return t.length=1,i},t.prototype.drawLabelWithPointPlacement_=function(t,e,r,i){var n=this.textStates[e],o=this.createLabel(t,e,i,r),s=this.strokeStates[r],a=this.pixelRatio,l=Yd[n.textAlign||"center"],u=Yd[n.textBaseline||"middle"],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*n.scale[0])+2*(.5-l)*h,anchorY:u*o.height/a+2*(.5-u)*h}},t.prototype.execute_=function(t,e,r,i,n,o,s){var a,l,u;this.declutterItems.length=0,this.pixelCoordinates_&&v(r,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=Nr(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),l=this.renderedTransform_,u=r,l[0]=u[0],l[1
 ]=u[1],l[2]=u[2],l[3]=u[3],l[4]=u[4],l[5]=u[5]);for(var h,c,p,d,f,g,y,m,_,x,w,b,S,T,C,E,R,P=0,I=i.length,O=0,L=0,M=0,F=null,A=null,k=this.coordinateCache_,N=this.viewRotation_,j=Math.round(1e12*Math.atan2(-r[1],r[0]))/1e12,D={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:N},G=this.instructions!=i||this.overlaps?0:200;P<I;){var z=i[P];switch(z[0]){case Md.BEGIN_GEOMETRY:(C=z[1]).getGeometry()?void 0===s||ge(s,z[3])?++P:P=z[2]+1:P=z[2];break;case Md.BEGIN_PATH:L>G&&(this.fill_(t),L=0),M>G&&(t.stroke(),M=0),L||M||(t.beginPath(),d=NaN,f=NaN),++P;break;case Md.CIRCLE:var B=a[O=z[1]],U=a[O+1],Y=a[O+2]-B,W=a[O+3]-U,V=Math.sqrt(Y*Y+W*W);t.moveTo(B+V,U),t.arc(B,U,V,0,2*Math.PI,!0),++P;break;case Md.CLOSE_PATH:t.closePath(),++P;break;case Md.CUSTOM:O=z[1],h=z[2];var X=z[3],q=z[4],Z=6==z.length?z[5]:void 0;D.geometry=X,D.feature=C,P in k||(k[P]=[]);var K=k[P];Z?Z(a,O,h,2,K):(K[0]=a[O],K[1]=a[O+1],K.length=2),q(K,D),++P;break;case Md.DRAW_IMAGE:O=z[1],h=z[2],x=z[3],c=
 z[4],p=z[5],_=o?null:z[6];var H=z[7],J=z[8],$=z[9],Q=z[10],tt=z[11],et=z[12],rt=z[13],it=z[14];if(!x&&z.length>=19){w=z[18],b=z[19],S=z[20],T=z[21];var nt=this.drawLabelWithPointPlacement_(w,b,S,T);x=nt.label,z[3]=x;var ot=z[22];c=(nt.anchorX-ot)*this.pixelRatio,z[4]=c;var st=z[23];p=(nt.anchorY-st)*this.pixelRatio,z[5]=p,H=x.height,z[7]=H,it=x.width,z[14]=it}var at=void 0;z.length>24&&(at=z[24]);var lt=void 0,ut=void 0,ht=void 0;z.length>16?(lt=z[15],ut=z[16],ht=z[17]):(lt=Hn,ut=!1,ht=!1),tt&&j?et+=N:tt||j||(et-=N);for(var ct=0,pt=0;O<h;O+=2)if(!(at&&at[ct++]<it/this.pixelRatio)){if(_){var dt=Math.floor(pt);m=_.length<dt+1?[_[0][0]]:_[dt]}(Lt=this.replayImageOrLabel_(t,e,a[O],a[O+1],x,c,p,m,H,J,$,Q,et,rt,n,it,lt,ut?F:null,ht?A:null))&&m&&_[_.length-1]!==m&&_.push(m),m&&(m.length-1===m[0]&&this.declutterItems.push(this,m,C),pt+=1/m[0])}++P;break;case Md.DRAW_CHARS:var ft=z[1],gt=z[2],yt=z[3];m=o?null:z[4];var mt=z[5];T=z[6];var _t=z[7],vt=z[8],xt=z[9];S=z[10];var wt=z[11];w=z[12],b=
 z[13];var bt=[z[14],z[14]],St=this.textStates[b],Tt=St.font,Ct=[St.scale[0]*vt,St.scale[1]*vt],Et=void 0;Tt in this.widths_?Et=this.widths_[Tt]:(Et={},this.widths_[Tt]=Et);var Rt=qd(a,ft,gt,2),Pt=Math.abs(Ct[0])*lo(Tt,w,Et);if(mt||Pt<=Rt){var It=this.textStates[b].textAlign,Ot=Xd(a,ft,gt,2,w,(Rt-Pt)*Yd[It],_t,Math.abs(Ct[0]),lo,Tt,Et,j?0:this.viewRotation_);if(Ot){var Lt=!1,Mt=void 0,Ft=void 0,At=void 0,kt=void 0,Nt=void 0;if(S)for(Mt=0,Ft=Ot.length;Mt<Ft;++Mt)At=(Nt=Ot[Mt])[4],kt=this.createLabel(At,b,"",S),c=Nt[2]+wt,p=yt*kt.height+2*(.5-yt)*wt*Ct[1]/Ct[0]-xt,Lt=this.replayImageOrLabel_(t,e,Nt[0],Nt[1],kt,c,p,m,kt.height,1,0,0,Nt[3],bt,!1,kt.width,Hn,null,null)||Lt;if(T)for(Mt=0,Ft=Ot.length;Mt<Ft;++Mt)At=(Nt=Ot[Mt])[4],kt=this.createLabel(At,b,T,""),c=Nt[2],p=yt*kt.height-xt,Lt=this.replayImageOrLabel_(t,e,Nt[0],Nt[1],kt,c,p,m,kt.height,1,0,0,Nt[3],bt,!1,kt.width,Hn,null,null)||Lt;Lt&&this.declutterItems.push(this,m,C)}}++P;break;case Md.END_GEOMETRY:if(void 0!==o){var jt=o(C=z[1
 ]);if(jt)return jt}++P;break;case Md.FILL:G?L++:this.fill_(t),++P;break;case Md.MOVE_TO_LINE_TO:for(O=z[1],h=z[2],E=a[O],y=(R=a[O+1])+.5|0,(g=E+.5|0)===d&&y===f||(t.moveTo(E,R),d=g,f=y),O+=2;O<h;O+=2)g=(E=a[O])+.5|0,y=(R=a[O+1])+.5|0,O!=h-2&&g===d&&y===f||(t.lineTo(E,R),d=g,f=y);++P;break;case Md.SET_FILL_STYLE:F=z,this.alignFill_=z[2],L&&(this.fill_(t),L=0,M&&(t.stroke(),M=0)),t.fillStyle=z[1],++P;break;case Md.SET_STROKE_STYLE:A=z,M&&(t.stroke(),M=0),this.setStrokeStyle_(t,z),++P;break;case Md.STROKE:G?M++:t.stroke(),++P;break;default:++P}}L&&this.fill_(t),M&&t.stroke()},t.prototype.execute=function(t,e,r,i,n){this.viewRotation_=i,this.execute_(t,e,r,this.instructions,n,void 0,void 0)},t.prototype.executeHitDetection=function(t,e,r,i,n){return this.viewRotation_=r,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,n)},t}(),ef=[xo,yo,vo,_o,wo,mo],rf=function(){function t(t,e,r,i,n,o){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=e,this.renderBuffer_=o,t
 his.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(n)}return t.prototype.clip=function(t,e){var r=this.getClipCoords(e);t.beginPath(),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3]),t.lineTo(r[4],r[5]),t.lineTo(r[6],r[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var r=this.executorsByZIndex_[e];void 0===r&&(r={},this.executorsByZIndex_[e]=r);var i=t[e],n=[this.renderBuffer_||0,this.renderBuffer_||0];for(var o in i){var s=i[o];r[o]=new tf(this.resolution_,this.pixelRatio_,this.overlaps_,s,n)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[e],i=0,n=t.length;i<n;++i)if(t[i]in r)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n,o){var s=2*(i=Math.round(i))+1,a=Ct(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-r,-t[0],-t[1]);this.hitDetectionContext_||(this.hitDetectionContext_=zn(s,s));var l,u=this.hitDetection
 Context_;u.canvas.width!==s||u.canvas.height!==s?(u.canvas.width=s,u.canvas.height=s):u.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(Qt(l=[1/0,1/0,-1/0,-1/0],t),Gt(l,e*(this.renderBuffer_+i),l));var h,c=function(t){if(void 0!==nf[t])return nf[t];for(var e=2*t+1,r=new Array(e),i=0;i<e;i++)r[i]=new Array(e);var n=t,o=0,s=0;for(;n>=o;)of(r,t+n,t+o),of(r,t+o,t+n),of(r,t-o,t+n),of(r,t-n,t+o),of(r,t-n,t-o),of(r,t-o,t-n),of(r,t+o,t-n),of(r,t+n,t-o),o++,2*((s+=1+2*o)-n)+1>0&&(s+=1-2*(n-=1));return nf[t]=r,r}(i);function p(t){for(var e=u.getImageData(0,0,s,s).data,r=0;r<s;r++)for(var i=0;i<s;i++)if(c[r][i]&&e[4*(i*s+r)+3]>0){var a=void 0;return(!o||h!=_o&&h!=wo||-1!==o.indexOf(t))&&(a=n(t)),a||void u.clearRect(0,0,s,s)}}var f,g,y,m,_,v=Object.keys(this.executorsByZIndex_).map(Number);for(v.sort(d),f=v.length-1;f>=0;--f){var x=v[f].toString();for(y=this.executorsByZIndex_[x],g=ef.length-1;g>=0;--g)if(void 0!==(m=y[h=ef[g]])&&(_=m.executeHitDetection(u,a,r,p,l)))return _}},t.prototype.getC
 lipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var r=e[0],i=e[1],n=e[2],o=e[3],s=[r,i,r,o,n,o,n,i];return Nr(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return R(this.executorsByZIndex_)},t.prototype.execute=function(t,e,r,i,n,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(d),this.maxExtent_&&(t.save(),this.clip(t,r));var l,u,h,c,p,f,g=o||ef;for(l=0,u=a.length;l<u;++l){var y=a[l].toString();for(p=this.executorsByZIndex_[y],h=0,c=g.length;h<c;++h){var m=g[h];if(void 0!==(f=p[m]))if(!s||m!=_o&&m!=wo)f.execute(t,e,r,i,n);else{var _=s[y];_?_.push(f,r.slice(0)):s[y]=[f,r.slice(0)]}}}this.maxExtent_&&t.restore()},t}(),nf={0:[[!0]]};function of(t,e,r){var i,n=Math.floor(t.length/2);if(e>=n)for(i=n;i<e;i++)t[i][r]=!0;else if(e<n)for(i=e+1;i<n;i++)t[i][r]=!0}function sf(t,e,r,i,n,o){for(var s=Object.keys(t).map(Number).sort(d),a=0,l=s.length;a<l;++a)for(var u=t[s[a].toString()],h=void 0,c=0,p=u.length;c<p;){var f=u[c++],g=u[c++];f.execute(e,1,g,r,n),f!==
 h&&f.declutterItems.length>0&&(h=f,o.push({items:f.declutterItems,opacity:i}))}}var af=rf;function lf(t,e,r,i,n,o,s){var a=zn(t[0]/2,t[1]/2);a.imageSmoothingEnabled=!1;for(var l=a.canvas,u=new go(a,.5,n,null,s),h=r.length,c=Math.floor(16777215/h),p={},f=1;f<=h;++f){var g=r[f-1],y=g.getStyleFunction()||i;if(i){var m=y(g,o);if(m){Array.isArray(m)||(m=[m]);for(var _="#"+("000000"+(f*c).toString(16)).slice(-6),v=0,x=m.length;v<x;++v){var w=m[v],b=w.clone(),S=b.getFill();S&&S.setColor(_);var T=b.getStroke();T&&T.setColor(_),b.setText(void 0);var C=w.getImage();if(C){var E=C.getImageSize();if(!E)continue;var R=document.createElement("canvas");R.width=E[0],R.height=E[1];var P=R.getContext("2d",{alpha:!1});P.fillStyle=_;var I=P.canvas;P.fillRect(0,0,I.width,I.height),zn(E?E[0]:I.width,E?E[1]:I.height).drawImage(I,0,0),b.setImage(new th({img:I,imgSize:E,anchor:C.getAnchor(),anchorXUnits:zu,anchorYUnits:zu,offset:C.getOrigin(),size:C.getSize(),opacity:C.getOpacity(),scale:C.getScale(),rotatio
 n:C.getRotation(),rotateWithView:C.getRotateWithView()}))}var O=Number(b.getZIndex());(A=p[O])||(A={},p[O]=A,A[gt.POLYGON]=[],A[gt.CIRCLE]=[],A[gt.LINE_STRING]=[],A[gt.POINT]=[]);var L=b.getGeometryFunction()(g);L&&ge(n,L.getExtent())&&A[L.getType().replace("Multi","")].push(L,b)}}}}for(var M=Object.keys(p).map(Number).sort(d),F=(f=0,M.length);f<F;++f){var A=p[M[f]];for(var k in A){var N=A[k];for(v=0,x=N.length;v<x;v+=2){u.setStyle(N[v+1]);for(var j=0,D=e.length;j<D;++j)u.setTransform(e[j]),u.drawGeometry(N[v])}}}return a.getImageData(0,0,l.width,l.height)}function uf(t,e,r){var i=[];if(r){var n=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*r.width),o=r.data[n],s=r.data[n+1],a=r.data[n+2]+256*(s+256*o),l=Math.floor(16777215/e.length);a&&a%l==0&&i.push(e[a/l-1])}return i}var hf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r
 ){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),cf=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.animatingOrInteracting_,r.dirty_=!1,r.hitDetectionImageData_=null,r.renderedFeatures_=null,r.renderedRevision_=-1,r.renderedResolution_=NaN,r.renderedExtent_=[1/0,1/0,-1/0,-1/0],r.renderedRotation_,r.renderedCenter_=null,r.renderedProjection_=null,r.renderedRenderOrder_=null,r.replayGroup_=null,r.replayGroupChanged=!0,r}return hf(e,t),e.prototype.useContainer=function(e,r,i){i<1&&(e=null),t.prototype.useContainer.call(this,e,r,i)},e.prototype.renderFrame=function(t,e){var r=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];!function(t,e,r){bt(t,e,0,0,r,0,0)}(this.pixelTransform,1/r,1/r),Et(this.inversePixelTransform,this.pixelTransform);var n=Rt(this.pixelTransform);this.useContainer(e,n,i.opacity);var o=this.context,s=o.canvas,a=this.replayGro
 up_;if(!a||a.isEmpty())return!this.containerReused&&s.width>0&&(s.width=0),this.container;var l=Math.round(t.size[0]*r),u=Math.round(t.size[1]*r);s.width!=l||s.height!=u?(s.width=l,s.height=u,s.style.transform!==n&&(s.style.transform=n)):this.containerReused||o.clearRect(0,0,l,u),this.preRender(o,t);var h=t.extent,c=t.viewState,p=c.center,d=c.resolution,f=c.projection,g=c.rotation,y=f.getExtent(),m=this.getLayer().getSource(),_=!1;if(i.extent){var v=Ar(i.extent,f);(_=!Yt(v,t.extent)&&ge(v,t.extent))&&this.clipUnrotated(o,t,v)}var x=t.viewHints,w=!(x[ys]||x[ms]),b=this.getRenderTransform(p,d,g,r,l,u,0),S=this.getLayer().getDeclutter()?{}:null;if(a.execute(o,1,b,g,w,void 0,S),m.getWrapX()&&f.canWrapX()&&!Yt(y,h)){for(var T=h[0],C=fe(y),E=0,R=void 0;T<y[0];){R=C*--E;var P=this.getRenderTransform(p,d,g,r,l,u,R);a.execute(o,1,P,g,w,void 0,S),T+=C}for(E=0,T=h[2];T>y[2];){R=C*++E;var I=this.getRenderTransform(p,d,g,r,l,u,R);a.execute(o,1,I,g,w,void 0,S),T-=C}}if(S){var O=t.viewHints;sf(S,o
 ,g,1,!(O[ys]||O[ms]),t.declutterItems)}_&&o.restore(),this.postRender(o,t);var L=i.opacity,M=this.container;return L!==parseFloat(M.style.opacity)&&(M.style.opacity=1===L?"":String(L)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e,r){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];St(this.pixelTransform,i);var n=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.renderedExtent_,u=this.getLayer(),h=[],c=i[0]/2,p=i[1]/2;h.push(this.getRenderTransform(n,o,s,.5,c,p,0).slice());var d=u.getSource(),f=a.getExtent();if(d.getWrapX()&&a.canWrapX()&&!Yt(f,l)){for(var g=l[0],y=fe(f),m=0,_=void 0;g<f[0];)_=y*--m,h.push(this.getRenderTransform(n,o,s,.5,c,p,_).slice()),g+=y;for(m=0,g=l[2];g>f[2];)_=y*++m,h.push(this.getRenderTr
 ansform(n,o,s,.5,c,p,_).slice()),g-=y}this.hitDetectionImageData_=lf(i,h,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}e(uf(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){if(this.replayGroup_){var s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),u={};return this.replayGroup_.forEachFeatureAtCoordinate(t,s,a,r,(function(t){var e=o(t);if(!(e in u))return u[e]=!0,i(t,l)}),l.getDeclutter()?n:null)}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),r=e.getSource();if(!r)return!1;var i=t.viewHints[ys],n=t.viewHints[ms],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&i||!s&&n)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t
 .extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=e.getRevision(),d=e.getRenderBuffer(),f=e.getRenderOrder();void 0===f&&(f=Po);var g=l.center.slice(),y=Gt(a,d*h),m=[y.slice()],_=u.getExtent();if(r.getWrapX()&&u.canWrapX()&&!Yt(_,t.extent)){var v=fe(_),x=Math.max(fe(y)/2,v);y[0]=_[0]-x,y[2]=_[2]+x,hr(g,u);var w=ve(m[0],u);w[0]<_[0]&&w[2]<_[2]?m.push([w[0]+v,w[1],w[2]+v,w[3]]):w[0]>_[0]&&w[2]>_[2]&&m.push([w[0]-v,w[1],w[2]-v,w[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==f&&Yt(this.renderedExtent_,y))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var b,S=new Vd(Oo(h,c),y,h,c,e.getDeclutter()),T=Or();if(T){for(var C=0,E=m.length;C<E;++C)r.loadFeatures(Fr(m[C],u),h,T);b=br(T,u)}else for(C=0,E=m.length;C<E;++C)r.loadFeatures(m[C],h,u);var R=Io(h,c),P=function(t){var r,i=t.getStyleFunction()||e.getStyleFunction();if(i&&(r=i(t,h)),r){var n=this.renderFeature(t,R,r,S,b);this.dirty_=th
 is.dirty_||n}}.bind(this),I=Fr(y,u),O=r.getFeaturesInExtent(I);f&&O.sort(f);for(C=0,E=O.length;C<E;++C)P(O[C]);this.renderedFeatures_=O;var L=S.finish(),M=new af(y,h,c,r.getOverlaps(),L,e.getRenderBuffer());return this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=f,this.renderedExtent_=y,this.renderedCenter_=g,this.renderedProjection_=u,this.replayGroup_=M,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,r,i,n){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var s=0,a=r.length;s<a;++s)o=Lo(i,t,r[s],e,this.boundHandleStyleImageChange_,n)||o;else o=Lo(i,t,r,e,this.boundHandleStyleImageChange_,n);return o},e}(cp),pf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(
 i.prototype=r.prototype,new i)}}(),df=function(t){function e(e){var r=t.call(this,e)||this;return r.vectorRenderer_=new cf(e),r.layerImageRatio_=e.getImageRatio(),r.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],r.renderedPixelToCoordinateTransform_=null,r}return pf(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(this.vectorRenderer_){var e=St(this.coordinateToVectorPixelTransform_,St(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}return new Promise((function(t,e){t([])}))},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,r=t.viewState,i=r.resolution,n=t.viewHints,o=this.vectorRenderer_,s=t.extent;1!==this.layerImageRatio_&&me(s=s.slice(0),this.layerImageRatio_);var a=fe(s)/i,l=he(s)/i;if(!n[ys]&&!n[ms]&&!ye(s)){o.useContainer(null,null,1)
 ;var u=o.context,h=T({},t,{coordinateToPixelTransform:[1,0,0,1,0,0],declutterItems:[],extent:s,size:[a,l],viewState:T({},t.viewState,{rotation:0})}),c=new Yc(s,i,e,u.canvas,(function(t){o.prepareFrame(h)&&o.replayGroupChanged&&(o.renderFrame(h,null),Fo(h,null),t())}));c.addEventListener(O,function(){if(c.getState()===To){this.image_=c;var t=c.getResolution(),i=c.getPixelRatio(),n=t*e/i;this.renderedResolution=n,this.coordinateToVectorPixelTransform_=Ct(this.coordinateToVectorPixelTransform_,a/2,l/2,1/n,-1/n,0,-r.center[0],-r.center[1])}}.bind(this)),c.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,r,i,n,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,r,i,n,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,r,i,n,o)},e}(dp),ff="image",gf="hybrid",yf="vecto
 r",mf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_f={image:[xo,yo,vo,_o,wo],hybrid:[xo,vo],vector:[]},vf={image:[mo],hybrid:[_o,wo,mo],vector:[xo,yo,vo,_o,wo,mo]},xf=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.dirty_=!1,r.renderedLayerRevision_,r.renderedPixelToCoordinateTransform_=null,r.renderedRotation_,r.renderTileImageQueue_={},r.tileListenerKeys_={},r.tmpTransform_=[1,0,0,1,0,0],r}return mf(e,t),e.prototype.prepareTile=function(t,e,r,i){var n,s=o(t),a=t.getState();return(a===cs&&t.hifi||a===ps)&&s in this.tileListenerKeys_&&(X(this.tileListenerKeys_[s]),delete this.tileListenerKeys_[s]),a!==cs&&a!==ps||(this.update
 ExecutorGroup_(t,e,r),this.tileImageNeedsRender_(t,e,r)&&(n=!0,i&&(this.renderTileImageQueue_[s]=t))),n},e.prototype.getTile=function(e,r,i,n){var s=n.pixelRatio,a=n.viewState,l=a.resolution,u=a.projection,h=this.getLayer(),c=h.getSource().getTile(e,r,i,s,u);if(c.getState()<cs){c.wantedResolution=l;var p=o(c);if(!(p in this.tileListenerKeys_)){var d=W(c,O,this.prepareTile.bind(this,c,s,u,!0));this.tileListenerKeys_[p]=d}}else{var f=n.viewHints;!!(f[ys]||f[ms])&&c.wantedResolution||(c.wantedResolution=l),this.prepareTile(c,s,u,!1)&&h.getRenderMode()!==yf&&this.renderTileImage_(c,n)}return t.prototype.getTile.call(this,e,r,i,n)},e.prototype.isDrawableTile=function(e){var r=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(r.getRenderMode()===yf?o(r)in e.executorGroups:e.hasContext(r))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(t
 his.renderedTiles.length=0),this.renderedLayerRevision_=r,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,r){var i=this.getLayer(),n=i.getRevision(),s=i.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(i);if(l.dirty||l.renderedResolution!==a||l.renderedRevision!=n||l.renderedRenderOrder!=s||l.renderedZ!==t.sourceZ){var u=i.getSource(),h=u.getTileGrid(),c=u.getTileGridForProjection(r).getTileCoordExtent(t.wrappedTileCoord),p=u.getSourceTiles(e,r,t),d=o(i);delete t.hitDetectionImageData[d],t.executorGroups[d]=[];for(var f=function(r,n){var o=p[r];if(o.getState()!=cs)return"continue";var f=o.tileCoord,y=h.getTileCoordExtent(f),m=ce(c,y),_=Jt(y,m)?null:Gt(m,i.getRenderBuffer()*a,g.tmpExtent);l.dirty=!1;var v=new Vd(0,m,a,e,i.getDeclutter()),x=Io(a,e),w=function(t){var e,r=t.getStyleFunction()||i.getStyleFunction();if(r&&(e=r(t,a)),e){var n=this.renderFeature(t,x,e,v);this.dirty_=this.dirty_||n,l.dirty=l.dirty||n}},b=o.getFeatures();s&&s
 !==l.renderedRenderOrder&&b.sort(s);for(var S=0,T=b.length;S<T;++S){var C=b[S];_&&!ge(_,C.getGeometry().getExtent())||w.call(g,C)}var E=v.finish(),R=i.getRenderMode()!==yf&&i.getDeclutter()&&1===p.length?null:m,P=new af(R,a,e,u.getOverlaps(),E,i.getRenderBuffer());t.executorGroups[d].push(P)},g=this,y=0,m=p.length;y<m;++y)f(y);l.renderedRevision=n,l.renderedZ=t.sourceZ,l.renderedRenderOrder=s,l.renderedResolution=a}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){var s=e.viewState.resolution,a=e.viewState.rotation;r=null==r?0:r;var l,u,h,c=this.getLayer(),p=c.getDeclutter(),d=c.getSource().getTileGridForProjection(e.viewState.projection),f={},g=this.renderedTiles,y=function(){var e=g[u],h=Ut(d.getTileCoordExtent(e.wrappedTileCoord),t);if(!p&&!h)return"continue";for(var y=e.executorGroups[o(c)],m=0,_=y.length;m<_;++m){var v=y[m];l=l||v.forEachFeatureAtCoordinate(t,s,a,r,(function(t){if(h||n&&-1!==n.indexOf(t)){var e=t.getId();if(void 0===e&&(e=o(t)),!(e in f))return f[e]=
 !0,i(t,c)}}),c.getDeclutter()?n:null)}};for(u=0,h=g.length;u<h;++u)y();return l},e.prototype.getFeatures=function(t){return new Promise(function(e,r){for(var i,n=this.getLayer(),s=o(n),a=n.getSource(),l=this.renderedProjection,u=l.getExtent(),h=this.renderedResolution,c=a.getTileGridForProjection(l),p=St(this.renderedPixelToCoordinateTransform_,t.slice()),d=c.getTileCoordForCoordAndResolution(p,h),f=0,g=this.renderedTiles.length;f<g;++f)if(d.toString()===this.renderedTiles[f].tileCoord.toString()){if((i=this.renderedTiles[f]).getState()===cs&&i.hifi){var y=c.getTileCoordExtent(i.tileCoord);a.getWrapX()&&l.canWrapX()&&!Yt(u,y)&&hr(p,l);break}i=void 0}if(!i||i.loadingSourceTiles>0)e([]);else{var m=pe(c.getTileCoordExtent(i.wrappedTileCoord)),_=[(p[0]-m[0])/h,(m[1]-p[1])/h],v=i.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),x=i.hitDetectionImageData[s];if(!x&&!this.animatingOrInteracting_){var w=Ds(c.getTileSize(c.getZForResolution(h))),b=[w[0]/2,w[1]/2],
 S=this.renderedRotation_;x=lf(w,[this.getRenderTransform(c.getTileCoordCenter(i.wrappedTileCoord),h,0,.5,b[0],b[1],0)],v,n.getStyleFunction(),c.getTileCoordExtent(i.wrappedTileCoord),i.getReplayState(n).renderedResolution,S),i.hitDetectionImageData[s]=x}e(uf(_,v,x))}}.bind(this))},e.prototype.handleFontsChanged=function(){C(this.renderTileImageQueue_);var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderFrame=function(e,r){var i=e.viewHints,n=!(i[ys]||i[ms]);this.renderQueuedTileImages_(n,e),t.prototype.renderFrame.call(this,e,r),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode();if(a===ff)return this.container;var l=s.getSource(),u=e.usedTiles[o(l)];for(var h in this.renderTileImageQueue_)u&&h in u||delete this.renderTileImageQueue_[h];for
 (var c=this.context,p=s.getDeclutter()?{}:null,d=vf[a],f=e.pixelRatio,g=e.viewState,y=g.center,m=g.resolution,_=g.rotation,v=e.size,x=Math.round(v[0]*f),w=Math.round(v[1]*f),b=this.renderedTiles,S=l.getTileGridForProjection(e.viewState.projection),T=[],C=[],E=b.length-1;E>=0;--E)for(var R=b[E],P=R.tileCoord,I=S.getTileCoordExtent(R.wrappedTileCoord),O=S.getTileCoordExtent(P,this.tmpExtent)[0]-I[0],L=wt(Tt(this.inversePixelTransform.slice(),1/f,1/f),this.getRenderTransform(y,m,_,f,x,w,O)),M=R.executorGroups[o(s)],F=!1,A=0,k=M.length;A<k;++A){var N=M[A];if(N.hasExecutors(d)){var j=R.tileCoord[0],D=void 0;if(!p&&!F){D=N.getClipCoords(L),c.save();for(var G=0,z=T.length;G<z;++G){var B=T[G];j<C[G]&&(c.beginPath(),c.moveTo(D[0],D[1]),c.lineTo(D[2],D[3]),c.lineTo(D[4],D[5]),c.lineTo(D[6],D[7]),c.moveTo(B[6],B[7]),c.lineTo(B[4],B[5]),c.lineTo(B[2],B[3]),c.lineTo(B[0],B[1]),c.clip())}}N.execute(c,1,L,_,n,d,p),p||F||(c.restore(),T.push(D),C.push(j),F=!0)}}p&&sf(p,c,_,e.layerStatesArray[e.layer
 Index].opacity,n,e.declutterItems);return this.container},e.prototype.renderQueuedTileImages_=function(t,e){for(var r in this.renderTileImageQueue_){if(!t&&Date.now()-e.time>8){e.animate=!0;break}var i=this.renderTileImageQueue_[r];delete this.renderTileImageQueue_[r],this.renderTileImage_(i,e)}},e.prototype.renderFeature=function(t,e,r,i){if(!r)return!1;var n=!1;if(Array.isArray(r))for(var o=0,s=r.length;o<s;++o)n=Lo(i,t,r[o],e,this.boundHandleStyleImageChange_)||n;else n=Lo(i,t,r,e,this.boundHandleStyleImageChange_);return n},e.prototype.tileImageNeedsRender_=function(t,e,r){var i=this.getLayer(),n=t.getReplayState(i),o=i.getRevision(),s=t.sourceZ,a=t.wantedResolution;return n.renderedTileResolution!==a||n.renderedTileRevision!==o||n.renderedTileZ!==s},e.prototype.renderTileImage_=function(t,e){var r=this.getLayer(),i=t.getReplayState(r),n=r.getRevision(),s=t.executorGroups[o(r)];i.renderedTileRevision=n,i.renderedTileZ=t.sourceZ;var a=t.wrappedTileCoord,l=a[0],u=r.getSource(),h=e
 .pixelRatio,c=e.viewState.projection,p=u.getTileGridForProjection(c),d=p.getResolution(t.tileCoord[0]),f=e.pixelRatio/t.wantedResolution*d,g=p.getResolution(l),y=t.getContext(r);h=Math.max(h,f/h);var m=u.getTilePixelSize(l,h,c);y.canvas.width=m[0],y.canvas.height=m[1];var _=h/f;if(1!==_){var v=xt(this.tmpTransform_);Tt(v,_,_),y.setTransform.apply(y,v)}var x=p.getTileCoordExtent(a,this.tmpExtent),w=f/g,b=xt(this.tmpTransform_);Tt(b,w,-w),function(t,e,r){wt(t,bt(vt,1,0,0,1,e,r))}(b,-x[0],-x[3]);for(var S=0,T=s.length;S<T;++S){s[S].execute(y,_,b,0,!0,_f[r.getRenderMode()])}i.renderedTileResolution=t.wantedResolution},e}(bp);function wf(t,e,r,i,n,o,s){var a,l,u=(r-e)/i;if(1===u)a=e;else if(2===u)a=e,l=n;else if(0!==u){for(var h=t[e],c=t[e+1],p=0,f=[0],g=e+i;g<r;g+=i){var y=t[g],m=t[g+1];p+=Math.sqrt((y-h)*(y-h)+(m-c)*(m-c)),f.push(p),h=y,c=m}var _=n*p,v=function(t,e,r){for(var i,n,o=r||d,s=0,a=t.length,l=!1;s<a;)(n=+o(t[i=s+(a-s>>1)],e))<0?s=i+1:(a=i,l=!n);return l?s:~s}(f,_);v<0?(l=(_-
 f[-v-2])/(f[-v-1]-f[-v-2]),a=e+(-v-2)*i):a=e+v*i}var x=s>1?s:2,w=o||new Array(x);for(g=0;g<x;++g)w[g]=void 0===a?NaN:void 0===l?t[a+g]:Ie(t[a+g],t[a+i+g],l);return w}function bf(t,e,r,i,n,o){if(r==e)return null;var s;if(n<t[e+i-1])return o?((s=t.slice(e,e+i))[i-1]=n,s):null;if(t[r-1]<n)return o?((s=t.slice(r-i,r))[i-1]=n,s):null;if(n==t[e+i-1])return t.slice(e,e+i);for(var a=e/i,l=r/i;a<l;){var u=a+l>>1;n<t[(u+1)*i-1]?l=u:a=u+1}var h=t[a*i-1];if(n==h)return t.slice((a-1)*i,(a-1)*i+i);var c=(n-h)/(t[(a+1)*i-1]-h);s=[];for(var p=0;p<i-1;++p)s.push(Ie(t[(a-1)*i+p],t[a*i+p],c));return s.push(n),s}var Sf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Tf=function(t){function e(e,r){var i=t.call(this)||this;retur
 n i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?i.setCoordinates(e,r):i.setFlatCoordinates(r,e),i}return Sf(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?m(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,i){return i<Bt(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Xr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,r,i))},e.prototype.forEachSegment=function(t){return _i(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=dt&&this.layout!=ft)return null;var r=void 0!==e&&e;retur
 n bf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r)},e.prototype.getCoordinates=function(){return ni(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return wf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return qd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=Qr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,ct)},e.prototype.getType=function(){return gt.LINE_STRING},e.prototype.intersectsExtent=function(t){return vi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.proto
 type.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Jr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Wr),Cf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ef=function(t){function e(e){return t.call(this,e)||this}return Cf(e,t),e.prototype.createRenderer=function(){return new cf(this)},e}(_d);function Rf(t,e,r){for(var i,n,o,s,a,l,u=[],h=t(0),c=t(1),p=e(h),d=e(c),f=[c,h],g=[d,p],y=[1,0],m={},_=1e5;--_>0&&y.length>0;)o=y.pop(),h=f.pop(),p=g.pop(),(l=o.toString())in m||(u.push(p[0],p[1]),m[l]=!0),s=y.pop(),c=f.pop(),d=g.pop(),Te((n=e(i=t(a=(o+s)/2)))[0],n[1],p[0],p[1],d[0],d[1])<r?(u.push(d[0],d[1]),m[l=s.toString()]=!0
 ):(y.push(s,a,a,o),g.push(d,n,n,p),f.push(c,i,i,h));return u}var Pf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),If=new eh({color:"rgba(0,0,0,0.2)"}),Of=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],Lf=function(t){function e(e){var r=this,i=e||{},n=T({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},i);return delete n.maxLines,delete n.strokeStyle,delete n.targetSize,delete n.showLabels,delete n.lonLabelFormatter,delete n.latLabelFormatter,delete n.lonLabelPosition,delete n.latLabelPosition,delete n.lonLabelStyle,delete n.latLabelStyle,delete n.intervals,(r=t.call(this,n)||this).projection_=null,r.maxLat_=1/0,r.maxLon_=1/0,r.minLat_=-1/0,r.minLon_=-1/0,r.maxX_=1/0,r.maxY_=1/0,r.
 minX_=-1/0,r.minY_=-1/0,r.targetSize_=void 0!==i.targetSize?i.targetSize:100,r.maxLines_=void 0!==i.maxLines?i.maxLines:100,r.meridians_=[],r.parallels_=[],r.strokeStyle_=void 0!==i.strokeStyle?i.strokeStyle:If,r.fromLonLatTransform_=void 0,r.toLonLatTransform_=void 0,r.projectionCenterLonLat_=null,r.bottomLeft_=null,r.bottomRight_=null,r.topLeft_=null,r.topRight_=null,r.meridiansLabels_=null,r.parallelsLabels_=null,i.showLabels&&(r.lonLabelFormatter_=null==i.lonLabelFormatter?er.bind(r,"EW"):i.lonLabelFormatter,r.latLabelFormatter_=null==i.latLabelFormatter?er.bind(r,"NS"):i.latLabelFormatter,r.lonLabelPosition_=null==i.lonLabelPosition?0:i.lonLabelPosition,r.latLabelPosition_=null==i.latLabelPosition?1:i.latLabelPosition,r.lonLabelStyleBase_=new ah({text:void 0!==i.lonLabelStyle?i.lonLabelStyle.clone():new hh({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new Du({color:"rgba(0,0,0,1)"}),stroke:new eh({color:"rgba(255,255,255,1)",width:3})})}),r.lonLabelStyle_=function(
 t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(r),r.latLabelStyleBase_=new ah({text:void 0!==i.latLabelStyle?i.latLabelStyle.clone():new hh({font:"12px Calibri,sans-serif",textAlign:"right",fill:new Du({color:"rgba(0,0,0,1)"}),stroke:new eh({color:"rgba(255,255,255,1)",width:3})})}),r.latLabelStyle_=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(r),r.meridiansLabels_=[],r.parallelsLabels_=[],r.addEventListener(vn,r.drawLabels_.bind(r))),r.intervals_=void 0!==i.intervals?i.intervals:Of,r.setSource(new uc({loader:r.loaderFunction.bind(r),strategy:r.strategyFunction.bind(r),features:new at,overlaps:!1,useSpatialIndex:!1,wrapX:i.wrapX})),r.featurePool_=[],r.lineStyle_=new ah({stroke:r.strokeStyle_}),r.loadedExtent_=null,r.renderedExtent_=null,r.setRenderOrder(null),r}return Pf(e,t),e.prototype.strategyFunction=function(t,e){var r,i,n,o=t.slic
 e();return this.projection_&&this.getSource().getWrapX()&&ve(o,this.projection_),this.loadedExtent_&&(r=this.loadedExtent_,i=o,n=e,Math.abs(r[0]-i[0])<n&&Math.abs(r[2]-i[2])<n&&Math.abs(r[1]-i[1])<n&&Math.abs(r[3]-i[3])<n?o=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[o]},e.prototype.loaderFunction=function(t,e,r){this.loadedExtent_=t;var i=this.getSource(),n=ce(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(!(this.renderedExtent_&&Jt(this.renderedExtent_,n)||(this.renderedExtent_=n,ye(n)))){var o=ae(n),s=e*e/4;(!this.projection_||!wr(this.projection_,r))&&this.updateProjectionInfo_(r),this.createGraticule_(n,o,e,s);var a,l=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(l+=this.meridians_.length),this.parallelsLabels_&&(l+=this.parallels_.length);l>this.featurePool_.length;)a=new ht,this.featurePool_.push(a);var u=i.getFeaturesCollection();u.clear();var h,c,p=0;for(h=0,c=this.meridians_.length;h<c;++h)(a=this.featurePoo
 l_[p++]).setGeometry(this.meridians_[h]),a.setStyle(this.lineStyle_),u.push(a);for(h=0,c=this.parallels_.length;h<c;++h)(a=this.featurePool_[p++]).setGeometry(this.parallels_[h]),a.setStyle(this.lineStyle_),u.push(a)}},e.prototype.addMeridian_=function(t,e,r,i,n,o){var s=this.getMeridian_(t,e,r,i,o);if(ge(s.getExtent(),n)){if(this.meridiansLabels_){var a=this.lonLabelFormatter_(t);o in this.meridiansLabels_?this.meridiansLabels_[o].text=a:this.meridiansLabels_[o]={geom:new pi([]),text:a}}this.meridians_[o++]=s}return o},e.prototype.addParallel_=function(t,e,r,i,n,o){var s=this.getParallel_(t,e,r,i,o);if(ge(s.getExtent(),n)){if(this.parallelsLabels_){var a=this.latLabelFormatter_(t);o in this.parallelsLabels_?this.parallelsLabels_[o].text=a:this.parallelsLabels_[o]={geom:new pi([]),text:a}}this.parallels_[o++]=s}return o},e.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,r=t.frameState.extent,i=ae(r),n=r;if(e){var o=fe(r),s=he(r),a=Math.abs(Math.cos(e)),l=Math
 .abs(Math.sin(e)),u=(l*s-a*o)/(l*l-a*a),h=(l*o-a*s)/(l*l-a*a);n=[i[0]-u/2,i[1]-h/2,i[0]+u/2,i[1]+h/2]}var c=0,p=0,d=this.latLabelPosition_<.5,f=this.projection_.getExtent(),g=fe(f);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Yt(f,r)&&(c=Math.floor((r[0]-f[0])/g),p=Math.ceil((r[2]-f[2])/g),d=d!==Math.abs(e)>Math.PI/2);for(var y=Mo(t),m=c;m<=p;++m){var _=this.meridians_.length+this.parallels_.length,v=void 0,x=void 0,w=void 0,b=void 0;if(this.meridiansLabels_)for(x=0,w=this.meridiansLabels_.length;x<w;++x){var S=this.meridians_[x];if(e||0!==m)(T=S.clone()).translate(m*g,0),T.rotate(-e,i),(b=this.getMeridianPoint_(T,n,x)).rotate(e,i);else b=this.getMeridianPoint_(S,r,x);(v=this.featurePool_[_++]).setGeometry(b),v.set("graticule_label",this.meridiansLabels_[x].text),y.drawFeature(v,this.lonLabelStyle_(v))}if(this.parallelsLabels_&&(m===c&&d||m===p&&!d))for(x=0,w=this.parallels_.length;x<w;++x){var T;S=this.parallels_[x];if(e||0!==m)(T=S.clone()).translate(m*g,0),T.rotate(
 -e,i),(b=this.getParallelPoint_(T,n,x)).rotate(e,i);else b=this.getParallelPoint_(S,r,x);(v=this.featurePool_[_++]).setGeometry(b),v.set("graticule_label",this.parallelsLabels_[x].text),y.drawFeature(v,this.latLabelStyle_(v))}}},e.prototype.createGraticule_=function(t,e,r,i){var n=this.getInterval_(r);if(-1==n)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var o=!1,s=this.projection_.getExtent(),a=fe(s);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!Yt(s,t)&&(fe(t)>=a?(t[0]=s[0],t[2]=s[2]):o=!0);var l=[we(e[0],this.minX_,this.maxX_),we(e[1],this.minY_,this.maxY_)],u=this.toLonLatTransform_(l);isNaN(u[1])&&(u[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);var h,c,p,d,f=we(u[0],this.minLon_,this.maxLon_),g=we(u[1],this.minLat_,this.maxLat_),y=this.maxLines_,m=t;o||(m=[we(t[0],this.minX_,this.maxX_),we(t[1],this.minY_,
 this.maxY_),we(t[2],this.minX_,this.maxX_),we(t[3],this.minY_,this.maxY_)]);var _=_e(m,this.toLonLatTransform_,void 0,8),v=_[3],x=_[2],w=_[1],b=_[0];if(o||(Ut(m,this.bottomLeft_)&&(b=this.minLon_,w=this.minLat_),Ut(m,this.bottomRight_)&&(x=this.maxLon_,w=this.minLat_),Ut(m,this.topLeft_)&&(b=this.minLon_,v=this.maxLat_),Ut(m,this.topRight_)&&(x=this.maxLon_,v=this.maxLat_),v=we(v,g,this.maxLat_),x=we(x,f,this.maxLon_),w=we(w,this.minLat_,g),b=we(b,this.minLon_,f)),d=we(f=Math.floor(f/n)*n,this.minLon_,this.maxLon_),c=this.addMeridian_(d,w,v,i,t,0),h=0,o)for(;(d-=n)>=b&&h++<y;)c=this.addMeridian_(d,w,v,i,t,c);else for(;d!=this.minLon_&&h++<y;)d=Math.max(d-n,this.minLon_),c=this.addMeridian_(d,w,v,i,t,c);if(d=we(f,this.minLon_,this.maxLon_),h=0,o)for(;(d+=n)<=x&&h++<y;)c=this.addMeridian_(d,w,v,i,t,c);else for(;d!=this.maxLon_&&h++<y;)d=Math.min(d+n,this.maxLon_),c=this.addMeridian_(d,w,v,i,t,c);for(this.meridians_.length=c,this.meridiansLabels_&&(this.meridiansLabels_.length=c),p=we(
 g=Math.floor(g/n)*n,this.minLat_,this.maxLat_),c=this.addParallel_(p,b,x,i,t,0),h=0;p!=this.minLat_&&h++<y;)p=Math.max(p-n,this.minLat_),c=this.addParallel_(p,b,x,i,t,c);for(p=we(g,this.minLat_,this.maxLat_),h=0;p!=this.maxLat_&&h++<y;)p=Math.min(p+n,this.maxLat_),c=this.addParallel_(p,b,x,i,t,c);this.parallels_.length=c,this.parallelsLabels_&&(this.parallelsLabels_.length=c)},e.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],r=this.projectionCenterLonLat_[1],i=-1,n=Math.pow(this.targetSize_*t,2),o=[],s=[],a=0,l=this.intervals_.length;a<l;++a){var u=we(this.intervals_[a]/2,0,90),h=we(r,-90+u,90-u);if(o[0]=e-u,o[1]=h-u,s[0]=e+u,s[1]=h+u,this.fromLonLatTransform_(o,o),this.fromLonLatTransform_(s,s),Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)<=n)break;i=this.intervals_[a]}return i},e.prototype.getMeridian_=function(t,e,r,i,n){var o=function(t,e,r,i,n){return Rf((function(i){return[t,e+(r-e)*i]}),Sr(gr("EPSG:4326"),i),n)}(t,e,r,this.projection_,i),s=this.mer
 idians_[n];return s?(s.setFlatCoordinates(ct,o),s.changed()):(s=new Tf(o,ct),this.meridians_[n]=s),s},e.prototype.getMeridianPoint_=function(t,e,r){var i=t.getFlatCoordinates(),n=1,o=i.length-1;i[n]>i[o]&&(n=o,o=1);var s=Math.max(e[1],i[n]),a=Math.min(e[3],i[o]),l=we(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,s,a),u=[i[n-1]+(i[o-1]-i[n-1])*(l-i[n])/(i[o]-i[n]),l],h=this.meridiansLabels_[r].geom;return h.setCoordinates(u),h},e.prototype.getMeridians=function(){return this.meridians_},e.prototype.getParallel_=function(t,e,r,i,n){var o=function(t,e,r,i,n){return Rf((function(i){return[e+(r-e)*i,t]}),Sr(gr("EPSG:4326"),i),n)}(t,e,r,this.projection_,i),s=this.parallels_[n];return s?(s.setFlatCoordinates(ct,o),s.changed()):s=new Tf(o,ct),s},e.prototype.getParallelPoint_=function(t,e,r){var i=t.getFlatCoordinates(),n=0,o=i.length-2;i[n]>i[o]&&(n=o,o=0);var s=Math.max(e[0],i[n]),a=Math.min(e[2],i[o]),l=we(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,s,a),u=[l,i[n+1]+(i[o+1]-i[n+1])*
 (l-i[n])/(i[o]-i[n])],h=this.parallelsLabels_[r].geom;return h.setCoordinates(u),h},e.prototype.getParallels=function(){return this.parallels_},e.prototype.updateProjectionInfo_=function(t){var e=gr("EPSG:4326"),r=t.getWorldExtent();this.maxLat_=r[3],this.maxLon_=r[2],this.minLat_=r[1],this.minLon_=r[0];var i=Sr(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=i;else{var n=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,r){for(var o=r||2,s=i(t,e,o),a=0,l=s.length;a<l;a+=o)s[a]<n&&(s[a]+=360);return s}}this.fromLonLatTransform_=Sr(e,t);var o=_e([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=o[0],this.maxX_=o[2],this.minY_=o[1],this.maxY_=o[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTrans
 form_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_(ae(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},e}(Ef),Mf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ff="blur",Af="gradient",kf="radius",Nf=["#00f","#0ff","#0f0","#ff0","#f00"];var jf=function(t){function e(e){var r=this,i=e||{},n=T({},i);delete n.gradient,delete n.radius,delete n.blur,delete n.weight,(r=t.call(this,n)||this).gradient_=null,r.addEventListener(tt(Af),r.handleGradientChanged_),r.setGradient(i.gradient?i.gradient:Nf),r.setBlur(void 0!==i.blur?i.blur:15),r.setRadius(v
 oid 0!==i.radius?i.radius:8);var o=i.weight?i.weight:"weight";return r.weightFunction_="string"==typeof o?function(t){return t.get(o)}:o,r.setRenderOrder(null),r}return Mf(e,t),e.prototype.getBlur=function(){return this.get(Ff)},e.prototype.getGradient=function(){return this.get(Af)},e.prototype.getRadius=function(){return this.get(kf)},e.prototype.handleGradientChanged_=function(){this.gradient_=function(t){for(var e=zn(1,256),r=e.createLinearGradient(0,0,1,256),i=1/(t.length-1),n=0,o=t.length;n<o;++n)r.addColorStop(n*i,t[n]);return e.fillStyle=r,e.fillRect(0,0,1,256),e.canvas}(this.getGradient())},e.prototype.setBlur=function(t){this.set(Ff,t)},e.prototype.setGradient=function(t){this.set(Af,t)},e.prototype.setRadius=function(t){this.set(kf,t)},e.prototype.createRenderer=function(){return new Ed(this,{attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?we(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        un
 iform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blur
 Slope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.
 0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(
 0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(kf)+this.get(Ff))}.bind(this),u_blurSlope:function(){return this.get(kf)/Math.max(1,this.get(Ff))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this)}}]})},e}(Ef),Df=function(){function t(){this.dataProjection=null,this.defaultFeatureProjection=null}return t.prototype.getReadOptio
 ns=function(t,e){var r;if(e){var i=e.dataProjection?gr(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()===_t.TILE_PIXELS&&(i=gr(i)).setWorldExtent(e.extent),r={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(r)},t.prototype.adaptOptions=function(t){return T({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return i()},t.prototype.readFeature=function(t,e){return i()},t.prototype.readFeatures=function(t,e){return i()},t.prototype.readGeometry=function(t,e){return i()},t.prototype.readProjection=function(t){return i()},t.prototype.writeFeature=function(t,e){return i()},t.prototype.writeFeatures=function(t,e){return i()},t.prototype.writeGeometry=function(t,e){return i()},t}();function Gf(t,e,r){var i,n=r?gr(r.featureProjection):null,o=r?gr(r.dataProjection):null;if(i=n&&o&&!wr(n,o)?(e?t.clone():t).transform(e?n:o,e?o:n):t,e&&r&&void 0!==r.decimals){var s=Math.pow(10
 ,r.decimals);i===t&&(i=t.clone()),i.applyTransform((function(t){for(var e=0,r=t.length;e<r;++e)t[e]=Math.round(t[e]*s)/s;return t}))}return i}function zf(t,e){var r=e?gr(e.featureProjection):null,i=e?gr(e.dataProjection):null;return r&&i&&!wr(r,i)?Cr(t,i,r):t}var Bf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Uf=function(t){function e(e,r,i){var n=t.call(this)||this;if(n.ends_=[],n.maxDelta_=-1,n.maxDeltaRevision_=-1,Array.isArray(e[0]))n.setCoordinates(e,r);else if(void 0!==r&&i)n.setFlatCoordinates(r,e),n.ends_=i;else{for(var o=n.getLayout(),s=e,a=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];0===u&&(o=c.getLayout()),m(a,c.getFlatCoordinates()),l.push(a.length)}n.setFlatCoordinates(o,a),n.ends_=l}return 
 n}return Bf(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,r,i){return i<Bt(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(qr(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Kr(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,r,i))},e.prototype.getCoordinateAtM=function(t,e,r){if(this.layout!=dt&&this.layout!=ft||0===this.flatCoordinates.length)return null;var i=void 0!==e&&e,n=void 0!==r&&r;return function(t,e,r,i,n,o,s){if(s)return bf(t,e,r[r.length-1],i,n,o);var a;if(n<t[i-1])return o?((a=t.slice(0,i))[i-1]=n,a):null;if(t[t.length-1]<n)return o
 ?((a=t.slice(t.length-i))[i-1]=n,a):null;for(var l=0,u=r.length;l<u;++l){var h=r[l];if(e!=h){if(n<t[e+i-1])return null;if(n<=t[h-1])return bf(t,e,h,i,n,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,i,n)},e.prototype.getCoordinates=function(){return oi(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new Tf(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,r=this.layout,i=[],n=0,o=0,s=e.length;o<s;++o){var a=e[o],l=new Tf(t.slice(n,a),r);i.push(l),n=a}return i},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,r=0,i=this.ends_,n=this.stride,o=0,s=i.length;o<s;++o){var a=i[o];m(t,wf(e,r,a,n,.5)),r=a}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=ti(this.fla
 tCoordinates,0,this.ends_,this.stride,t,r,0,i),new e(r,ct,i)},e.prototype.getType=function(){return gt.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return function(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){if(vi(t,e,r[o],i,n))return!0;e=r[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=$r(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(Wr),Yf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Wf=function(t){function e(e,r){var i=t.call(this)||this;return r&&!Array.isArray(e[0])?i.setFlatCo
 ordinates(r,e):i.setCoordinates(e,r),i}return Yf(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?m(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,i){if(i<Bt(this.getExtent(),t,e))return i;for(var n=this.flatCoordinates,o=this.stride,s=0,a=n.length;s<a;s+=o){var l=Ce(t,e,n[s],n[s+1]);if(l<i){i=l;for(var u=0;u<o;++u)r[u]=n[s+u];r.length=o}}return i},e.prototype.getCoordinates=function(){return ni(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new pi(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,r=this.stride,i=[],n=0,o=t.length;n<o;n+=r){
 var s=new pi(t.slice(n,n+r),e);i.push(s)}return i},e.prototype.getType=function(){return gt.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,r=this.stride,i=0,n=e.length;i<n;i+=r){if(Wt(t,e[i],e[i+1]))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Jr(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Wr);function Vf(t,e,r,i){for(var n=[],o=[1/0,1/0,-1/0,-1/0],s=0,a=r.length;s<a;++s){var l=r[s];o=Ht(t,e,l[0],i),n.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=l[l.length-1]}return n}var Xf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),qf=function(t){function e(e,r,i){
 var n=t.call(this)||this;if(n.endss_=[],n.flatInteriorPointsRevision_=-1,n.flatInteriorPoints_=null,n.maxDelta_=-1,n.maxDeltaRevision_=-1,n.orientedRevision_=-1,n.orientedFlatCoordinates_=null,!i&&!Array.isArray(e[0])){for(var o=n.getLayout(),s=e,a=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];0===u&&(o=c.getLayout());for(var p=a.length,d=c.getEnds(),f=0,g=d.length;f<g;++f)d[f]+=p;m(a,c.getFlatCoordinates()),l.push(d)}r=o,e=a,i=l}return void 0!==r&&i?(n.setFlatCoordinates(r,e),n.endss_=i):n.setCoordinates(e,r),n}return Xf(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var r=this.flatCoordinates.length;m(this.flatCoordinates,t.getFlatCoordinates());for(var i=0,n=(e=t.getEnds().slice()).length;i<n;++i)e[i]+=r}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,r=new Array(t),i=0;i<t;++i)r[i]=this.endss_[i].slice();return ne
 w e(this.flatCoordinates.slice(),this.layout,r)},e.prototype.closestPointXY=function(t,e,r,i){return i<Bt(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){var a=r[o];n=qr(t,e,a,i,n),e=a[a.length-1]}return n}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,r,i,n,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,d=r.length;p<d;++p){var f=r[p];u=Kr(t,e,f,i,n,o,s,a,l,u,c),e=f[f.length-1]}return u}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,r,i))},e.prototype.containsXY=function(t,e){return function(t,e,r,i,n,o){if(0===r.length)return!1;for(var s=0,a=r.length;s<a;++s){var l=r[s];if(gi(t,e,l,i,n,o))return!0;e=l[l.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,r,i){for(var n=0,o=0,s=r.length;o<s;++o){var a=r[o];n+=li(t
 ,e,a,i),e=a[a.length-1]}return n}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Ci(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,si(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Vf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=mi(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new Wf(this.getFlatInteriorPoints().slice(),dt)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){var a=r[o];if(!Si(t,e,a,i,n))return!1;a.lengt
 h&&(e=a[a.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ci(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=function(t,e,r,i,n,o,s,a){for(var l=0,u=r.length;l<u;++l){var h=r[l],c=[];s=ii(t,e,h,i,n,o,s,c),a.push(c),e=h[h.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),r,0,i),new e(r,ct,i)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var r=this.endss_[t-1];e=r[r.length-1]}var i=this.endss_[t].slice(),n=i[i.length-1];if(0!==e)for(var o=0,s=i.length;o<s;++o)i[o]-=e;return new Pi(this.flatCoordinates.slice(e,n),this.layout,i)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.endss_
 ,i=[],n=0,o=0,s=r.length;o<s;++o){var a=r[o].slice(),l=a[a.length-1];if(0!==n)for(var u=0,h=a.length;u<h;++u)a[u]-=n;var c=new Pi(e.slice(n,l),t,a);i.push(c),n=l}return i},e.prototype.getType=function(){return gt.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return function(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){var a=r[o];if(xi(t,e,a,i,n))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var r=function(t,e,r,i,n){for(var o=n||[],s=0,a=0,l=r.length;a<l;++a){var u=$r(t,e,r[a],i,o[s]);o[s++]=u,e=u[u.length-1]}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===r.length)this.flatCoordinates.length=0;else{var i=r[r.length-1];this.flatCoordinates.length=0===i.length?0:i[i.length-1]}this.changed()},e}(Wr),Zf=r(2),Kf=r.n(Zf),Hf=[1,0,0,1,0,0],Jf=function(){function t(t,e,r,i,n){this.extent_,thi
 s.id_=n,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=i}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===gt.POINT?Kt(this.flatCoordinates_):Ht(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=ae(this.getExtent());this.flatInteriorPoints_=yi(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Vf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=mi(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=wf(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.g
 etFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,i=0,n=r.length;i<n;++i){var o=r[i],s=wf(t,e,o,2,.5);m(this.flatMidpoints_,s),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t,e){var r=(t=gr(t)).getExtent(),i=t.getWorldExtent(),n=he(i)/he(r);Ct(Hf,i[0],i[3],n,-n,0,0,0),Nr(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Hf,this.flatCoordinates_)},t.prototype.getEnds=function(){return this.ends_},t}();Jf.prot
 otype.getEndss=Jf.prototype.getEnds,Jf.prototype.getFlatCoordinates=Jf.prototype.getOrientedFlatCoordinates;var $f=Jf,Qf=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function tg(t,e,r){if(3===t){var i={keys:[],values:[],features:[]},n=r.readVarint()+r.pos;r.readFields(eg,i,n),i.length=i.features.length,i.length&&(e[i.name]=i)}}function eg(t,e,r){if(15===t)e.version=r.readVarint();else if(1===t)e.name=r.readString();else if(5===t)e.extent=r.readVarint();else if(2===t)e.features.push(r.pos);else if(3===t)e.keys.push(r.readString());else if(4===t){for(var i=null,n=r.readVarint()+r.pos;r.pos<n;)i=1===(t=r.readVarint()>>3)?r.readString():2===t?r.readFloat():3===t?r.readDouble():4===t?r.readVarint64():5===t?r.
 readVarint():6===t?r.readSVarint():7===t?r.readBoolean():null;e.values.push(i)}}function rg(t,e,r){if(1==t)e.id=r.readVarint();else if(2==t)for(var i=r.readVarint()+r.pos;r.pos<i;){var n=e.layer.keys[r.readVarint()],o=e.layer.values[r.readVarint()];e.properties[n]=o}else 3==t?e.type=r.readVarint():4==t&&(e.geometry=r.pos)}function ig(t,e,r){t.pos=e.features[r];var i=t.readVarint()+t.pos,n={layer:e,type:0,properties:{}};return t.readFields(rg,n,i),n}var ng=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.dataProjection=new xe({code:"",units:_t.TILE_PIXELS}),r.featureClass_=i.featureClass?i.featureClass:$f,r.geometryName_=i.geometryName,r.layerName_=i.layerName?i.layerName:"layer",r.layers_=i.layers?i.layers:null,r.idProperty_=i.idProperty,r}return Qf(e,t),e.prototype.readRawGeometry_=function(t,e,r,i){t.pos=e.geometry;for(var n=t.readVarint()+t.pos,o=1,s=0,a=0,l=0,u=0,h=0;t.pos<n;){if(!s){var c=t.readVarint();o=7&c,s=c>>3}s--,1===o||2===o?(a+=t.readSVarint(),l+=t.r
 eadSVarint(),1===o&&u>h&&(i.push(u),h=u),r.push(a,l),u+=2):7===o?u>h&&(r.push(r[h],r[h+1]),u+=2):lt(!1,59)}u>h&&(i.push(u),h=u)},e.prototype.createFeature_=function(t,e,r){var i,n=e.type;if(0===n)return null;var o,s=e.properties;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;var a=[],l=[];this.readRawGeometry_(t,e,a,l);var u=function(t,e){var r;1===t?r=1===e?gt.POINT:gt.MULTI_POINT:2===t?r=1===e?gt.LINE_STRING:gt.MULTI_LINE_STRING:3===t&&(r=gt.POLYGON);return r}(n,l.length);if(this.featureClass_===$f)(i=new this.featureClass_(u,a,l,s,o)).transform(r.dataProjection,r.featureProjection);else{var h=void 0;if(u==gt.POLYGON){for(var c=[],p=0,d=0,f=0,g=l.length;f<g;++f){var y=l[f];if(bi(a,p,y,2)){if(0===c.length)continue;c[c.length-1].push(l[d])}else c.push(l.slice(d,f+1));d=f+1,p=y}h=c.length>1?new qf(a,ct,c):new Pi(a,ct,l)}else h=u===gt.POINT?new pi(a,ct):u===gt.LINE_STRING?new Tf(a,ct):u===gt.POLYGON?new Pi(a,ct,l):u===gt.MULT
 I_POINT?new Wf(a,ct):u===gt.MULTI_LINE_STRING?new Uf(a,ct,l):null;i=new(0,this.featureClass_),this.geometryName_&&i.setGeometryName(this.geometryName_);var m=Gf(h,!1,r);i.setGeometry(m),i.setId(o),i.setProperties(s,!0)}return i},e.prototype.getType=function(){return fl},e.prototype.readFeatures=function(t,e){var r=this.layers_,i=this.adaptOptions(e),n=gr(i.dataProjection);n.setWorldExtent(i.extent),i.dataProjection=n;var o=new Kf.a(t),s=o.readFields(tg,{}),a=[];for(var l in s)if(!r||-1!=r.indexOf(l)){var u=s[l],h=u?[0,0,u.extent,u.extent]:null;n.setExtent(h);for(var c=0,p=u.length;c<p;++c){var d=ig(o,u,c);a.push(this.createFeature_(o,d,i))}}return a},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(Df),og=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(
 e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),sg=function(t){function e(e){var r=this,i=e||{},n=T({},i);delete n.preload,delete n.useInterimTilesOnError,r=t.call(this,n)||this;var o=i.renderMode||gf;return lt(null==o||o==ff||o==gf||o==yf,28),r.renderMode_=o,r.setPreload(i.preload?i.preload:0),r.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),r}return og(e,t),e.prototype.createRenderer=function(){return new xf(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(yp)},e.prototype.getUseInterimTilesOnError=function(){return this.get(mp)},e.prototype.setPreload=function(t){this.set(yp,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(mp,t)},e}(_d),ag=r(3),lg=r.n(ag),ug=0,hg=1,cg=2,pg=3;function dg(){return function(){thr
 ow new Error("Unimplemented abstract method.")}()}let fg=0;function gg(t){return t.ol_uid||(t.ol_uid=String(++fg))}function yg(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}class mg{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=yg(t.scale),this.displacement_=t.displacement}clone(){const t=this.getScale();return new mg({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getAnchor(){return dg()}getImage(t){return dg()}getHitDetectionImage(t){return dg()}getPixelRatio(t){return 1}getImageState(){return dg()}getImageSize(
 ){return dg()}getHitDetectionImageSize(){return dg()}getOrigin(){return dg()}getSize(){return dg()}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=yg(t)}listenImageChange(t){dg()}load(){dg()}unlistenImageChange(t){dg()}}var _g=mg;class vg extends Error{constructor(t){const e="Assertion failed. See https://openlayers.org/en/latest/doc/errors/#"+t+" for details.";super(e),this.code=t,this.name="AssertionError",this.message=e}}var xg=vg;function wg(t,e){if(!t)throw new xg(e)}function bg(t,e,r){return Math.min(Math.max(t,e),r)}const Sg=function(){let t;return t="cosh"in Math?Math.cosh:function(t){const e=Math.exp(t);return(e+1/e)/2},t}();!function(){let t;t="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E}}();function Tg(t,e,r,i,n,o){const s=n-r,a=o-i;if(0!==s||0!==a){const l=((t-r)*s+(e-i)*a)/(s*s+a*a);l>1?(r=n,i=o):l>0&&(r+=s*l,i+=a*l)}return Cg(t,e,r,i)}function Cg(t,
 e,r,i){const n=r-t,o=i-e;return n*n+o*o}function Eg(t,e,r){return t+r*(e-t)}const Rg=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Pg=/^([a-z]*)$|^hsla?\(.*\)$/i;function Ig(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}const Og=function(){const t={};let e=0;return(function(r){let i;if(t.hasOwnProperty(r))i=t[r];else{if(e>=1024){let r=0;for(const i in t)0==(3&r++)&&(delete t[i],--e)}i=function(t){let e,r,i,n,o;Pg.exec(t)&&(t=Ig(t));if(Rg.exec(t)){const s=t.length-1;let a;a=s<=4?1:2;const l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),r=parseInt(t.substr(1+1*a,a),16),i=parseInt(t.substr(1+2*a,a),16),n=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,r=(r<<4)+r,i=(i<<4)+i,l&&(n=(n<<4)+n)),o=[e,r,i,n/255]}else 0==t.indexOf("rgba(")?(o=t.slice(5,-1).split(",").map(Number),Mg(o)):0==t.indexOf("rgb(")?(o=t.slice(4,-1).split(",").map(N
 umber),o.push(1),Mg(o)):wg(!1,14);return o}(r),t[r]=i,++e}return i})}();function Lg(t){return Array.isArray(t)?t:Og(t)}function Mg(t){return t[0]=bg(t[0]+.5|0,0,255),t[1]=bg(t[1]+.5|0,0,255),t[2]=bg(t[2]+.5|0,0,255),t[3]=bg(t[3],0,1),t}function Fg(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let r=t[1];r!=(0|r)&&(r=r+.5|0);let i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+r+","+i+","+(void 0===t[3]?1:t[3])+")"}function Ag(t){return Array.isArray(t)?Fg(t):t}const kg="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Ng=(kg.indexOf("firefox"),-1!==kg.indexOf("safari")&&kg.indexOf("chrom"),-1!==kg.indexOf("webkit")&&kg.indexOf("edge"),kg.indexOf("macintosh"),"undefined"!=typeof devicePixelRatio&&devicePixelRatio,"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope),jg="undefined"!=typeof Image&&Image.prototype.decode;!function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:fu
 nction(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}}();function Dg(t,e,r){const i=r&&r.length?r.shift():Ng?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(i.width=t),e&&(i.height=e),i.getContext("2d")}var Gg=class{constructor(t){this.propagationStopped,this.type=t,this.target=null}preventDefault(){this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}},zg="propertychange";var Bg=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function Ug(t,e){return t>e?1:t<e?-1:0}function Yg(t,e,r){for(;e<r;){const i=t[e];t[e]=t[r],t[r]=i,++e,--r}}function Wg(t,e){const r=Array.isArray(e)?e:[e],i=r.length;for(let e=0;e<i;e++)t[t.length]=r[e]}function Vg(t,e){const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}function Xg(){}const qg="function"==typeof Object.assign?Object.assign:fun
 ction(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");const r=Object(t);for(let t=1,e=arguments.length;t<e;++t){const e=arguments[t];if(null!=e)for(const t in e)e.hasOwnProperty(t)&&(r[t]=e[t])}return r};function Zg(t){for(const e in t)delete t[e]}"function"==typeof Object.values&&Object.values;function Kg(t){let e;for(e in t)return!1;return!e}var Hg=class extends Bg{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const r=this.listeners_||(this.listeners_={}),i=r[t]||(r[t]=[]);-1===i.indexOf(e)&&i.push(e)}dispatchEvent(t){const e="string"==typeof t?new Gg(t):t,r=e.type;e.target||(e.target=this.eventTarget_||this);const i=this.listeners_&&this.listeners_[r];let n;if(i){const t=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});r in t||(t[r]=0,o[r]=0),++t[r];for(let t=0,r=i.length;t<r;++t)if(n="handleEvent
 "in i[t]?i[t].handleEvent(e):i[t].call(this,e),!1===n||e.propagationStopped){n=!1;break}if(--t[r],0===t[r]){let e=o[r];for(delete o[r];e--;)this.removeEventListener(r,Xg);delete t[r]}return n}}disposeInternal(){this.listeners_&&Zg(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){const r=this.listeners_&&this.listeners_[t];if(r){const i=r.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(r[i]=Xg,++this.pendingRemovals_[t]):(r.splice(i,1),0===r.length&&delete this.listeners_[t]))}}},Jg="change",$g="error",Qg="clear",ty="load";function ey(t,e,r,i,n){if(i&&i!==t&&(r=r.bind(i)),n){const i=r;r=function(){t.removeEventListener(e,r),i.apply(this,arguments)}}const o={target:t,type:e,listener:r};return t.addEventListener(e,r),o}function ry(t,e,r,i){return ey(t,e,r,i,!0)}function iy(t){t&&t.target&&(t.target.remo
 veEventListener(t.type,t.listener),Zg(t))}function ny(t){if(Array.isArray(t))for(let e=0,r=t.length;e<r;++e)iy(t[e]);else iy(t)}var oy=class extends Hg{constructor(){super(),this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Jg)}getRevision(){return this.revision_}on(t,e){if(Array.isArray(t)){const r=t.length,i=new Array(r);for(let n=0;n<r;++n)i[n]=ey(this,t[n],e);return i}return ey(this,t,e)}once(t,e){let r;if(Array.isArray(t)){const i=t.length;r=new Array(i);for(let n=0;n<i;++n)r[n]=ry(this,t[n],e)}else r=ry(this,t,e);return e.ol_key=r,r}un(t,e){const r=e.ol_key;if(r)ny(r);else if(Array.isArray(t))for(let r=0,i=t.length;r<i;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)}};class sy extends Gg{constructor(t,e,r){super(t),this.key=e,this.oldValue=r}}const ay={};function ly(t){return ay.hasOwnProperty(t)?ay[t]:ay[t]="change:"+t}var uy=class extends oy{constructor(t){super(),gg(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;r
 eturn this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&qg({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let r;r=ly(t),this.dispatchEvent(new sy(r,t,e)),r=zg,this.dispatchEvent(new sy(r,t,e))}set(t,e,r){const i=this.values_||(this.values_={});if(r)i[t]=e;else{const r=i[t];i[t]=e,r!==e&&this.notify(t,r)}}setProperties(t,e){for(const r in t)this.set(r,t[r],e)}unset(t,e){if(this.values_&&t in this.values_){const r=this.values_[t];delete this.values_[t],Kg(this.values_)&&(this.values_=null),e||this.notify(t,r)}}};const hy=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\
 \%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),cy=["style","variant","weight","size","lineHeight","family"],py=function(t){const e=t.match(hy);if(!e)return null;const r={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,i=cy.length;t<i;++t){const i=e[t+1];void 0!==i&&(r[cy[t]]=i)}return r.families=r.family.split(/,\s?/),r},dy=new Array(6);function fy(t){return yy(t,1,0,0,1,0,0)}function gy(t,e){const r=t[0],i=t[1],n=t[2],o=t[3],s=t[4],a=t[5],l=e[0],u=e[1],h=e[2],c=e[3],p=e[4],d=e[5];return t[0]=r*l+n*u,t[1]=i*l+o*u,t[2]=r*h+n*c,t[3]=i*h+o*c,t[4]=r*p+n*d+s,t[5]=i*p+o*d+a,t}function yy(t,e,r,i,n,o,s){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t[4]=o,t[5]=s,t}function my(t,e){const r=e[0],i=e[1];return e[0]=t[0]*r+t[2]*i+t[4],e[1]=t[1]*r+t[3]*i+t[5],e}function _y(t,e,r){return gy(t,yy(dy,e,0,0,r,0,0))}function vy(t,e,r,i,n,o,s,a){const l=Math.sin(o),u=Math.cos(o);return t[0]=i*u,t[1]=n*l,t[2]=-i*l,t[3]=n*u,t[4]=s*i*u-a*i
 *l+e,t[5]=s*n*l+a*n*u+r,t}function xy(t,e){const r=(i=e)[0]*i[3]-i[1]*i[2];var i;wg(0!==r,32);const n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return t[0]=a/r,t[1]=-o/r,t[2]=-s/r,t[3]=n/r,t[4]=(s*u-a*l)/r,t[5]=-(n*u-o*l)/r,t}function wy(t){return"matrix("+t.join(", ")+")"}const by=[],Sy=[0,0,0,0],Ty=new uy,Cy=new Hg;Cy.setSize=function(){console.warn("labelCache is deprecated.")};let Ey,Ry=null;const Py={},Iy=function(){const t=["monospace","serif"],e=t.length,r="wmytzilWMYTZIL@#/&?$%10";let i,n;function o(i,o,s){let a=!0;for(let l=0;l<e;++l){const e=t[l];if(n=My(i+" "+o+" 32px "+e,r),s!=e){const t=My(i+" "+o+" 32px "+s+","+e,r);a=a&&t!=n}}return!!a}function s(){let t=!0;const e=Ty.getKeys();for(let r=0,i=e.length;r<i;++r){const i=e[r];Ty.get(i)<100&&(o.apply(this,i.split("\n"))?(Zg(Py),Ry=null,Ey=void 0,Ty.set(i,100)):(Ty.set(i,Ty.get(i)+1,!0),t=!1))}t&&(clearInterval(i),i=void 0)}return function(t){const e=py(t);if(!e)return;const r=e.families;for(let t=0,n=r.length;t<n;++t){con
 st n=r[t],a=e.style+"\n"+e.weight+"\n"+n;void 0===Ty.get(a)&&(Ty.set(a,100,!0),o(e.style,e.weight,n)||(Ty.set(a,0,!0),void 0===i&&(i=setInterval(s,32))))}}}(),Oy=function(){let t;const e=Py;return function(r){let i=e[r];if(null==i)if(Ng){const t=py(r),e=Ly(r,"Žg"),i=isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight);Py[r]=i*(e.actualBoundingBoxAscent+e.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.margin="0 !important",t.style.padding="0 !important",t.style.position="absolute !important",t.style.left="-99999px !important"),t.style.font=r,document.body.appendChild(t),i=t.offsetHeight,e[r]=i,document.body.removeChild(t);return i}}();function Ly(t,e){return Ry||(Ry=Dg(1,1)),t!=Ey&&(Ry.font=t,Ey=Ry.font),Ry.measureText(e)}function My(t,e){return Ly(t,e).width}function Fy(t,e,r){if(e in r)return r[e];const i=My(t,e);return r[e]=i,i}function Ay(t,e,r,i){0!==e&&(t.translate(r,i),t.rotate(e),t.translate(-r,-i))}function ky(t,e,r,i,n,o,s,a,l,u,
 h){t.save(),1!==r&&(t.globalAlpha*=r),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,u),t.scale(h[0],h[1]),function(t,e){const r=t.contextInstructions;for(let t=0,i=r.length;t<i;t+=2)Array.isArray(r[t+1])?e[r[t]].apply(e,r[t+1]):e[r[t]]=r[t+1]}(i,t)):h[0]<0||h[1]<0?(t.translate(l,u),t.scale(h[0],h[1]),t.drawImage(i,n,o,s,a,0,0,s,a)):t.drawImage(i,n,o,s,a,l,u,s*h[0],a*h[1]),t.restore()}let Ny=null;class jy extends _g{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0]}),this.canvas_={},this.hitDetectionCanvas_={},this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionIma
 geSize_=null,this.render()}clone(){const t=new jy({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t}getAnchor(){return this.anchor_}getAngle(){return this.angle_}getFill(){return this.fill_}getHitDetectionImage(t){if(!this.hitDetectionCanvas_[t||1]){const e=this.createRenderOptions();this.createHitDetectionCanvas_(e,t||1)}return this.hitDetectionCanvas_[t||1]}getImage(t){if(!this.canvas_[t||1]){const e=this.createRenderOptions(),r=Dg(e.size*t||1,e.size*t||1);this.draw_(e,r,0,0,t||1),this.canvas_[t||1]=r.canvas}return this.canvas_[t||1]}getPixelRatio(t){return t}getImageSize(){return this.imageSize_}getHitDetectionImageSize(){return this.hitDetectionImag
 eSize_}getImageState(){return cg}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}listenImageChange(t){}load(){}unlistenImageChange(t){}createRenderOptions(){let t,e="round",r="round",i=0,n=null,o=0,s=0;return this.stroke_&&(t=this.stroke_.getColor(),null===t&&(t="#000"),t=Ag(t),s=this.stroke_.getWidth(),void 0===s&&(s=1),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),r=this.stroke_.getLineJoin(),void 0===r&&(r="round"),e=this.stroke_.getLineCap(),void 0===e&&(e="round"),i=this.stroke_.getMiterLimit(),void 0===i&&(i=10)),{strokeStyle:t,strokeWidth:s,size:2*(this.radius_+s)+1,lineCap:e,lineDash:n,lineDashOffset:o,lineJoin:r,miterLimit:i}}render(){const t=this.createRenderOptions(),e=Dg(t.size,t.size);this.draw_(t,e,0,0,1),this.canvas_[1]=e.canvas;const r=e.canvas.width,i=r,n=this.getDisplacement();this.hitDetectionImageSize_=[t.
 size,t.size],this.createHitDetectionCanvas_(t,1),this.anchor_=[r/2-n[0],r/2+n[1]],this.size_=[r,r],this.imageSize_=[i,i]}draw_(t,e,r,i,n){let o,s,a;e.setTransform(n,0,0,n,0,0),e.translate(r,i),e.beginPath();let l=this.points_;if(l===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{const r=void 0!==this.radius2_?this.radius2_:this.radius_;for(r!==this.radius_&&(l*=2),o=0;o<=l;o++)s=2*o*Math.PI/l-Math.PI/2+this.angle_,a=o%2==0?this.radius_:r,e.lineTo(t.size/2+a*Math.cos(s),t.size/2+a*Math.sin(s))}if(this.fill_){let t=this.fill_.getColor();null===t&&(t="#000"),e.fillStyle=Ag(t),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()}createHitDetectionCanvas_(t,e){if(this.hitDetectionCanvas_[e]=this.getImage(e),this.fill_){let r=this.fill_.getColor(),i=0;if("string"==typeo
 f r&&(r=Lg(r)),null===r?i=1:Array.isArray(r)&&(i=4===r.length?r[3]:1),0===i){const r=Dg(t.size*e,t.size*e);this.hitDetectionCanvas_[e]=r.canvas,this.drawHitDetectionCanvas_(t,r,0,0,e)}}}drawHitDetectionCanvas_(t,e,r,i,n){e.setTransform(n,0,0,n,0,0),e.translate(r,i),e.beginPath();let o=this.points_;if(o===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{const r=void 0!==this.radius2_?this.radius2_:this.radius_;let i,n,s;for(r!==this.radius_&&(o*=2),i=0;i<=o;i++)s=2*i*Math.PI/o-Math.PI/2+this.angle_,n=i%2==0?this.radius_:r,e.lineTo(t.size/2+n*Math.cos(s),t.size/2+n*Math.sin(s))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()}}var Dy=jy;class Gy extends Dy{constructor(t){const e=t||{};super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,displacement:void 0!==e.displacement?e.displacement:[0,0]})}clone(){const t=new Gy
 ({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t}setRadius(t){this.radius_=t,this.render()}}var zy=Gy;class By{constructor(t){const e=t||{};this.color_=void 0!==e.color?e.color:null}clone(){const t=this.getColor();return new By({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}var Uy=By,Yy="Point",Wy="LineString",Vy="LinearRing",Xy="Polygon",qy="MultiPoint",Zy="MultiLineString",Ky="MultiPolygon",Hy="GeometryCollection",Jy="Circle";class $y{constructor(t){const e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const t=this.getColor();return new
  $y({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}var Qy=$y;class tm{constructor(t){const e=t||{};this.geometry_=null,this.geometryFunction_=im,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.rende
 rer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new tm({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:
 t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=im,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let em=null;function rm(t,e){if(!em){const t=new Uy({color:"rgba(255,255,255,0.4)"}),e=new Qy({color:"#3399CC",width:1.25});em=[new tm({image:new zy({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return em}function im(t){return t.getGeometry()}var nm=tm,om="fraction",sm="pixels",am="bottom-left",lm="bottom-right",um="top-left",hm="top-right";class cm{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const r=this.cache_[e];0!=(3&t++)||r.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,r){const i=pm(t,e,r);return i in this.cache_?this.cache_[i]:null}set(t,e,r,i){const n=pm(t,e,r);this.cache_[n]=i,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.
 expire()}}function pm(t,e,r){return e+":"+t+":"+(r?function(t){return"string"==typeof t?t:Fg(t)}(r):"null")}const dm=new cm;var fm=0,gm=1,ym=2,mm=4,_m=8,vm=16;function xm(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function wm(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function bm(t,e,r){let i,n;return i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,n=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0,i*i+n*n}function Sm(t,e){return Cm(t,e[0],e[1])}function Tm(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Cm(t,e,r){return t[0]<=e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function Em(t,e){const r=t[0],i=t[1],n=t[2],o=t[3],s=e[0],a=e[1];let l=fm;return s<r?l|=vm:s>n&&(l|=mm),a<i?l|=_m:a>o&&(l|=ym),l===fm&&(l=gm),l}function Rm(t,e,r,i,n){return n?(n[0]=t,n[1]=e,n[2]=r,n[3]=i,n):[t,e,r,i]}function Pm(t){return Rm(1/0,1/0,-1/0,-1/0,t)}function Im(t,e){const r=t[0],i=t[1];return Rm(r,i,r,i,e)}function Om(t,e,r,i,n){return Am(Pm(n),t,e,r,i)}
 function Lm(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Mm(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function Fm(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Am(t,e,r,i,n){for(;r<i;r+=n)km(t,e[r],e[r+1]);return t}function km(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function Nm(t,e){let r;return r=e(jm(t)),r||(r=e(Dm(t)),r||(r=e(Ym(t)),r||(r=e(Um(t)),r||!1)))}function jm(t){return[t[0],t[1]]}function Dm(t){return[t[2],t[1]]}function Gm(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function zm(t){return t[3]-t[1]}function Bm(t,e,r){const i=r||[1/0,1/0,-1/0,-1/0];return Vm(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):Pm(i),i}function Um(t){return[t[0],t[3]]}function Ym(t){return[t[2],t[3]]}function Wm(t){return t
 [2]-t[0]}function Vm(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Xm(t,e,r,i){let n=[];if(i>1){const e=t[2]-t[0],r=t[3]-t[1];for(let o=0;o<i;++o)n.push(t[0]+e*o/i,t[1],t[2],t[1]+r*o/i,t[2]-e*o/i,t[3],t[0],t[3]-r*o/i)}else n=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(n,n,2);const o=[],s=[];for(let t=0,e=n.length;t<e;t+=2)o.push(n[t]),s.push(n[t+1]);return function(t,e,r){return Rm(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}(o,s,r)}function qm(t,e,r){const i=t;if(i.src&&jg){const t=i.decode();let n=!0;const o=function(){n=!1};return t.then((function(){n&&e()})).catch((function(t){n&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():r())})),o}const n=[ry(i,ty,e),ry(i,$g,r)];return function(){n.forEach(iy)}}let Zm=null;class Km extends Hg{constructor(t,e,r,i,n,o){super(),this.hitDetectionImage_={},this.image_=t||new Image,null!==i&&(this.image_.crossOrigin=i),this.canvas_={},this.color_=o,this.unl
 isten_=null,this.imageState_=n,this.size_=r,this.src_=e,this.tainted_}isTainted_(){if(void 0===this.tainted_&&this.imageState_===cg){Zm||(Zm=Dg(1,1)),Zm.drawImage(this.image_,0,0);try{Zm.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Zm=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(Jg)}handleImageError_(){this.imageState_=pg,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=cg,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(t){if(!this.hitDetectionImage_[t])if(this.isTainted_()){const e=this.color_?t:1,r=this.size_[0],i=this.size_[1],n=Dg(Math.ceil(r*e),Math.ceil(i*e)
 );n.scale(e,e),n.fillRect(0,0,r,i),this.hitDetectionImage_[t]=n.canvas}else this.hitDetectionImage_[t]=this.image_;return this.hitDetectionImage_[t]}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_==ug){this.imageState_=hg;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=qm(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t])return;const e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);const r=e.getContext("2d");if(r.scale(t,t),r.drawImage(this.image_,0,0),this.isTainted_()){const t=this.color_;return r.globalCompositeOperation="multiply",r.fillStyle="rgb("+t[0]+","+t[1]+","+t[2]+")",r.fillRect(0,0,e.width,e.height),r.globalCompositeOperation="destination-in",void r.drawImage(this.image_,0,0)}const i=r.getImageData(0,0,e.width,e.height),n=i.data,o=this.color_[0]
 /255,s=this.color_[1]/255,a=this.color_[2]/255;for(let t=0,e=n.length;t<e;t+=4)n[t]*=o,n[t+1]*=s,n[t+2]*=a;r.putImageData(i,0,0)}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}class Hm extends _g{constructor(t){const e=t||{},r=void 0!==e.opacity?e.opacity:1,i=void 0!==e.rotation?e.rotation:0,n=void 0!==e.scale?e.scale:1,o=void 0!==e.rotateWithView&&e.rotateWithView;super({opacity:r,rotation:i,scale:n,displacement:void 0!==e.displacement?e.displacement:[0,0],rotateWithView:o}),this.anchor_=void 0!==e.anchor?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==e.anchorOrigin?e.anchorOrigin:um,this.anchorXUnits_=void 0!==e.anchorXUnits?e.anchorXUnits:om,this.anchorYUnits_=void 0!==e.anchorYUnits?e.anchorYUnits:om,this.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null;const s=void 0!==e.img?e.img:null,a=void 0!==e.imgSize?e.imgSize:null;let l=e.src;wg(!(void 0!==l&&s),4),wg(!s||s&&a,5),void 0!==l&&0!==l.length||!s||(l=s.src||gg(s)),wg(v
 oid 0!==l&&l.length>0,6);const u=void 0!==e.src?ug:cg;this.color_=void 0!==e.color?Lg(e.color):null,this.iconImage_=function(t,e,r,i,n,o){let s=dm.get(e,i,o);return s||(s=new Km(t,e,r,i,n,o),dm.set(e,i,o,s)),s}(s,l,a,this.crossOrigin_,u,this.color_),this.offset_=void 0!==e.offset?e.offset:[0,0],this.offsetOrigin_=void 0!==e.offsetOrigin?e.offsetOrigin:um,this.origin_=null,this.size_=void 0!==e.size?e.size:null}clone(){const t=this.getScale();return new Hm({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})}getAnchor(){if(this.normalizedAnchor_)return th
 is.normalizedAnchor_;let t=this.anchor_;const e=this.getSize();if(this.anchorXUnits_==om||this.anchorYUnits_==om){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==om&&(t[0]*=e[0]),this.anchorYUnits_==om&&(t[1]*=e[1])}if(this.anchorOrigin_!=um){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=hm&&this.anchorOrigin_!=lm||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=am&&this.anchorOrigin_!=lm||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getHitDetectionImageSize(){return this.getImageSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(t){return this.iconImage_.getHitDetectionImage(t)}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;const e=
 this.getDisplacement();if(this.offsetOrigin_!=um){const e=this.getSize(),r=this.iconImage_.getSize();if(!e||!r)return null;t=t.slice(),this.offsetOrigin_!=hm&&this.offsetOrigin_!=lm||(t[0]=r[0]-e[0]-t[0]),this.offsetOrigin_!=am&&this.offsetOrigin_!=lm||(t[1]=r[1]-e[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(Jg,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Jg,t)}}var Jm=Hm,$m="point",Qm="line";class t_{constructor(t){const e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=yg(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new Uy({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:M
 ath.PI/4,this.placement_=void 0!==e.placement?e.placement:$m,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}clone(){const t=this.getScale();return new t_({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:th
 is.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){t
 his.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=yg(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}var e_=t_;function r_(t,e,r,i,n){return!Nm(n,(function(n){return!i_(t,e,r,i,n[0],n[1])}))}function i_(t,e,r,i,n,o){let s=0,a=t[r-i],l=t[r-i+1];for(;e<r;e+=i){const r=t[e],i=t[e+1];l<=o?i>o&&(r-a)*(o-l)-(n-a)*(i-l)>0&&s++:i<=o&&(r-a)*(o-l)-(n-a)*(i-l)<0&&s--,a=r,l=i}return 0!==s}function n_(t,e,r,i,n,o){if(0===r.length)return!1;if(!i_(t,e,r[0],i,n,o))return!1;for(let e=1,s=r.length;e<s;++e)if(i_(t,r[e-1],r[e],i,n,o))return!1;return!0}function o_(t,e,r,i,n,o,s){let a,l,u,h,c,p,d;const f=n[o+1],g=[];for(let n=0,o=r.length;n<o;++n){const o=r[n];for(h=t[o-i],p=t[o-i+1],a=e;a<o;a+=i)c=t[a],d=t[a+1],(f<=p&&d<=f||p<=f&&f<=d)&&(u=(f-p)/(d-p)*(
 c-h)+h,g.push(u)),h=c,p=d}let y=NaN,m=-1/0;for(g.sort(Ug),h=g[0],a=1,l=g.length;a<l;++a){c=g[a];const n=Math.abs(c-h);n>m&&(u=(h+c)/2,n_(t,e,r,i,u,f)&&(y=u,m=n)),h=c}return isNaN(y)&&(y=n[o]),s?(s.push(y,f,m),s):[y,f,m]}function s_(t,e,r,i,n){let o=[];for(let s=0,a=r.length;s<a;++s){const a=r[s];o=o_(t,e,a,i,n,2*s,o),e=a[a.length-1]}return o}const a_={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},l_={};l_[a_.DEGREES]=2*Math.PI*6370997/360,l_[a_.FEET]=.3048,l_[a_.METERS]=1,l_[a_.USFEET]=1200/3937;var u_=a_;var h_=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.mete
 rsPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||l_[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const c_=6378137*Math.PI,p_=[-c_,-c_,c_,c_],d_=[-180,-85,180,85];class f_ extends h_{constructor(t){super({code:t,units:u_.METERS,extent:p_,global:!0,worldExtent:d_,getPointResolution:function(t,e){return t/Sg(e[1]/6378137)}})}}const g_=[new f_("EPSG:3857"),new f_("EPSG:102100"),new f_("EPSG:1021
 13"),new f_("EPSG:900913"),new f_("urn:ogc:def:crs:EPSG:6.18:3:3857"),new f_("urn:ogc:def:crs:EPSG::3857"),new f_("http://www.opengis.net/gml/srs/epsg.xml#3857")];function y_(t,e,r){const i=t.length,n=r>1?r:2;let o=e;void 0===o&&(o=n>2?t.slice():new Array(i));const s=c_;for(let e=0;e<i;e+=n){o[e]=s*t[e]/180;let r=6378137*Math.log(Math.tan(Math.PI*(+t[e+1]+90)/360));r>s?r=s:r<-s&&(r=-s),o[e+1]=r}return o}function m_(t,e,r){const i=t.length,n=r>1?r:2;let o=e;void 0===o&&(o=n>2?t.slice():new Array(i));for(let e=0;e<i;e+=n)o[e]=180*t[e]/c_,o[e+1]=360*Math.atan(Math.exp(t[e+1]/6378137))/Math.PI-90;return o}const __=[-180,-90,180,90],v_=6378137*Math.PI/180;class x_ extends h_{constructor(t,e){super({code:t,units:u_.DEGREES,extent:__,axisOrientation:e,global:!0,metersPerUnit:v_,worldExtent:__})}}const w_=[new x_("CRS:84"),new x_("EPSG:4326","neu"),new x_("urn:ogc:def:crs:EPSG::4326","neu"),new x_("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new x_("urn:ogc:def:crs:OGC:1.3:CRS84"),new x_("urn:ogc
 :def:crs:OGC:2:84"),new x_("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new x_("urn:x-ogc:def:crs:EPSG:4326","neu")];let b_={};let S_={};function T_(t,e,r){const i=t.getCode(),n=e.getCode();i in S_||(S_[i]={}),S_[i][n]=r}function C_(t,e){const r=Wm(e.getExtent()),i=E_(t,e,r);return i&&(t[0]-=i*r),t}function E_(t,e,r){const i=e.getExtent();let n=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){const e=r||Wm(i);n=Math.floor((t[0]-i[0])/e)}return n}function R_(t,e,r){let i;if(void 0!==e){for(let r=0,i=t.length;r<i;++r)e[r]=t[r];i=e}else i=t.slice();return i}function P_(t,e,r){if(void 0!==e&&t!==e){for(let r=0,i=t.length;r<i;++r)e[r]=t[r];t=e}return t}function I_(t){!function(t,e){b_[t]=e}(t.getCode(),t),T_(t,t,R_)}function O_(t){return"string"==typeof t?b_[t]||null:t||null}function L_(t){!function(t){t.forEach(I_)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&T_(e,t,R_)}))}))}function M_(t,e){if(t===e)return!0;const r=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode
 ())return r;return F_(t,e)===R_&&r}function F_(t,e){let r=function(t,e){let r;return t in S_&&e in S_[t]&&(r=S_[t][e]),r}(t.getCode(),e.getCode());return r||(r=P_),r}function A_(t,e){return F_(O_(t),O_(e))}function k_(t,e,r,i){return Xm(t,A_(e,r),void 0,i)}let N_=null;function j_(){return N_}function D_(t,e){return N_?k_(t,e,N_):t}function G_(t,e){return N_?k_(t,N_,e):t}function z_(t,e,r,i,n,o,s){let a,l;const u=(r-e)/i;if(1===u)a=e;else if(2===u)a=e,l=n;else if(0!==u){let o=t[e],s=t[e+1],u=0;const h=[0];for(let n=e+i;n<r;n+=i){const e=t[n],r=t[n+1];u+=Math.sqrt((e-o)*(e-o)+(r-s)*(r-s)),h.push(u),o=e,s=r}const c=n*u,p=function(t,e,r){let i,n;const o=r||Ug;let s=0,a=t.length,l=!1;for(;s<a;)i=s+(a-s>>1),n=+o(t[i],e),n<0?s=i+1:(a=i,l=!n);return l?s:~s}(h,c);p<0?(l=(c-h[-p-2])/(h[-p-1]-h[-p-2]),a=e+(-p-2)*i):a=e+p*i}const h=s>1?s:2,c=o||new Array(h);for(let e=0;e<h;++e)c[e]=void 0===a?NaN:void 0===l?t[a+e]:Eg(t[a+e],t[a+i+e],l);return c}function B_(t,e,r,i,n,o){if(r==e)return null;let s
 ;if(n<t[e+i-1])return o?(s=t.slice(e,e+i),s[i-1]=n,s):null;if(t[r-1]<n)return o?(s=t.slice(r-i,r),s[i-1]=n,s):null;if(n==t[e+i-1])return t.slice(e,e+i);let a=e/i,l=r/i;for(;a<l;){const e=a+l>>1;n<t[(e+1)*i-1]?l=e:a=e+1}const u=t[a*i-1];if(n==u)return t.slice((a-1)*i,(a-1)*i+i);const h=(n-u)/(t[(a+1)*i-1]-u);s=[];for(let e=0;e<i-1;++e)s.push(Eg(t[(a-1)*i+e],t[a*i+e],h));return s.push(n),s}function U_(t,e,r,i){const n=[];let o=[1/0,1/0,-1/0,-1/0];for(let s=0,a=r.length;s<a;++s){const a=r[s];o=Om(t,e,a[0],i),n.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=a[a.length-1]}return n}function Y_(t,e,r,i,n,o){const s=o||[];let a=0;for(let o=e;o<r;o+=i){const e=t[o],r=t[o+1];s[a++]=n[0]*e+n[2]*r+n[4],s[a++]=n[1]*e+n[3]*r+n[5]}return o&&s.length!=a&&(s.length=a),s}function W_(t,e,r,i,n,o,s){const a=s||[],l=Math.cos(n),u=Math.sin(n),h=o[0],c=o[1];let p=0;for(let n=e;n<r;n+=i){const e=t[n]-h,r=t[n+1]-c;a[p++]=h+e*l-r*u,a[p++]=c+e*u+r*l;for(let e=n+2;e<n+i;++e)a[p++]=t[e]}return s&&a.length!=p&&(a.length=p)
 ,a}L_(g_),L_(w_),function(t,e,r,i){t.forEach((function(t){e.forEach((function(e){T_(t,e,r),T_(e,t,i)}))}))}(w_,g_,y_,m_);const V_=[1,0,0,1,0,0];class X_{constructor(t,e,r,i,n){this.extent_,this.id_=n,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=i}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_===Yy?Im(this.flatCoordinates_):Om(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Gm(this.getExtent());this.flatInteriorPoints_=o_(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=U_(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=s_(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=z_(this.flatCoordinates
 _,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const r=this.ends_;for(let i=0,n=r.length;i<n;++i){const n=r[i],o=z_(t,e,n,2,.5);Wg(this.flatMidpoints_,o),e=n}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){}getType(){return this.type_}transform(t,e){const r=(t=O_(t)).getExtent(),i=t.getWorldExtent(),n=zm(i)/zm(r);vy(V_,i[0],i[3],n,-n,0,0,0),Y_(this.flatCoordinates_,0,this.flatCoordinates_.length,2,V_,this.flatCoordinates_)}getEnds(){return this.ends_}}X_.prototype.getEndss=X_.prototype.getEnds,X_.prototype.getFlatCoordinates=X_.prototype.getOrientedFlatCoordinates;var q_=X_,Z_=r(0);function K_(t){return t*Math.PI/180}var H_=funct
 ion(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function J_(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var r=document.createElement("canvas");return r.width=t,r.height=e,r}var $_,Q_=Array(256).join(" ");function tv(t,e){if(e>=.05){for(var r="",i=t.split("\n"),n=Q_.slice(0,Math.round(e/.1)),o=0,s=i.length;o<s;++o)o>0&&(r+="\n"),r+=i[o].split("").join(n);return r}return t}function ev(){return $_||($_=J_(1,1).getContext("2d")),$_}function rv(t,e){return ev().measureText(t).width+(t.length-1)*e}var iv={};Cy&&ey(Cy,Qg,(function(){iv={}}));var nv,ov,sv=Z_.e.isFunction,av=Z_.e.convertFunction,lv=Z_.c.isExpression,uv=Z_.c.createPropertyExpression,hv={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},cv={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bot
 tom-right":[1,1]},pv={},dv={zoom:0},fv={};function gv(t,e,r,i,n){var o=t.id;fv[o]||(fv[o]={});var s=fv[o];if(!s[r]){var a=(t[e]||pv)[r],l=Z_.f[e+"_"+t.type][r];void 0===a&&(a=l.default);var u=lv(a);if(!u&&sv(a)&&(a=av(a,l),u=!0),u){var h=function(t,e){var r=uv(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}(a,l);s[r]=h.evaluate.bind(h)}else"color"==l.type&&(a=Z_.a.parse(a)),s[r]=function(){return a}}return dv.zoom=i,s[r](dv,n)}var yv={};function mv(t,e){if(t){if(0===t.a||0===e)return;var r=t.a;return e=void 0===e?1:e,"rgba("+Math.round(255*t.r/r)+","+Math.round(255*t.g/r)+","+Math.round(255*t.b/r)+","+r*e+")"}return t}var _v=/^([^]*)\{(.*)\}([^]*)$/;function vv(t,e){var r;do{if(r=t.match(_v)){var i=e[r[2]]||"";t=r[1]+i+r[3]}}while(r);return t}var xv=function(t,e,r,i,n,o,s){if(void 0===i&&(i=H_),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var a,l;if(o)i
 f("undefined"!=typeof Image){var u=new Image;u.crossOrigin="anonymous",u.onload=function(){a=u,l=[u.width,u.height],t.changed(),u.onload=null},u.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,l=[a.width,a.height])}))}for(var c,p=Object(Z_.b)(e.layers),d={},f=[],g=0,y=p.length;g<y;++g){var m=p[g],_=m.id;if("string"==typeof r&&m.source==r||-1!==r.indexOf(_)){var v=m["source-layer"];if(!c){c=m.source;var x=e.sources[c];if(!x)throw new Error('Source "'+c+'" is not defined');var w=x.type;if("vector"!==w&&"geojson"!==w)throw new Error('Source "'+c+'" is not of type "vector" or "geojson", but "'+w+'"')}var b=d[v];b||(b=d[v]=[]),b.push({layer:m,index:g}),f.push(_)}delete fv[_],delete yv[_]}var S=new Qy,T=new Uy,C={},E={},R=[],P=function(t,e){var r=t.getProperties(),o=d[r.layer];if(o){var u=i.ind
 exOf(e);-1==u&&(u=function(t,e){for(var r=0,i=e.length;r<i;++r){if(e[r]<t&&r+1<i){var n=e[r]/e[r+1];return r+Math.log(e[r]/t)/Math.log(n)}}return i-1}(e,i));for(var h=hv[t.getGeometry().getType()],c={properties:r,type:h},p=-1,f=function(i,d){var f=o[i],g=f.layer,y=g.id,m=g.layout||pv,_=g.paint||pv;if("none"===m.visibility||"minzoom"in g&&u<g.minzoom||"maxzoom"in g&&u>=g.maxzoom)return"continue";var v=g.filter;if(!v||function(t,e,r,i){return t in yv||(yv[t]=Object(Z_.d)(e).filter),dv.zoom=i,yv[t](dv,r)}(y,v,c,u)){var x=void 0,w=void 0,b=void 0,P=void 0,I=void 0,O=void 0,L=f.index;if(3==h&&"fill"==g.type)if(w=gv(g,"paint","fill-opacity",u,c),"fill-pattern"in _){var M=gv(g,"paint","fill-pattern",u,c);if(M){var F="string"==typeof M?vv(M,r):M.toString();if(a&&n&&n[F]){++p,(O=R[p])&&O.getFill()&&!O.getStroke()&&!O.getText()||(O=R[p]=new nm({fill:new Uy})),b=O.getFill(),O.setZIndex(L);var A=E[lt=F+"."+w];if(!A)(ct=(ht=J_((ut=n[F]).width,ut.height)).getContext("2d")).globalAlpha=w,ct.drawIm
 age(a,ut.x,ut.y,ut.width,ut.height,0,0,ut.width,ut.height),A=ct.createPattern(ht,"repeat"),E[lt]=A;b.setColor(A)}}}else(x=mv(gv(g,"paint","fill-color",u,c),w))&&("fill-outline-color"in _&&(I=mv(gv(g,"paint","fill-outline-color",u,c),w)),I||(I=x),++p,(O=R[p])&&O.getFill()&&O.getStroke()&&!O.getText()||(O=R[p]=new nm({fill:new Uy,stroke:new Qy})),(b=O.getFill()).setColor(x),(P=O.getStroke()).setColor(I),P.setWidth(1),O.setZIndex(L));if(1!=h&&"line"==g.type){x=!("line-pattern"in _)&&"line-color"in _?mv(gv(g,"paint","line-color",u,c),gv(g,"paint","line-opacity",u,c)):void 0;var k=gv(g,"paint","line-width",u,c);x&&k>0&&(++p,(O=R[p])&&O.getStroke()&&!O.getFill()&&!O.getText()||(O=R[p]=new nm({stroke:new Qy})),(P=O.getStroke()).setLineCap(gv(g,"layout","line-cap",u,c)),P.setLineJoin(gv(g,"layout","line-join",u,c)),P.setMiterLimit(gv(g,"layout","line-miter-limit",u,c)),P.setColor(x),P.setWidth(k),P.setLineDash(_["line-dasharray"]?gv(g,"paint","line-dasharray",u,c).map((function(t){return t*
 k})):null),O.setZIndex(L))}var N=!1,j=null,D=0,G=void 0,z=void 0,B=void 0;if((1==h||2==h)&&"icon-image"in m){var U=gv(g,"layout","icon-image",u,c);if(U){G="string"==typeof U?vv(U,r):U.toString();var Y=void 0;if(a&&n&&n[G]){var W=gv(g,"layout","icon-rotation-alignment",u,c);if(2==h){var V=t.getGeometry();if(V.getFlatMidpoint||V.getFlatMidpoints){var X=V.getExtent();if(Math.sqrt(Math.max(Math.pow((X[2]-X[0])/e,2),Math.pow((X[3]-X[1])/e,2)))>150){var q="MultiLineString"===V.getType()?V.getFlatMidpoints():V.getFlatMidpoint();if(ov||(ov=new q_("Point",nv=[NaN,NaN],[],{},null)),Y=ov,nv[0]=q[0],nv[1]=q[1],"line"===(Lt=gv(g,"layout","symbol-placement",u,c))&&"map"===W)for(var Z=V.getStride(),K=V.getFlatCoordinates(),H=0,J=K.length-Z;H<J;H+=Z){var $=K[H],Q=K[H+1],tt=K[H+Z],et=K[H+Z+1],rt=Math.min($,tt),it=Math.min(Q,et),nt=Math.max($,tt),ot=Math.max(Q,et);if(q[0]>=rt&&q[0]<=nt&&q[1]>=it&&q[1]<=ot){D=Math.atan2(Q-et,tt-$);break}}}}}if(2!==h||Y){++p,(O=R[p])&&O.getImage()&&!O.getFill()&&!O.get
 Stroke()||(O=R[p]=new nm),O.setGeometry(Y);var st=gv(g,"layout","icon-size",u,c),at=void 0!==_["icon-color"]?gv(g,"paint","icon-color",u,c):null,lt=G+"."+st;if(null!==at&&(lt+="."+at),!(z=C[lt])){var ut=n[G];if(null!==at){var ht,ct;(ct=(ht=J_(ut.width,ut.height)).getContext("2d")).drawImage(a,ut.x,ut.y,ut.width,ut.height,0,0,ut.width,ut.height);for(var pt=ct.getImageData(0,0,ht.width,ht.height),dt=0,ft=pt.data.length;dt<ft;dt+=4){var gt=at.a;0!==gt&&(pt.data[dt]=255*at.r/gt,pt.data[dt+1]=255*at.g/gt,pt.data[dt+2]=255*at.b/gt),pt.data[dt+3]=gt}ct.putImageData(pt,0,0),z=C[lt]=new Jm({img:ht,imgSize:[ht.width,ht.height],scale:st/ut.pixelRatio})}else z=C[lt]=new Jm({img:a,imgSize:l,size:[ut.width,ut.height],offset:[ut.x,ut.y],rotateWithView:"map"===W,scale:st/ut.pixelRatio})}z.setRotation(D+K_(gv(g,"layout","icon-rotate",u,c))),z.setOpacity(gv(g,"paint","icon-opacity",u,c)),z.setAnchor(cv[gv(g,"layout","icon-anchor",u,c)]),O.setImage(z),j=O.getText(),O.setText(void 0),O.setZIndex(L),N=!
 0,B=!1}else B=!0}}}if(1==h&&"circle-radius"in _){++p,(O=R[p])&&O.getImage()&&!O.getFill()&&!O.getStroke()||(O=R[p]=new nm);var yt=gv(g,"paint","circle-radius",u,c),mt=mv(gv(g,"paint","circle-stroke-color",u,c),gv(g,"paint","circle-stroke-opacity",u,c)),_t=mv(gv(g,"paint","circle-color",u,c),gv(g,"paint","circle-opacity",u,c)),vt=gv(g,"paint","circle-stroke-width",u,c),xt=yt+"."+mt+"."+_t+"."+vt;(z=C[xt])||(z=C[xt]=new zy({radius:yt,stroke:mt&&vt>0?new Qy({width:vt,color:mt}):void 0,fill:_t?new Uy({color:_t}):void 0})),O.setImage(z),j=O.getText(),O.setText(void 0),O.setGeometry(void 0),O.setZIndex(L),N=!0}var wt=void 0;if("text-field"in m)wt=vv(gv(g,"layout","text-field",u,c).toString(),r).trim(),w=gv(g,"paint","text-opacity",u,c);if(wt&&w&&!B){N||(++p,(O=R[p])&&O.getText()&&!O.getFill()&&!O.getStroke()||(O=R[p]=new nm),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(j||new e_({padding:[2,2,2,2]})),j=O.getText();var bt=Math.round(gv(g,"layout","text-size",u,c)),St=gv
 (g,"layout","text-font",u,c),Tt=gv(g,"layout","text-line-height",u,c),Ct=lg()(s?s(St):St,bt,Tt),Et=m["text-transform"];"uppercase"==Et?wt=wt.toUpperCase():"lowercase"==Et&&(wt=wt.toLowerCase());var Rt=gv(g,"layout","text-max-width",u,c),Pt=gv(g,"layout","text-letter-spacing",u,c),It=2==h?tv(wt,Pt):function t(e,r,i,n){if(-1!==e.indexOf("\n")){for(var o=e.split("\n"),s=[],a=0,l=o.length;a<l;++a)s.push(t(o[a],r,i,n));return s.join("\n")}var u=i+","+r+","+e+","+n,h=iv[u];if(!h){var c=e.split(" ");if(c.length>1){var p=ev();p.font=r;var d=p.measureText("M").width*i,f="";for(s=[],a=0,l=c.length;a<l;++a){var g=c[a],y=f+(f?" ":"")+g;rv(y,n)<=d?f=y:(f&&s.push(f),f=g)}f&&s.push(f);for(a=0;a<s.length;++a){var m=s[a];if(rv(m,n)<.35*d){var _=a>0?rv(s[a-1],n):1/0,v=a<s.length-1?rv(s[a+1],n):1/0;s.splice(a,1),_<v?(s[a-1]+=" "+m,a-=1):s[a]=m+" "+s[a]}}for(a=0,l=s.length-1;a<l;++a){var x=s[a],w=s[a+1];if(rv(x,n)>.7*d&&rv(w,n)<.6*d){var b=x.split(" "),S=b.pop();rv(S,n)<.2*d&&(s[a]=b.join(" "),s[a+1]=S
 +" "+w),l-=1}}h=s.join("\n")}else h=e;h=tv(h,n),iv[u]=h}return h}(wt,Ct,Rt,Pt);j.setText(It),j.setFont(Ct),j.setRotation(K_(gv(g,"layout","text-rotate",u,c)));var Ot=gv(g,"layout","text-anchor",u,c),Lt=N||1==h?"point":gv(g,"layout","symbol-placement",u,c);j.setPlacement(Lt);var Mt=gv(g,"paint","text-halo-width",u,c),Ft=gv(g,"layout","text-offset",u,c),At=gv(g,"paint","text-translate",u,c),kt=0,Nt=0;if("point"==Lt){var jt="center";-1!==Ot.indexOf("left")?(jt="left",Nt=Mt):-1!==Ot.indexOf("right")&&(jt="right",Nt=-Mt),j.setTextAlign(jt);var Dt=gv(g,"layout","text-rotation-alignment",u,c);j.setRotateWithView("map"==Dt)}else j.setMaxAngle(K_(gv(g,"layout","text-max-angle",u,c))*wt.length/It.length),j.setTextAlign(),j.setRotateWithView(!1);var Gt="middle";0==Ot.indexOf("bottom")?(Gt="bottom",kt=-Mt-.5*(Tt-1)*bt):0==Ot.indexOf("top")&&(Gt="top",kt=Mt+.5*(Tt-1)*bt),j.setTextBaseline(Gt),j.setOffsetX(Ft[0]*bt+Nt+At[0]),j.setOffsetY(Ft[1]*bt+kt+At[1]),T.setColor(mv(gv(g,"paint","text-color",
 u,c),w)),j.setFill(T);var zt=mv(gv(g,"paint","text-halo-color",u,c),w);if(zt){S.setColor(zt),Mt*=2;var Bt=.5*bt;S.setWidth(Mt<=Bt?Mt:Bt),j.setStroke(S)}else j.setStroke(void 0);var Ut=gv(g,"layout","text-padding",u,c),Yt=j.getPadding();Ut!==Yt[0]&&(Yt[0]=Yt[1]=Yt[2]=Yt[3]=Ut),O.setZIndex(L)}}},g=0,y=o.length;g<y;++g)f(g);return p>-1?(R.length=p+1,R):void 0}};return t.setStyle(P),t.set("mapbox-source",c),t.set("mapbox-layers",f),P},wv=r(6),bv=r.n(wv);class Sv{constructor(t,e,r,i){this.minX=t,this.maxX=e,this.minY=r,this.maxY=i}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.m
 axY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}var Tv=Sv;var Cv="opacity",Ev="visible",Rv="extent",Pv="zIndex",Iv="maxResolution",Ov="minResolution",Lv="maxZoom",Mv="minZoom",Fv="source";var Av=class extends uy{constructor(t){super();const e=qg({},t);e[Cv]=void 0!==t.opacity?t.opacity:1,wg("number"==typeof e[Cv],64),e[Ev]=void 0===t.visible||t.visible,e[Pv]=t.zIndex,e[Iv]=void 0!==t.maxResolution?t.maxResolution:1/0,e[Ov]=void 0!==t.minResolution?t.minResolution:0,e[Mv]=void 0!==t.minZoom?t.minZoom:-1/0,e[Lv]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?t.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},r=this.getZIndex();return 
 e.opacity=bg(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==r?r:!1===e.managed?1/0:0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return dg()}getLayerStatesArray(t){return dg()}getExtent(){return this.get(Rv)}getMaxResolution(){return this.get(Iv)}getMinResolution(){return this.get(Ov)}getMinZoom(){return this.get(Mv)}getMaxZoom(){return this.get(Lv)}getOpacity(){return this.get(Cv)}getSourceState(){return dg()}getVisible(){return this.get(Ev)}getZIndex(){return this.get(Pv)}setExtent(t){this.set(Rv,t)}setMaxResolution(t){this.set(Iv,t)}setMinResolution(t){this.set(Ov,t)}setMaxZoom(t){this.set(Lv,t)}setMinZoom(t){this.set(Mv,t)}setOpacity(t){wg("number"==typeof t,64),this.set(Cv,t)}setVisible(t){this.set(Ev,t)}setZIndex(t){this.set(Pv,t)}disposeI
 nternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},kv="prerender",Nv="postrender",jv="precompose",Dv="undefined",Gv="ready";var zv=class extends Av{constructor(t){const e=qg({},t);delete e.source,super(e),this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addEventListener(ly(Fv),this.handleSourcePropertyChange_);const r=t.source?t.source:null;this.setSource(r)}getLayersArray(t){const e=t||[];return e.push(this),e}getLayerStatesArray(t){const e=t||[];return e.push(this.getLayerState()),e}getSource(){return this.get(Fv)||null}getSourceState(){const t=this.getSource();return t?t.getState():Dv}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(iy(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=ey(t,Jg,this.handleSourceChange_,this)),this.changed
 ()}getFeatures(t){return this.renderer_.getFeatures(t)}render(t,e){const r=this.getRenderer();if(r.prepareFrame(t))return r.renderFrame(t,e)}setMap(t){this.mapPrecomposeKey_&&(iy(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(iy(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ey(t,jv,(function(t){const e=t.frameState.layerStatesArray,r=this.getLayerState(!1);wg(!e.some((function(t){return t.layer===r.layer})),67),e.push(r)}),this),this.mapRenderKey_=ey(this,Jg,t.render,t),this.changed())}setSource(t){this.set(Fv,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.setSource(null),super.disposeInternal()}};var Bv=class{drawCustom(t,e,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoi
 nt(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}};const Uv=[1,0,0,1,0,0];var Yv=class extends uy{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=function(t){let e,r,i,n=!1;return function(){const o=Array.prototype.slice.call(arguments);return n&&this===i&&Vg(o,r)||(n=!0,i=this,r=o,e=t.apply(this,arguments)),e}}((function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);const i=this.clone();return i.applyTransform(r),i.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return dg()}closestPointXY(t,e,r,i){return dg()}containsXY(t,e){const r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e}getClosestPoint(t,e){const r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r
 ,1/0),r}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return dg()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Pm(t),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)}rotate(t,e){dg()}scale(t,e,r){dg()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return dg()}getType(){return dg()}applyTransform(t){dg()}intersectsExtent(t){return dg()}translate(t,e){dg()}transform(t,e){const r=O_(t),i=r.getUnits()==u_.TILE_PIXELS?function(t,i,n){const o=r.getExtent(),s=r.getWorldExtent(),a=zm(s)/zm(o);return vy(Uv,s[0],s[3],a,-a,0,0,0),Y_(t,0,t.length,n,Uv,i),A_(r,e)(t,i,n)}:A_(r,e);return this.applyTransform(i),this}},Wv="XY",Vv="XYZ",Xv="XYM",qv="XYZM";function Zv(t){let e;return t==Wv?e=2:t==Vv||t==Xv?e=3:t==qv&&(e=4),e}var Kv=class extends Yv{constructor(){super(),this.layout
 =Wv,this.stride=2,this.flatCoordinates=null}computeExtent(t){return Om(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return dg()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=Zv(t),
 this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){dg()}setLayout(t,e,r){let i;if(t)i=Zv(t);else{for(let t=0;t<r;++t){if(0===e.length)return this.layout=Wv,void(this.stride=2);e=e[0]}i=e.length,t=function(t){let e;2==t?e=Wv:3==t?e=Vv:4==t&&(e=qv);return(e)}(i)}this.layout=t,this.stride=i}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const r=this.getFlatCoordinates();if(r){const i=this.getStride();W_(r,0,r.length,i,t,e,r),this.changed()}}scale(t,e,r){let i=e;void 0===i&&(i=t);let n=r;n||(n=Gm(this.getExtent()));const o=this.getFlatCoordinates();if(o){const e=this.getStride();!function(t,e,r,i,n,o,s,a){const l=a||[],u=s[0],h=s[1];let c=0;for(let s=e;s<r;s+=i){const e=t[s]-u,r=t[s+1]-h;l[c++]=u+n*e,l[c++]=h+o*r;for(let e=s+2;e<s+i;++e)l[c++]=t[e]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,e,t,i,n,o),this.changed()}}translate(t,e){const r=this.getFlatCoordinates();if(r){const i=this.getStride();!functi
 on(t,e,r,i,n,o,s){const a=s||[];let l=0;for(let s=e;s<r;s+=i){a[l++]=t[s]+n,a[l++]=t[s+1]+o;for(let e=s+2;e<s+i;++e)a[l++]=t[e]}s&&a.length!=l&&(a.length=l)}(r,0,r.length,i,t,e,r),this.changed()}}};var Hv=class extends Bv{constructor(t,e,r,i,n,o,s){super(),this.context_=t,this.pixelRatio_=e,this.extent_=r,this.transform_=i,this.viewRotation_=n,this.squaredTolerance_=o,this.userTransform_=s,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTr
 ansform_=[1,0,0,1,0,0]}drawImages_(t,e,r,i){if(!this.image_)return;const n=Y_(t,e,r,2,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(let t=0,e=n.length;t<e;t+=2){const e=n[t]-this.imageAnchorX_,r=n[t+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const t=e+this.imageAnchorX_,i=r+this.imageAnchorY_;vy(s,t,i,1,1,l,-t,-i),o.setTransform.apply(o,s),o.translate(t,i),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,e,r,this.imageWidth_,this.imageHeight_)}1!=this.imageOpa
 city_&&(o.globalAlpha=a)}drawText_(t,e,r,i){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const n=Y_(t,e,r,i,this.transform_,this.pixelCoordinates_),o=this.context_;let s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<r;e+=i){const t=n[e]+this.textOffsetX_,r=n[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){const e=vy(this.tmpLocalTransform_,t,r,1,1,s,-t,-r);o.setTransform.apply(o,e),o.translate(t,r),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,t,r),this.textFillState_&&o.fillText(this.text_,t,r)}}moveToLineTo_(t,e,r,i,n){const o=this.context_,s=Y_(t,e,r,i,this.trans
 form_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);let a=s.length;n&&(a-=2);for(let t=2;t<a;t+=2)o.lineTo(s[t],s[t+1]);return n&&o.closePath(),r}drawRings_(t,e,r,i){for(let n=0,o=r.length;n<o;++n)e=this.moveToLineTo_(t,e,r[n],i,!0);return e}drawCircle(t){if(Vm(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=function(t,e,r){const i=t.getFlatCoordinates();if(i){const n=t.getStride();return Y_(i,0,i.length,n,e,r)}return null}(t,this.transform_,this.pixelCoordinates_),r=e[2]-e[0],i=e[3]-e[1],n=Math.sqrt(r*r+i*i),o=this.context_;o.beginPath(),o.arc(e[0],e[1],n,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=
 t}drawGeometry(t){switch(t.getType()){case Yy:this.drawPoint(t);break;case Wy:this.drawLineString(t);break;case Xy:this.drawPolygon(t);break;case qy:this.drawMultiPoint(t);break;case Zy:this.drawMultiLineString(t);break;case Ky:this.drawMultiPolygon(t);break;case Hy:this.drawGeometryCollection(t);break;case Jy:this.drawCircle(t)}}drawFeature(t,e){const r=e.getGeometryFunction()(t);r&&Vm(this.extent_,r.getExtent())&&(this.setStyle(e),this.drawGeometry(r))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let t=0,r=e.length;t<r;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.d
 rawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vm(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,r=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(r,0,r.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(Vm(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,r=t.getFlatCoordinates();let i=0;const n=t.getEnds(),o=t.getStride();e.beginPath();for(let t=0,e=n.length;t<e;++t)i=this.moveToLineTo_(r,i,n[t],o,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t)
 {if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vm(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vm(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,r=t.getOrientedFlatCoordinates();let i=0;const n=t.getEndss(),o=t.getStride();e.beginPath();for(let t=0,e=n.length;t<e;
 ++t){const e=n[t];i=this.drawRings_(r,i,e,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,r=this.contextFillState_;r?r.fillStyle!=t.fillStyle&&(r.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,r=this.contextStrokeState_;r?(r.lineCap!=t.lineCap&&(r.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(Vg(r.lineDash,t.lineDash)||e.setLineDash(r.lineDash=t.lineDash),r.lineDashOffset!=t.lineDashOffset&&(r.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),r.lineJoin!=t.lineJoin&&(r.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),r.lineWidth!=t.lineWidth&&(r.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),r.miterLimit!=t.miterLimit&&(r.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),r.strokeStyle!=t.strokeStyle&&
 (r.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,r=this.contextTextState_,i=t.textAlign?t.textAlign:"center";r?(r.font!=t.font&&(r.font=t.font,e.font=t.font),r.textAlign!=i&&(r.textAlign=i,e.textAlign=i),r.textBaseline!=t.textBaseline&&(r.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:Ag(e||"#000")}}else this.fillState_=nul
 l;if(e){const t=e.getColor(),r=e.getLineCap(),i=e.getLineDash(),n=e.getLineDashOffset(),o=e.getLineJoin(),s=e.getWidth(),a=e.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:"round",lineDash:i||by,lineDashOffset:n||0,lineJoin:void 0!==o?o:"round",lineWidth:this.pixelRatio_*(void 0!==s?s:1),miterLimit:void 0!==a?a:10,strokeStyle:Ag(t||"#000")}}else this.strokeState_=null}setImageStyle(t){if(t){const e=t.getSize();if(e){const r=t.getAnchor(),i=t.getImage(1),n=t.getOrigin(),o=t.getScaleArray();this.imageAnchorX_=r[0],this.imageAnchorY_=r[1],this.imageHeight_=e[1],this.image_=i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=[this.pixelRatio_*o[0],this.pixelRatio_*o[1]],this.imageWidth_=e[0]}else this.image_=null}else this.image_=null}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:Ag(t||"#000")}
 }else this.textFillState_=null;const r=t.getStroke();if(r){const t=r.getColor(),e=r.getLineCap(),i=r.getLineDash(),n=r.getLineDashOffset(),o=r.getLineJoin(),s=r.getWidth(),a=r.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:"round",lineDash:i||by,lineDashOffset:n||0,lineJoin:void 0!==o?o:"round",lineWidth:void 0!==s?s:1,miterLimit:void 0!==a?a:10,strokeStyle:Ag(t||"#000")}}else this.textStrokeState_=null;const i=t.getFont(),n=t.getOffsetX(),o=t.getOffsetY(),s=t.getRotateWithView(),a=t.getRotation(),l=t.getScaleArray(),u=t.getText(),h=t.getTextAlign(),c=t.getTextBaseline();this.textState_={font:void 0!==i?i:"10px sans-serif",textAlign:void 0!==h?h:"center",textBaseline:void 0!==c?c:"middle"},this.text_=void 0!==u?u:"",this.textOffsetX_=void 0!==n?this.pixelRatio_*n:0,this.textOffsetY_=void 0!==o?this.pixelRatio_*o:0,this.textRotateWithView_=void 0!==s&&s,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}},Jv
 ="Circle",$v="Default",Qv="Image",tx="LineString",ex="Polygon",rx="Text";const ix={Point:function(t,e,r,i){const n=r.getImage();if(n){if(n.getImageState()!=cg)return;const o=t.getBuilder(r.getZIndex(),Qv);o.setImageStyle(n,t.addDeclutter(!1)),o.drawPoint(e,i)}const o=r.getText();if(o){const s=t.getBuilder(r.getZIndex(),rx);s.setTextStyle(o,t.addDeclutter(!!n)),s.drawText(e,i)}},LineString:function(t,e,r,i){const n=r.getStroke();if(n){const o=t.getBuilder(r.getZIndex(),tx);o.setFillStrokeStyle(null,n),o.drawLineString(e,i)}const o=r.getText();if(o){const n=t.getBuilder(r.getZIndex(),rx);n.setTextStyle(o,t.addDeclutter(!1)),n.drawText(e,i)}},Polygon:function(t,e,r,i){const n=r.getFill(),o=r.getStroke();if(n||o){const s=t.getBuilder(r.getZIndex(),ex);s.setFillStrokeStyle(n,o),s.drawPolygon(e,i)}const s=r.getText();if(s){const n=t.getBuilder(r.getZIndex(),rx);n.setTextStyle(s,t.addDeclutter(!1)),n.drawText(e,i)}},MultiPoint:function(t,e,r,i){const n=r.getImage();if(n){if(n.getImageState
 ()!=cg)return;const o=t.getBuilder(r.getZIndex(),Qv);o.setImageStyle(n,t.addDeclutter(!1)),o.drawMultiPoint(e,i)}const o=r.getText();if(o){const s=t.getBuilder(r.getZIndex(),rx);s.setTextStyle(o,t.addDeclutter(!!n)),s.drawText(e,i)}},MultiLineString:function(t,e,r,i){const n=r.getStroke();if(n){const o=t.getBuilder(r.getZIndex(),tx);o.setFillStrokeStyle(null,n),o.drawMultiLineString(e,i)}const o=r.getText();if(o){const n=t.getBuilder(r.getZIndex(),rx);n.setTextStyle(o,t.addDeclutter(!1)),n.drawText(e,i)}},MultiPolygon:function(t,e,r,i){const n=r.getFill(),o=r.getStroke();if(o||n){const s=t.getBuilder(r.getZIndex(),ex);s.setFillStrokeStyle(n,o),s.drawMultiPolygon(e,i)}const s=r.getText();if(s){const n=t.getBuilder(r.getZIndex(),rx);n.setTextStyle(s,t.addDeclutter(!1)),n.drawText(e,i)}},GeometryCollection:function(t,e,r,i){const n=e.getGeometriesArray();let o,s;for(o=0,s=n.length;o<s;++o){(0,ix[n[o].getType()])(t,n[o],r,i)}},Circle:function(t,e,r,i){const n=r.getFill(),o=r.getStroke()
 ;if(n||o){const s=t.getBuilder(r.getZIndex(),Jv);s.setFillStrokeStyle(n,o),s.drawCircle(e,i)}const s=r.getText();if(s){const n=t.getBuilder(r.getZIndex(),rx);n.setTextStyle(s,t.addDeclutter(!1)),n.drawText(e,i)}}};function nx(t,e){return parseInt(gg(t),10)-parseInt(gg(e),10)}function ox(t,e){const r=sx(t,e);return r*r}function sx(t,e){return.5*t/e}function ax(t,e,r,i,n,o){let s=!1;const a=r.getImage();if(a){let t=a.getImageState();t==cg||t==pg?a.unlistenImageChange(n):(t==ug&&a.load(),t=a.getImageState(),a.listenImageChange(n),s=!0)}return function(t,e,r,i,n){const o=r.getGeometryFunction()(e);if(!o)return;const s=o.simplifyTransformed(i,n);if(r.getRenderer())!function t(e,r,i,n){if(r.getType()==Hy){const o=r.getGeometries();for(let r=0,s=o.length;r<s;++r)t(e,o[r],i,n);return}e.getBuilder(i.getZIndex(),$v).drawCustom(r,n,i.getRenderer())}(t,s,r,e);else{(0,ix[s.getType()])(t,s,r,e)}}(t,e,r,i,o),s}var lx=class extends Gg{constructor(t,e,r,i){super(t),this.inversePixelTransform=e,this.
 frameState=r,this.context=i}};var ux=0,hx=2,cx=3,px=4;var dx=0,fx=1;function gx(t,e,r,i,n,o,s){const a=t[e],l=t[e+1],u=t[r]-a,h=t[r+1]-l;let c;if(0===u&&0===h)c=e;else{const p=((n-a)*u+(o-l)*h)/(u*u+h*h);if(p>1)c=r;else{if(p>0){for(let n=0;n<i;++n)s[n]=Eg(t[e+n],t[r+n],p);return void(s.length=i)}c=e}}for(let e=0;e<i;++e)s[e]=t[c+e];s.length=i}function yx(t,e,r,i,n){let o=t[e],s=t[e+1];for(e+=i;e<r;e+=i){const r=t[e],i=t[e+1],a=Cg(o,s,r,i);a>n&&(n=a),o=r,s=i}return n}function mx(t,e,r,i,n){for(let o=0,s=r.length;o<s;++o){const s=r[o];n=yx(t,e,s,i,n),e=s}return n}function _x(t,e,r,i,n,o,s,a,l,u,h){if(e==r)return u;let c,p;if(0===n){if(p=Cg(s,a,t[e],t[e+1]),p<u){for(c=0;c<i;++c)l[c]=t[e+c];return l.length=i,p}return u}const d=h||[NaN,NaN];let f=e+i;for(;f<r;)if(gx(t,f-i,f,i,s,a,d),p=Cg(s,a,d[0],d[1]),p<u){for(u=p,c=0;c<i;++c)l[c]=d[c];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(p)-Math.sqrt(u))/n|0,1);if(o&&(gx(t,r-i,e,i,s,a,d),p=Cg(s,a,d[0],d[1]),p<u)){for(u=p,c=0;c<i;++c)l[c]=d[c];
 l.length=i}return u}function vx(t,e,r,i,n,o,s,a,l,u,h){const c=h||[NaN,NaN];for(let h=0,p=r.length;h<p;++h){const p=r[h];u=_x(t,e,p,i,n,o,s,a,l,u,c),e=p}return u}function xx(t,e,r,i){for(let n=0,o=r.length;n<o;++n){const o=r[n];for(let r=0;r<i;++r)t[e++]=o[r]}return e}function wx(t,e,r,i,n){const o=n||[];let s=0;for(let n=0,a=r.length;n<a;++n){const a=xx(t,e,r[n],i);o[s++]=a,e=a}return o.length=s,o}function bx(t,e,r,i,n,o,s){const a=(r-e)/i;if(a<3){for(;e<r;e+=i)o[s++]=t[e],o[s++]=t[e+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const u=[e,r-i];let h=0;for(;u.length>0;){const r=u.pop(),o=u.pop();let s=0;const a=t[o],c=t[o+1],p=t[r],d=t[r+1];for(let e=o+i;e<r;e+=i){const r=Tg(t[e],t[e+1],a,c,p,d);r>s&&(h=e,s=r)}s>n&&(l[(h-e)/i]=1,o+i<h&&u.push(o,h),h+i<r&&u.push(h,r))}for(let r=0;r<a;++r)l[r]&&(o[s++]=t[e+r*i],o[s++]=t[e+r*i+1]);return s}function Sx(t,e,r,i,n,o,s,a){for(let l=0,u=r.length;l<u;++l){const u=r[l];s=bx(t,e,u,i,n,o,s),a.push(s),e=u}return s}function Tx(t,e){return e*M
 ath.round(t/e)}function Cx(t,e,r,i,n,o,s){if(e==r)return s;let a,l,u=Tx(t[e],n),h=Tx(t[e+1],n);e+=i,o[s++]=u,o[s++]=h;do{if(a=Tx(t[e],n),l=Tx(t[e+1],n),(e+=i)==r)return o[s++]=a,o[s++]=l,s}while(a==u&&l==h);for(;e<r;){const r=Tx(t[e],n),c=Tx(t[e+1],n);if(e+=i,r==a&&c==l)continue;const p=a-u,d=l-h,f=r-u,g=c-h;p*g==d*f&&(p<0&&f<p||p==f||p>0&&f>p)&&(d<0&&g<d||d==g||d>0&&g>d)?(a=r,l=c):(o[s++]=a,o[s++]=l,u=a,h=l,a=r,l=c)}return o[s++]=a,o[s++]=l,s}function Ex(t,e,r,i,n,o,s,a){for(let l=0,u=r.length;l<u;++l){const u=r[l];s=Cx(t,e,u,i,n,o,s),a.push(s),e=u}return s}function Rx(t,e,r,i,n){const o=void 0!==n?n:[];let s=0;for(let n=e;n<r;n+=i)o[s++]=t.slice(n,n+i);return o.length=s,o}function Px(t,e,r,i,n){const o=void 0!==n?n:[];let s=0;for(let n=0,a=r.length;n<a;++n){const a=r[n];o[s++]=Rx(t,e,a,i,o[s]),e=a}return o.length=s,o}function Ix(t,e,r,i,n){const o=void 0!==n?n:[];let s=0;for(let n=0,a=r.length;n<a;++n){const a=r[n];o[s++]=Px(t,e,a,i,o[s]),e=a[a.length-1]}return o.length=s,o}functi
 on Ox(t,e,r,i){let n=0,o=t[r-i],s=t[r-i+1];for(;e<r;e+=i){const r=t[e],i=t[e+1];n+=s*r-o*i,o=r,s=i}return n/2}function Lx(t,e,r,i){let n=0;for(let o=0,s=r.length;o<s;++o){const s=r[o];n+=Ox(t,e,s,i),e=s}return n}class Mx extends Kv{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new Mx(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,r,i){return i<bm(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(yx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),_x(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,r,i))}getArea(){return Ox(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Rx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){
 const e=[];return e.length=bx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Mx(e,Wv)}getType(){return Vy}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=xx(this.flatCoordinates,0,t,this.stride),this.changed()}}var Fx=Mx;class Ax extends Kv{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){return new Ax(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,r,i){const n=this.flatCoordinates,o=Cg(t,e,n[0],n[1]);if(o<i){const t=this.stride;for(let e=0;e<t;++e)r[e]=n[e];return r.length=t,o}return i}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return Im(this.flatCoordinates,t)}getType(){return Yy}intersectsExtent(t){return Cm(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(
 t,e,r,i){for(let i=0,n=r.length;i<n;++i)t[e++]=r[i];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}var kx=Ax;function Nx(t,e,r,i,n){const o=[t[e],t[e+1]],s=[];let a;for(;e+i<r;e+=i){if(s[0]=t[e+i],s[1]=t[e+i+1],a=n(o,s),a)return a;o[0]=s[0],o[1]=s[1]}return!1}function jx(t,e,r,i,n){const o=Am([1/0,1/0,-1/0,-1/0],t,e,r,i);return!!Vm(n,o)&&(!!Tm(n,o)||(o[0]>=n[0]&&o[2]<=n[2]||(o[1]>=n[1]&&o[3]<=n[3]||Nx(t,e,r,i,(function(t,e){return function(t,e,r){let i=!1;const n=Em(t,e),o=Em(t,r);if(n===gm||o===gm)i=!0;else{const s=t[0],a=t[1],l=t[2],u=t[3],h=e[0],c=e[1],p=r[0],d=r[1],f=(d-c)/(p-h);let g,y;o&ym&&!(n&ym)&&(g=p-(d-u)/f,i=g>=s&&g<=l),i||!(o&mm)||n&mm||(y=d-(p-l)*f,i=y>=a&&y<=u),i||!(o&_m)||n&_m||(g=p-(d-a)/f,i=g>=s&&g<=l),i||!(o&vm)||n&vm||(y=d-(p-s)*f,i=y>=a&&y<=u)}return i}(n,t,e)})))))}function Dx(t,e,r,i,n){if(!function(t,e,r,i,n){return!!jx(t,e,r,i,n)||(!!i_(t,e,r,i,n[0],n[1])||(!!i_(t,e,r,i,n[0],n[3])||(!!i_(t,e,r,i,n[2],n[1])||!!i_(t,e,r,i,n[2],n[3]))))}(t,e,r[
 0],i,n))return!1;if(1===r.length)return!0;for(let e=1,o=r.length;e<o;++e)if(r_(t,r[e-1],r[e],i,n)&&!jx(t,r[e-1],r[e],i,n))return!1;return!0}function Gx(t,e,r,i){for(;e<r-i;){for(let n=0;n<i;++n){const o=t[e+n];t[e+n]=t[r-i+n],t[r-i+n]=o}e+=i,r-=i}}function zx(t,e,r,i){let n=!0;for(let o=0;o<i;++o)if(t[e+o]!==t[r-i+o]){n=!1;break}n&&(r-=i);const o=function(t,e,r,i){let n=-1,o=1/0,s=1/0;for(let a=e;a<r;a+=i){const e=t[a],r=t[a+1];r>o||(r==o&&e>=s||(n=a,o=r,s=e))}return n}(t,e,r,i);let s=o-i;s<e&&(s=r-i);let a=o+i;a>=r&&(a=e);const l=t[s],u=t[s+1],h=t[o],c=t[o+1],p=t[a],d=t[a+1];return h*d+l*c+u*p-(u*h+c*p+l*d)<0}function Bx(t,e,r,i,n){const o=void 0!==n&&n;for(let n=0,s=r.length;n<s;++n){const s=r[n],a=zx(t,e,s,i);if(0===n){if(o&&a||!o&&!a)return!1}else if(o&&!a||!o&&a)return!1;e=s}return!0}function Ux(t,e,r,i,n){const o=void 0!==n&&n;for(let n=0,s=r.length;n<s;++n){const s=r[n],a=zx(t,e,s,i);(0===n?o&&a||!o&&!a:o&&!a||!o&&a)&&Gx(t,e,s,i),e=s}return e}function Yx(t,e,r,i,n){for(let o=
 0,s=r.length;o<s;++o)e=Ux(t,e,r[o],i,n);return e}class Wx extends Kv{constructor(t,e,r){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&r?(this.setFlatCoordinates(e,t),this.ends_=r):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?Wg(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){return new Wx(this.flatCoordinates.slice(),this.layout,this.ends_.slice())}closestPointXY(t,e,r,i){return i<bm(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(mx(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),vx(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,r,i))}containsXY(t,e){return n_(this.getOrientedFlatC
 oordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Lx(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Ux(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Px(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Gm(this.getExtent());this.flatInteriorPoint_=o_(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new kx(this.getFlatInteriorPoint(),Xv)}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Fx(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,r=this.ends_,i=[];let n=0;for(let o=0,s=r.length;o<s;++o){const s=r[o],a=new F
 x(e.slice(n,s),t);i.push(a),n=s}return i}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Bx(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ux(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],r=[];return e.length=Ex(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,r),new Wx(e,Wv,r)}getType(){return Xy}intersectsExtent(t){return Dx(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=wx(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()}}var Vx=Wx;class Xx extends uy{constructor(t){if(super(),this.id_=void 0,this.geometryNa
 me_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addEventListener(ly(this.geometryName_),this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Xx(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const r=this.getStyle();return r&&t.setStyle(r),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(iy(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=ey(t,Jg,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}
 setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;{let e;if(Array.isArray(t))e=t;else{wg("function"==typeof t.getZIndex,41),e=[t]}return function(){return e}}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeEventListener(ly(this.geometryName_),this.handleGeometryChanged_),this.geometryName_=t,this.addEventListener(ly(this.geometryName_),this.handleGeometryChanged_),this.handleGeometryChanged_()}}var qx=Xx;class Zx extends Yv{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(iy),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(ey(this.geometries_[t],Jg,this.changed,this))}clone(){const t=new Zx(null);return t.setGeometries(this.geometries_),t}closestPointXY(t,e,r,i){if(i<bm(this.getExte
 nt(),t,e))return i;const n=this.geometries_;for(let o=0,s=n.length;o<s;++o)i=n[o].closestPointXY(t,e,r,i);return i}containsXY(t,e){const r=this.geometries_;for(let i=0,n=r.length;i<n;++i)if(r[i].containsXY(t,e))return!0;return!1}computeExtent(t){Pm(t);const e=this.geometries_;for(let r=0,i=e.length;r<i;++r)Mm(t,e[r].getExtent());return t}getGeometries(){return Kx(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let r=0,i=e.length;r<i;++r)e[r].getType()===this.getType()?t=t.concat(e[r].getGeometriesArrayRecursive()):t.push(e[r]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],r=this.geometries_;let i=!1;for(let n=0,o=r.length;n<o;++n){co
 nst o=r[n],s=o.getSimplifiedGeometry(t);e.push(s),s!==o&&(i=!0)}if(i){const t=new Zx(null);return t.setGeometriesArray(e),t}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return Hy}intersectsExtent(t){const e=this.geometries_;for(let r=0,i=e.length;r<i;++r)if(e[r].intersectsExtent(t))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(t,e){const r=this.geometries_;for(let i=0,n=r.length;i<n;++i)r[i].rotate(t,e);this.changed()}scale(t,e,r){let i=r;i||(i=Gm(this.getExtent()));const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(Kx(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let r=0,i=e.length;r<i;++r)e[r].applyTransform(t);this.changed()}translate(t,e){const r=this.geometries_;for(let i=0,n=r.length;i<n;++i)r[i].translate(t,e);this.changed()}di
 sposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function Kx(t){const e=[];for(let r=0,i=t.length;r<i;++r)e.push(t[r].clone());return e}var Hx=Zx;var Jx=class{constructor(){this.dataProjection=null,this.defaultFeatureProjection=null}getReadOptions(t,e){let r;if(e){let i=e.dataProjection?O_(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()===u_.TILE_PIXELS&&(i=O_(i),i.setWorldExtent(e.extent)),r={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(r)}adaptOptions(t){return qg({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return dg()}readFeature(t,e){return dg()}readFeatures(t,e){return dg()}readGeometry(t,e){return dg()}readProjection(t){return dg()}writeFeature(t,e){return dg()}writeFeatures(t,e){return dg()}writeGeometry(t,e){return dg()}};function $x(t,e,r){const i=r?O_(r.featureProjection):null,n=r?O_(r.dataProjection):null;let o;if(o=i&&n&&!M_(i,n)?(e?t.clon
 e():t).transform(e?i:n,e?n:i):t,e&&r&&void 0!==r.decimals){const e=Math.pow(10,r.decimals),i=function(t){for(let r=0,i=t.length;r<i;++r)t[r]=Math.round(t[r]*e)/e;return t};o===t&&(o=t.clone()),o.applyTransform(i)}return o}var Qx="json";function tw(t){if("string"==typeof t){const e=JSON.parse(t);return e||null}return null!==t?t:null}var ew=class extends Jx{constructor(){super()}getType(){return Qx}readFeature(t,e){return this.readFeatureFromObject(tw(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(tw(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return dg()}readFeaturesFromObject(t,e){return dg()}readGeometry(t,e){return this.readGeometryFromObject(tw(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return dg()}readProjection(t){return this.readProjectionFromObject(tw(t))}readProjectionFromObject(t){return dg()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return dg()}writeFeatures(t,e
 ){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return dg()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return dg()}};function rw(t,e,r,i){let n=t[e],o=t[e+1],s=0;for(let a=e+i;a<r;a+=i){const e=t[a],r=t[a+1];s+=Math.sqrt((e-n)*(e-n)+(r-o)*(r-o)),n=e,o=r}return s}class iw extends Kv{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){this.flatCoordinates?Wg(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){return new iw(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,r,i){return i<bm(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(yx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision(
 )),_x(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,r,i))}forEachSegment(t){return Nx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){if(this.layout!=Xv&&this.layout!=qv)return null;const r=void 0!==e&&e;return B_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r)}getCoordinates(){return Rx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return z_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return rw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=bx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new iw(e,Wv)
 }getType(){return Wy}intersectsExtent(t){return jx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=xx(this.flatCoordinates,0,t,this.stride),this.changed()}}var nw=iw;class ow extends Kv{constructor(t,e,r){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&r)this.setFlatCoordinates(e,t),this.ends_=r;else{let e=this.getLayout();const r=t,i=[],n=[];for(let t=0,o=r.length;t<o;++t){const o=r[t];0===t&&(e=o.getLayout()),Wg(i,o.getFlatCoordinates()),n.push(i.length)}this.setFlatCoordinates(e,i),this.ends_=n}}appendLineString(t){this.flatCoordinates?Wg(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){return new ow(this.flatCoordinates.slice(),this.layout
 ,this.ends_.slice())}closestPointXY(t,e,r,i){return i<bm(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(mx(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),vx(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,r,i))}getCoordinateAtM(t,e,r){if(this.layout!=Xv&&this.layout!=qv||0===this.flatCoordinates.length)return null;const i=void 0!==e&&e,n=void 0!==r&&r;return function(t,e,r,i,n,o,s){if(s)return B_(t,e,r[r.length-1],i,n,o);let a;if(n<t[i-1])return o?(a=t.slice(0,i),a[i-1]=n,a):null;if(t[t.length-1]<n)return o?(a=t.slice(t.length-i),a[i-1]=n,a):null;for(let o=0,s=r.length;o<s;++o){const s=r[o];if(e!=s){if(n<t[e+i-1])return null;if(n<=t[s-1])return B_(t,e,s,i,n,!1);e=s}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,i,n)}getCoordinates(){return Px(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.
 length<=t?null:new nw(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,r=this.layout,i=[];let n=0;for(let o=0,s=e.length;o<s;++o){const s=e[o],a=new nw(t.slice(n,s),r);i.push(a),n=s}return i}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let r=0;const i=this.ends_,n=this.stride;for(let o=0,s=i.length;o<s;++o){const s=i[o];Wg(t,z_(e,r,s,n,.5)),r=s}return t}getSimplifiedGeometryInternal(t){const e=[],r=[];return e.length=Sx(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,r),new ow(e,Wv,r)}getType(){return Zy}intersectsExtent(t){return function(t,e,r,i,n){for(let o=0,s=r.length;o<s;++o){if(jx(t,e,r[o],i,n))return!0;e=r[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=wx(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.
 changed()}}var sw=ow;class aw extends Kv{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?Wg(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){return new aw(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,r,i){if(i<bm(this.getExtent(),t,e))return i;const n=this.flatCoordinates,o=this.stride;for(let s=0,a=n.length;s<a;s+=o){const a=Cg(t,e,n[s],n[s+1]);if(a<i){i=a;for(let t=0;t<o;++t)r[t]=n[s+t];r.length=o}}return i}getCoordinates(){return Rx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new kx(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,r=this.stride,i=[];for(let n=0,o=t.length;n<o;n+=r){const o=new kx(t.slice(
 n,n+r),e);i.push(o)}return i}getType(){return qy}intersectsExtent(t){const e=this.flatCoordinates,r=this.stride;for(let i=0,n=e.length;i<n;i+=r){if(Cm(t,e[i],e[i+1]))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=xx(this.flatCoordinates,0,t,this.stride),this.changed()}}var lw=aw;class uw extends Kv{constructor(t,e,r){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!r&&!Array.isArray(t[0])){let i=this.getLayout();const n=t,o=[],s=[];for(let t=0,e=n.length;t<e;++t){const e=n[t];0===t&&(i=e.getLayout());const r=o.length,a=e.getEnds();for(let t=0,e=a.length;t<e;++t)a[t]+=r;Wg(o,e.getFlatCoordinates()),s.push(a)}e=i,t=o,r=s}void 0!==e&&r?(this.setFlatCoordinates(e,t),this.endss_=r):this.setCoordinates(t,e)}appendPolygon(t){let e;if(this.flatCoordinates){
 const r=this.flatCoordinates.length;Wg(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let t=0,i=e.length;t<i;++t)e[t]+=r}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let r=0;r<t;++r)e[r]=this.endss_[r].slice();return new uw(this.flatCoordinates.slice(),this.layout,e)}closestPointXY(t,e,r,i){return i<bm(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,r,i,n){for(let o=0,s=r.length;o<s;++o){const s=r[o];n=mx(t,e,s,i,n),e=s[s.length-1]}return n}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,r,i,n,o,s,a,l,u,h){const c=h||[NaN,NaN];for(let h=0,p=r.length;h<p;++h){const p=r[h];u=vx(t,e,p,i,n,o,s,a,l,u,c),e=p[p.length-1]}return u}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t
 ,e,r,i))}containsXY(t,e){return function(t,e,r,i,n,o){if(0===r.length)return!1;for(let s=0,a=r.length;s<a;++s){const a=r[s];if(n_(t,e,a,i,n,o))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return function(t,e,r,i){let n=0;for(let o=0,s=r.length;o<s;++o){const s=r[o];n+=Lx(t,e,s,i),e=s[s.length-1]}return n}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Yx(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Ix(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=U_(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=s_(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new lw(this.get
 FlatInteriorPoints().slice(),Xv)}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;!function(t,e,r,i,n){for(let o=0,s=r.length;o<s;++o){const s=r[o];if(!Bx(t,e,s,i,n))return!1;s.length&&(e=s[s.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Yx(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],r=[];return e.length=function(t,e,r,i,n,o,s,a){for(let l=0,u=r.length;l<u;++l){const u=r[l],h=[];s=Ex(t,e,u,i,n,o,s,h),a.push(h),e=u[u.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,r),new uw(e,Wv,r)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(0===t)e=0;else{const r=this.endss_[t-1];e=r[r.length-1]}const r=this.endss_[t].slice(),i=r[r.length-1];
 if(0!==e)for(let t=0,i=r.length;t<i;++t)r[t]-=e;return new Vx(this.flatCoordinates.slice(e,i),this.layout,r)}getPolygons(){const t=this.layout,e=this.flatCoordinates,r=this.endss_,i=[];let n=0;for(let o=0,s=r.length;o<s;++o){const s=r[o].slice(),a=s[s.length-1];if(0!==n)for(let t=0,e=s.length;t<e;++t)s[t]-=n;const l=new Vx(e.slice(n,a),t,s);i.push(l),n=a}return i}getType(){return Ky}intersectsExtent(t){return function(t,e,r,i,n){for(let o=0,s=r.length;o<s;++o){const s=r[o];if(Dx(t,e,s,i,n))return!0;e=s[s.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const r=function(t,e,r,i,n){const o=n||[];let s=0;for(let n=0,a=r.length;n<a;++n){const a=wx(t,e,r[n],i,o[s]);o[s++]=a,e=a[a.length-1]}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===r.length)this.flatCoordinates.length=0;else{const t=r[r.length-1];this.flatCoordinates.length=0===t.l
 ength?0:t[t.length-1]}this.changed()}}var hw=uw;function cw(t,e){if(!t)return null;let r;switch(t.type){case Yy:r=function(t){return new kx(t.coordinates)}(t);break;case Wy:r=function(t){return new nw(t.coordinates)}(t);break;case Xy:r=function(t){return new Vx(t.coordinates)}(t);break;case qy:r=function(t){return new lw(t.coordinates)}(t);break;case Zy:r=function(t){return new sw(t.coordinates)}(t);break;case Ky:r=function(t){return new hw(t.coordinates)}(t);break;case Hy:r=function(t,e){const r=t.geometries.map((function(t){return cw(t,e)}));return new Hx(r)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return $x(r,!1,e)}function pw(t,e){const r=(t=$x(t,!0,e)).getType();let i;switch(r){case Yy:i=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case Wy:i=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case Xy:i=function(t,e){let r;e&&(r=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordina
 tes(r)}}(t,e);break;case qy:i=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case Zy:i=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case Ky:i=function(t,e){let r;e&&(r=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(r)}}(t,e);break;case Hy:i=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){const r=qg({},e);return delete r.featureProjection,pw(t,r)}))}}(t,e);break;case Jy:i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r)}return i}var dw=class extends ew{constructor(t){const e=t||{};super(),this.dataProjection=O_(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=O_(e.featureProjection)),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName}readFeatureFromObject(t,e){let r=null;r="Feature"===t.type?t:{type:"Fe
 ature",geometry:t,properties:null};const i=cw(r.geometry,e),n=new qx;return this.geometryName_?n.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in r!==void 0&&n.setGeometryName(r.geometry_name),n.setGeometry(i),"id"in r&&n.setId(r.id),r.properties&&n.setProperties(r.properties,!0),n}readFeaturesFromObject(t,e){let r=null;if("FeatureCollection"===t.type){r=[];const i=t.features;for(let t=0,n=i.length;t<n;++t)r.push(this.readFeatureFromObject(i[t],e))}else r=[this.readFeatureFromObject(t,e)];return r}readGeometryFromObject(t,e){return cw(t,e)}readProjectionFromObject(t){const e=t.crs;let r;return e?"name"==e.type?r=O_(e.properties.name):"EPSG"===e.type?r=O_("EPSG:"+e.properties.code):wg(!1,36):r=this.dataProjection,r}writeFeatureObject(t,e){e=this.adaptOptions(e);const r={type:"Feature",geometry:null,properties:null},i=t.getId();if(void 0!==i&&(r.id=i),!t.hasProperties())return r;const n=t.getProperties(),o=t.getGeometry();return o&&(r.geometry=pw(o,e),d
 elete n[t.getGeometryName()]),Kg(n)||(r.properties=n),r}writeFeaturesObject(t,e){e=this.adaptOptions(e);const r=[];for(let i=0,n=t.length;i<n;++i)r.push(this.writeFeatureObject(t[i],e));return{type:"FeatureCollection",features:r}}writeGeometryObject(t,e){return pw(t,this.adaptOptions(e))}};var fw="preload",gw="useInterimTilesOnError";var yw=class extends oy{constructor(t){super(),this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t}getFeatures(t){return dg()}prepareFrame(t){return dg()}renderFrame(t,e){return dg()}loadedTileCallback(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r}createLoadedTileFinder(t,e,r){return function(i,n){const o=this.loadedTileCallback.bind(this,r,i);return t.forEachLoadedTile(e,i,n,o)}.bind(this)}forEachFeatureAtCoordinate(t,e,r,i,n){}getDataAtPixel(t,e,r){return dg()}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===cg&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState
 ();return e!=cg&&e!=pg&&t.addEventListener(Jg,this.boundHandleImageChange_),e==ug&&(t.load(),e=t.getState()),e==cg}renderIfReadyAndVisible(){const t=this.getLayer();t.getVisible()&&t.getSourceState()==Gv&&t.changed()}};var mw=class extends yw{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.containerReused=!1}useContainer(t,e,r){const i=this.getLayer().getClassName();let n,o;if(t&&""===t.style.opacity&&t.className===i){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(o=e.getContext("2d"))}if(!o||0!==o.canvas.width&&o.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=o,this.containerReused=!0),!this.container){n=document.createElement("div"),n.className=i;let t=n.style;t.position="absolute",t.width="100%",t.height="100%",o=Dg();cons
 t e=o.canvas;n.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=n,this.context=o}}clip(t,e,r){const i=e.pixelRatio,n=e.size[0]*i/2,o=e.size[1]*i/2,s=e.viewState.rotation,a=Um(r),l=Ym(r),u=Dm(r),h=jm(r);my(e.coordinateToPixelTransform,a),my(e.coordinateToPixelTransform,l),my(e.coordinateToPixelTransform,u),my(e.coordinateToPixelTransform,h),t.save(),Ay(t,-s,n,o),t.beginPath(),t.moveTo(a[0]*i,a[1]*i),t.lineTo(l[0]*i,l[1]*i),t.lineTo(u[0]*i,u[1]*i),t.lineTo(h[0]*i,h[1]*i),t.clip(),Ay(t,s,n,o)}clipUnrotated(t,e,r){const i=Um(r),n=Ym(r),o=Dm(r),s=jm(r);my(e.coordinateToPixelTransform,i),my(e.coordinateToPixelTransform,n),my(e.coordinateToPixelTransform,o),my(e.coordinateToPixelTransform,s);const a=this.inversePixelTransform;my(a,i),my(a,n),my(a,o),my(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Ma
 th.round(s[1])),t.clip()}dispatchRenderEvent_(t,e,r){const i=this.getLayer();if(i.hasListener(t)){const n=new lx(t,this.inversePixelTransform,r,e);i.dispatchEvent(n)}}preRender(t,e){this.dispatchRenderEvent_(kv,t,e)}postRender(t,e){this.dispatchRenderEvent_(Nv,t,e)}getRenderTransform(t,e,r,i,n,o,s){const a=n/2,l=o/2,u=i/e,h=-u,c=-t[0]+s,p=-t[1];return vy(this.tempTransform,a,l,u,h,-r,c,p)}getDataAtPixel(t,e,r){const i=my(this.inversePixelTransform,t.slice()),n=this.context;let o;try{const t=Math.round(i[0]),e=Math.round(i[1]),r=document.createElement("canvas"),s=r.getContext("2d");r.width=1,r.height=1,s.clearRect(0,0,1,1),s.drawImage(n.canvas,t,e,1,1,0,0,1,1),o=s.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:o}return 0===o[3]?null:o}};class _w extends mw{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpE
 xtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new Tv(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),r=t.getState(),i=e.getUseInterimTilesOnError();return r==hx||r==px||r==cx&&!i}getTile(t,e,r,i){const n=i.pixelRatio,o=i.viewState.projection,s=this.getLayer();let a=s.getSource().getTile(t,e,r,n,o);return a.getState()==cx&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(hx)),this.isDrawableTile(a)||(a=a.getInterimTile()),a}loadedTileCallback(t,e,r){return!!this.isDrawableTile(r)&&super.loadedTileCallback(t,e,r)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const r=t.layerStatesArray[t.layerIndex],i=t.viewState,n=i.projection,o=i.resolution,s=i.center,a=i.rotation,l=t.pixelRatio,u=this.getLayer(),h=u.getSource(),c=h.getRevision(),p=h.getTileGridForProjection(n),d=p.getZForResolution(o,h.zDirection),f=p.getResolution(d);let g=t.extent;const y=r.extent&&G_(r.extent,n);y&&(g=Bm(g,G_(r.extent,n)));const m=h.getTilePixelRatio(l);let 
 _=Math.round(t.size[0]*m),v=Math.round(t.size[1]*m);if(a){const t=Math.round(Math.sqrt(_*_+v*v));_=t,v=t}const x=f*_/2/m,w=f*v/2/m,b=[s[0]-x,s[1]-w,s[0]+x,s[1]+w],S=p.getTileRangeForExtentAndZ(g,d),T={};T[d]={};const C=this.createLoadedTileFinder(h,n,T),E=this.tmpExtent,R=this.tmpTileRange_;this.newTiles_=!1;for(let e=S.minX;e<=S.maxX;++e)for(let r=S.minY;r<=S.maxY;++r){const i=this.getTile(d,e,r,t);if(this.isDrawableTile(i)){const e=gg(this);if(i.getState()==hx){T[d][i.tileCoord.toString()]=i;const t=i.inTransition(e);this.newTiles_||!t&&-1!==this.renderedTiles.indexOf(i)||(this.newTiles_=!0)}if(1===i.getAlpha(e,t.time))continue}const n=p.getTileCoordChildTileRange(i.tileCoord,R,E);let o=!1;n&&(o=C(d+1,n)),o||p.forEachTileCoordParentTileRange(i.tileCoord,C,R,E)}const P=f/o;vy(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,a,-_/2,-v/2);const I=(O=this.pixelTransform,Ng?wy(O):(Ny||(Ny=Dg(1,1).canvas),Ny.style.transform=wy(O),Ny.style.transform));var O;this.useContainer(e,I,r.opa
 city);const L=this.context,M=L.canvas;xy(this.inversePixelTransform,this.pixelTransform),vy(this.tempTransform,_/2,v/2,P,P,0,-_/2,-v/2),M.width!=_||M.height!=v?(M.width=_,M.height=v):this.containerReused||L.clearRect(0,0,_,v),y&&this.clipUnrotated(L,t,y),qg(L,h.getContextOptions()),this.preRender(L,t),this.renderedTiles.length=0;let F,A,k,N=Object.keys(T).map(Number);N.sort(Ug),1!==r.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(F=[],A=[]):N=N.reverse();for(let e=N.length-1;e>=0;--e){const i=N[e],o=h.getTilePixelSize(i,l,n),s=p.getResolution(i)/f,a=o[0]*s*P,u=o[1]*s*P,c=p.getTileCoordForCoordAndZ(Um(b),i),g=p.getTileCoordExtent(c),y=my(this.tempTransform,[m*(g[0]-b[0])/f,m*(b[3]-g[3])/f]),_=m*h.getGutterForProjection(n),v=T[i];for(const e in v){const n=v[e],o=n.tileCoord,s=y[0]-(c[1]-o[1])*a,l=Math.round(s+a),p=y[1]-(c[2]-o[2])*u,f=Math.round(p+u),g=Math.round(s),m=Math.round(p),x=l-g,w=f-m,b=d===i,S=b&&1!==n.getAlpha(gg(this),t.time);if(!S)if(F){L.save(),k=[g
 ,m,g+x,m,g+x,m+w,g,m+w];for(let t=0,e=F.length;t<e;++t)if(d!==i&&i<A[t]){const e=F[t];L.beginPath(),L.moveTo(k[0],k[1]),L.lineTo(k[2],k[3]),L.lineTo(k[4],k[5]),L.lineTo(k[6],k[7]),L.moveTo(e[6],e[7]),L.lineTo(e[4],e[5]),L.lineTo(e[2],e[3]),L.lineTo(e[0],e[1]),L.clip()}F.push(k),A.push(i)}else L.clearRect(g,m,x,w);this.drawTileImage(n,t,g,m,x,w,_,b,r.opacity),F&&!S&&L.restore(),this.renderedTiles.push(n),this.updateUsedTiles(t.usedTiles,h,n)}}return this.renderedRevision=c,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!Lm(this.renderedExtent_,b),this.renderedExtent_=b,this.renderedPixelRatio=l,this.renderedProjection=n,this.manageTilePyramid(t,h,p,l,n,g,d,u.getPreload()),this.scheduleExpireCache(t,h),this.postRender(L,t),r.extent&&L.restore(),I!==M.style.transform&&(M.style.transform=I),this.container}drawTileImage(t,e,r,i,n,o,s,a,l){const u=this.getTileImage(t);if(!u)return;const h=gg(this),c=a?t.getAlpha(h,e.time):1,p=l*c,d=p!==this.context.globalAlpha;d&&(thi
 s.context.save(),this.context.globalAlpha=p),this.context.drawImage(u,s,s,u.width-2*s,u.height-2*s,r,i,n,o),d&&this.context.restore(),1!==c?e.animate=!0:a&&t.endTransition(h)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const r=function(t,e,r){const i=gg(t);i in r.usedTiles&&t.expireCache(r.viewState.projection,r.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(r)}}updateUsedTiles(t,e,r){const i=gg(e);i in t||(t[i]={}),t[i][r.getKey()]=!0}manageTilePyramid(t,e,r,i,n,o,s,a,l){const u=gg(e);u in t.wantedTiles||(t.wantedTiles[u]={});const h=t.wantedTiles[u],c=t.tileQueue;let p,d,f,g,y,m,_=0;for(m=r.getMinZoom();m<=s;++m)for(d=r.getTileRangeForExtentAndZ(o,m,d),f=r.getResolution(m),g=d.minX;g<=d.maxX;++g)for(y=d.minY;y<=d.maxY;++y)s-m<=a?(++_,p=e.getTile(m,g,y,i,n),p.getState()==ux&&(h[p.getKey()]=!0,c.isKeyQueued(p.getKey())||c.enqueue([p,u,r.getTileCoordCenter(p.tileCoord),f])),void 0!=
 =l&&l(p)):e.useTile(m,g,y,n);e.updateCacheSize(_,n)}}_w.prototype.getLayer;var vw=_w;const xw="renderOrder";var ww=class extends zv{constructor(t){const e=t||{},r=qg({},e);delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,super(r),this.declutter_=void 0!==e.declutter&&e.declutter,this.renderBuffer_=void 0!==e.renderBuffer?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=void 0!==e.updateWhileAnimating&&e.updateWhileAnimating,this.updateWhileInteracting_=void 0!==e.updateWhileInteracting&&e.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(xw)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}setR
 enderOrder(t){this.set(xw,t)}setStyle(t){this.style_=void 0!==t?t:rm,this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let r;if(Array.isArray(t))r=t;else{wg("function"==typeof t.getZIndex,41),r=[t]}e=function(){return r}}return e}(this.style_),this.changed()}};const bw={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Sw=[bw.FILL],Tw=[bw.STROKE],Cw=[bw.BEGIN_PATH],Ew=[bw.CLOSE_PATH];var Rw=bw;var Pw=class extends Bv{constructor(t,e,r,i){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=i,this.maxLineWidth=0,this.resolution=r,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){retu
 rn t*e}))}appendFlatCoordinates(t,e,r,i,n,o){let s=this.coordinates.length;const a=this.getBufferedMaxExtent();o&&(e+=i);let l=t[e],u=t[e+1];const h=this.tmpCoordinate_;let c,p,d,f=!0;for(c=e+i;c<r;c+=i)h[0]=t[c],h[1]=t[c+1],d=Em(a,h),d!==p?(f&&(this.coordinates[s++]=l,this.coordinates[s++]=u),this.coordinates[s++]=h[0],this.coordinates[s++]=h[1],f=!1):d===gm?(this.coordinates[s++]=h[0],this.coordinates[s++]=h[1],f=!1):f=!0,l=h[0],u=h[1],p=d;return(n&&f||c===e+i)&&(this.coordinates[s++]=l,this.coordinates[s++]=u),s}drawCustomCoordinates_(t,e,r,i,n){for(let o=0,s=r.length;o<s;++o){const s=r[o],a=this.appendFlatCoordinates(t,e,s,i,!1,!1);n.push(a),e=s}return e}drawCustom(t,e,r){this.beginGeometry(t,e);const i=t.getType(),n=t.getStride(),o=this.coordinates.length;let s,a,l,u,h;if(i==Ky){s=t.getOrientedFlatCoordinates(),u=[];const e=t.getEndss();h=0;for(let t=0,r=e.length;t<r;++t){const r=[];h=this.drawCustomCoordinates_(s,h,e[t],n,r),u.push(r)}this.instructions.push([Rw.CUSTOM,o,u,t,r,
 Ix])}else i==Xy||i==Zy?(l=[],s=i==Xy?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),h=this.drawCustomCoordinates_(s,0,t.getEnds(),n,l),this.instructions.push([Rw.CUSTOM,o,l,t,r,Px])):i==Wy||i==qy?(s=t.getFlatCoordinates(),a=this.appendFlatCoordinates(s,0,s.length,n,!1,!1),this.instructions.push([Rw.CUSTOM,o,a,t,r,Rx])):i==Yy&&(s=t.getFlatCoordinates(),this.coordinates.push(s[0],s[1]),a=this.coordinates.length,this.instructions.push([Rw.CUSTOM,o,a,t,r]));this.endGeometry(e)}beginGeometry(t,e){const r=t.getExtent();this.beginGeometryInstruction1_=[Rw.BEGIN_GEOMETRY,e,0,r],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Rw.BEGIN_GEOMETRY,e,0,r],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const r=t
 .length;let i,n,o=-1;for(e=0;e<r;++e)i=t[e],n=i[0],n==Rw.END_GEOMETRY?o=e:n==Rw.BEGIN_GEOMETRY&&(i[2]=e,Yg(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const r=this.state;if(t){const e=t.getColor();r.fillStyle=Ag(e||"#000")}else r.fillStyle=void 0;if(e){const t=e.getColor();r.strokeStyle=Ag(t||"#000");const i=e.getLineCap();r.lineCap=void 0!==i?i:"round";const n=e.getLineDash();r.lineDash=n?n.slice():by;const o=e.getLineDashOffset();r.lineDashOffset=o||0;const s=e.getLineJoin();r.lineJoin=void 0!==s?s:"round";const a=e.getWidth();r.lineWidth=void 0!==a?a:1;const l=e.getMiterLimit();r.miterLimit=void 0!==l?l:10,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0}createFill(t){const e=t.fillStyle,r=[Rw.SET_FILL_STYLE,e];return"string"!=typeof e&&r.push(!0),r}applyStroke(t){this.instructio
 ns.push(this.createStroke(t))}createStroke(t){return[Rw.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t)),t.currentFillStyle=r)}updateStrokeStyle(t,e){const r=t.strokeStyle,i=t.lineCap,n=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=r||t.currentLineCap!=i||n!=t.currentLineDash&&!Vg(t.currentLineDash,n)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==r&&e.call(this,t),t.currentStrokeStyle=r,t.currentLineCap=i,t.currentLineDash=n,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.be
 ginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Rw.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=wm(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;xm(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}};var Iw=class extends Pw{constructor(t,e,r,i){super(t,e,r,i)}drawFlatCoordinatess_(t,e,r,i){const n=this.state,o=void 0!==n.fillStyle,s=void 0!==n.strokeStyle,a=r.length;this.instructions.push(Cw),this.hitDetectionInstructions.push(Cw);for(let n=0;n<a;++n){const o=r[n],a=this.coordinates.length,l=this.appendFlatCoordinates(t,e,o,i,!0,!s),u=[Rw.MOVE_TO_LINE_TO,a,l];this.instructions.push(u),this.hitDetectionInstructions.push(u),s&&(this.instructions.push(Ew),this.hitDetectionInstructions.push(Ew)),e=o}return o&&(this.instructions.push(Sw),this.hi
 tDetectionInstructions.push(Sw)),s&&(this.instructions.push(Tw),this.hitDetectionInstructions.push(Tw)),e}drawCircle(t,e){const r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0===i&&void 0===n)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([Rw.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([Rw.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);const o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,s,!1,!1);const l=[Rw.CIRCLE,a];this.instructions.push(Cw,l),this.hitDetectionInstructions.push(Cw,l),void 0!==r.fillStyle&&(this.instructions.push(Sw),this.hitDetectionInstructions.push(Sw)),void 0!==r.strokeStyle&&(this.instructions.push(Tw),this.hitDetectionInstructions.push(Tw)),this.endGeometry(e)}drawPolygon(t,e){const r=this.state,i=r.fillStyle,n=r.strokeStyle;if(v
 oid 0===i&&void 0===n)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([Rw.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([Rw.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);const o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}drawMultiPolygon(t,e){const r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0===i&&void 0===n)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([Rw.SET_FILL_STYLE,"#000"]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([Rw.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);const o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride();let l=0;for(let t=0,e=o.length;t<e;++t)l=this.drawFlatC
 oordinatess_(s,l,o[t],a);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let r=0,i=e.length;r<i;++r)e[r]=Tx(e[r],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}};function Ow(t,e,r,i,n){let o,s,a,l,u,h,c,p,d,f,g=r,y=r,m=0,_=0,v=r;for(s=r;s<i;s+=n){const r=e[s],i=e[s+1];void 0!==u&&(d=r-u,f=i-h,l=Math.sqrt(d*d+f*f),void 0!==c&&(_+=a,o=Math.acos((c*d+p*f)/(a*l)),o>t&&(_>m&&(m=_,g=v,y=s),_=0,v=s-n)),a=l,c=d,p=f),u=r,h=i}return _+=l,_>m?[v,s]:[g,y]}const Lw={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};const Mw={Circle:Iw,Default:Pw,Image:class extends Pw{constructor(t,e,r,i){super(t,e,r,i),this.declutterGroups_=null,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=vo
 id 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0}drawCoordinates_(t,e,r,i){return this.appendFlatCoordinates(t,e,r,i,!1,!1)}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const r=t.getFlatCoordinates(),i=t.getStride(),n=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,i);this.instructions.push([Rw.DRAW_IMAGE,n,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInstructions.push([Rw.DRAW_IMAGE,n,o,this.hitDetectionImage_,this.anchorX_*this.image
 PixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const r=t.getFlatCoordinates(),i=t.getStride(),n=this.coordinates.length,o=this.drawCoordinates_(r,0,r.length,i);this.instructions.push([Rw.DRAW_IMAGE,n,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.hitDetectionInst
 ructions.push([Rw.DRAW_IMAGE,n,o,this.hitDetectionImage_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,this.declutterGroups_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_)]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const r=t.getAnchor(),i=t.getSize(),n=t.getHitDetectionImage(this.pixelRatio),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pix
 elRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.declutterGroups_=e,this.hitDetectionImage_=n,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0]}},LineString:class extends Pw{constructor(t,e,r,i){super(t,e,r,i)}drawFlatCoordinates_(t,e,r,i){const n=this.coordinates.length,o=this.appendFlatCoordinates(t,e,r,i,!1,!1),s=[Rw.MOVE_TO_LINE_TO,n,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),r}drawLineString(t,e){const r=this.state,i=r.strokeStyle,n=r.lineWidth;if(void 0===i||void 0===n)return;this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Rw.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Cw);const o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),t
 his.hitDetectionInstructions.push(Tw),this.endGeometry(e)}drawMultiLineString(t,e){const r=this.state,i=r.strokeStyle,n=r.lineWidth;if(void 0===i||void 0===n)return;this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Rw.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],Cw);const o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride();let l=0;for(let t=0,e=o.length;t<e;++t)l=this.drawFlatCoordinates_(s,l,o[t],a);this.hitDetectionInstructions.push(Tw),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Tw),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Tw),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Cw)}},Polygon:Iw,Text:class
  extends Pw{constructor(t,e,r,i){super(t,e,r,i),this.declutterGroups_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_=""}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const r=this.textFillState_,i=this.textStrokeState_,n=this.textState_;if(""===this.text_||!n||!r&&!i)return;let o=this.coordinates.length;const s=t.getType();let a,l,u=null,h=2,c=2;if(n.placement===Qm){if(!Vm(this.getBufferedMaxExtent(),t.getExtent()))return;let r;if(u=t.getFlatCoordinates(),c=t.getStride(),s==Wy)r=[u.length];else if(s==Zy)r=t.getEnds();else if(s==Xy)r=t.getEnds().slice(0,1);else if(s==Ky){const e=t.getEndss();for(r=[],a=0,l=e.length;a<l;++a)r.push(e[a
 ][0])}this.beginGeometry(t,e);const i=n.textAlign;let p,d=0;for(let t=0,e=r.length;t<e;++t){if(null==i){const e=Ow(n.maxAngle,u,d,r[t],c);d=e[0],p=e[1]}else p=r[t];for(a=d;a<p;a+=c)this.coordinates.push(u[a],u[a+1]);h=this.coordinates.length,d=r[t];const e=this.declutterGroups_?0===t?this.declutterGroups_[0]:[].concat(this.declutterGroups_[0]):null;this.drawChars_(o,h,e),o=h}this.endGeometry(e)}else{let r=null;switch(n.overflow||(r=[]),s){case Yy:case qy:u=t.getFlatCoordinates(),h=u.length;break;case Wy:u=t.getFlatMidpoint();break;case Jy:u=t.getCenter();break;case Zy:u=t.getFlatMidpoints(),h=u.length;break;case Xy:u=t.getFlatInteriorPoint(),n.overflow||r.push(u[2]/this.resolution),c=3;break;case Ky:const e=t.getFlatInteriorPoints();for(u=[],a=0,l=e.length;a<l;a+=3)n.overflow||r.push(e[a+2]/this.resolution),u.push(e[a],e[a+1]);if(h=u.length,0==h)return}h=this.appendFlatCoordinates(u,0,h,c,!1,!1),this.saveTextStates_(),(n.backgroundFill||n.backgroundStroke)&&(this.setFillStrokeStyle(
 n.backgroundFill,n.backgroundStroke),n.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),n.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let i=n.padding;if(i!=Sy&&(n.scale[0]<0||n.scale[1]<0)){let t=n.padding[0],e=n.padding[1],r=n.padding[2],o=n.padding[3];n.scale[0]<0&&(e=-e,o=-o),n.scale[1]<0&&(t=-t,r=-r),i=[t,e,r,o]}const p=this.pixelRatio;this.instructions.push([Rw.DRAW_IMAGE,o,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,i==Sy?Sy:i.map((function(t){return t*p})),!!n.backgroundFill,!!n.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,r]);const d=1/p;this.hitDetectionInstructions.push([Rw.DRAW_IMAGE,o,h,null,NaN,NaN,this.declutterGroups_,NaN,1,0,0,this.textRotateWithView_,
 this.textRotation_,[d,d],NaN,i,!!n.backgroundFill,!!n.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,r]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,r=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const n=this.textKey_;n in this.textStates||(this.textStates[n]={font:e.font,textAlign:e.textAlign||"center",textBaseline:e.textBaseline||"middle",scale:e.scale});const o=this.fillKey_;r&&(o in this.fillStates||(this.fillStates[o]={fillStyle:r.fillStyle}))}drawChars_(t,e,r){const i=this.textStrokeState_,n=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,u=Lw[n.textBaseline],h=this.textOffsetY_*l,c=this.text_,p=i?i.lineWi
 dth*Math.abs(n.scale[0])/2:0;this.instructions.push([Rw.DRAW_CHARS,t,e,u,r,n.overflow,a,n.maxAngle,l,h,o,p*l,c,s,1]),this.hitDetectionInstructions.push([Rw.DRAW_CHARS,t,e,u,r,n.overflow,a,n.maxAngle,1,h,o,p,c,s,1/l])}setTextStyle(t,e){let r,i,n;if(t){this.declutterGroups_=e;const o=t.getFill();o?(i=this.textFillState_,i||(i={},this.textFillState_=i),i.fillStyle=Ag(o.getColor()||"#000")):(i=null,this.textFillState_=i);const s=t.getStroke();if(s){n=this.textStrokeState_,n||(n={},this.textStrokeState_=n);const t=s.getLineDash(),e=s.getLineDashOffset(),r=s.getWidth(),i=s.getMiterLimit();n.lineCap=s.getLineCap()||"round",n.lineDash=t?t.slice():by,n.lineDashOffset=void 0===e?0:e,n.lineJoin=s.getLineJoin()||"round",n.lineWidth=void 0===r?1:r,n.miterLimit=void 0===i?10:i,n.strokeStyle=Ag(s.getColor()||"#000")}else n=null,this.textStrokeState_=n;r=this.textState_;const a=t.getFont()||"10px sans-serif";Iy(a);const l=t.getScaleArray();r.overflow=t.getOverflow(),r.font=a,r.maxAngle=t.getMaxAngl
 e(),r.placement=t.getPlacement(),r.textAlign=t.getTextAlign(),r.textBaseline=t.getTextBaseline()||"middle",r.backgroundFill=t.getBackgroundFill(),r.backgroundStroke=t.getBackgroundStroke(),r.padding=t.getPadding()||Sy,r.scale=void 0===l?[1,1]:l;const u=t.getOffsetX(),h=t.getOffsetY(),c=t.getRotateWithView(),p=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===u?0:u,this.textOffsetY_=void 0===h?0:h,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===p?0:p,this.strokeKey_=n?("string"==typeof n.strokeStyle?n.strokeStyle:gg(n.strokeStyle))+n.lineCap+n.lineDashOffset+"|"+n.lineWidth+n.lineJoin+n.miterLimit+"["+n.lineDash.join()+"]":"",this.textKey_=r.font+r.scale+(r.textAlign||"?")+(r.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+gg(i.fillStyle):""}else this.text_=""}}};var Fw=class{constructor(t,e,r,i,n){this.declutter_=n,this.declutterGroups_=null,this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=
 r,this.buildersByZIndex_={}}addDeclutter(t){let e=null;return this.declutter_&&(t?(e=this.declutterGroups_,e[0][0]++):(e=[[1]],this.declutterGroups_=e)),e}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const r=this.buildersByZIndex_[e];for(const i in r){const n=r[i].finish();t[e][i]=n}}return t}getBuilder(t,e){const r=void 0!==t?t.toString():"0";let i=this.buildersByZIndex_[r];void 0===i&&(i={},this.buildersByZIndex_[r]=i);let n=i[e];if(void 0===n){n=new(0,Mw[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=n}return n}};function Aw(t,e,r,i,n,o,s,a,l,u,h,c){const p=[];let d;if(c){const n=W_(t,e,r,i,c,[t[e],t[e+1]]);d=n[0]>n[n.length-i]}else d=t[e]>t[r-i];const f=n.length;let g,y,m=t[e],_=t[e+1],v=t[e+=i],x=t[e+1],w=0,b=Math.sqrt(Math.pow(v-m,2)+Math.pow(x-_,2)),S=!1;for(let c=0;c<f;++c){g=d?f-c-1:c;const T=n[g],C=a*l(u,T,h),E=o+C/2;for(;e<r-i&&w+b<E;)m=v,_=x,v=t[e+=i],x=t[e+1],w+=b,b=Math.sqrt(Math.pow(v-m,2)+Math.pow(x-_,2));const
  R=E-w;let P=Math.atan2(x-_,v-m);if(d&&(P+=P>0?-Math.PI:Math.PI),void 0!==y){let t=P-y;if(S=S||0!==t,t+=t>Math.PI?-2*Math.PI:t<-Math.PI?2*Math.PI:0,Math.abs(t)>s)return null}y=P;const I=R/b,O=Eg(m,v,I),L=Eg(_,x,I);p[g]=[O,L,C/2,P,T],o+=C}return S?p:[[p[0][0],p[0][1],p[0][2],p[0][3],n]]}const kw=[1/0,1/0,-1/0,-1/0],Nw=[1,0,0,1,0,0],jw=[],Dw=[],Gw=[],zw=[];var Bw=class{constructor(t,e,r,i,n){this.overlaps=r,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.declutterItems=[],this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderBuffer_=n,this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,r,i){const n=t+e+r+i;if(this.labels_[n])return this.labels_[n];const o=i?this.strokeStates[i]:null,s=r?this.
 fillStates[r]:null,a=this.textStates[e],l=this.pixelRatio,u=[a.scale[0]*l,a.scale[1]*l],h=Lw[a.textAlign||"center"],c=i&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),d=p.length,f=[],g=function(t,e,r){const i=e.length;let n=0;for(let o=0;o<i;++o){const i=My(t,e[o]);n=Math.max(n,i),r.push(i)}return n}(a.font,p,f),y=Oy(a.font),m=g+c,_=[],v=(m+2)*u[0],x=(y*d+c)*u[1],w={width:v<0?Math.floor(v):Math.ceil(v),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:_};if(1==u[0]&&1==u[1]||_.push("scale",u),_.push("font",a.font),i){_.push("strokeStyle",o.strokeStyle),_.push("lineWidth",c),_.push("lineCap",o.lineCap),_.push("lineJoin",o.lineJoin),_.push("miterLimit",o.miterLimit),(Ng?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(_.push("setLineDash",[o.lineDash]),_.push("lineDashOffset",o.lineDashOffset))}r&&_.push("fillStyle",s.fillStyle),_.push("textBaseline","middle"),_.push("textAlign","center");const b=.5-h,S=h*m+b*c;let T;if(i)for(T=0;T<d;++T)_.push("
 strokeText",[p[T],S+b*f[T],.5*(c+y)+T*y]);if(r)for(T=0;T<d;++T)_.push("fillText",[p[T],S+b*f[T],.5*(c+y)+T*y]);return this.labels_[n]=w,w}replayTextBackground_(t,e,r,i,n,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],a&&(t.fillStyle=o[1]),this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())}replayImageOrLabel_(t,e,r,i,n,o,s,a,l,u,h,c,p,d,f,g,y,m,_){const v=m||_;r-=o*=d[0],i-=s*=d[1];const x=g+h>n.width?n.width-h:g,w=l+c>n.height?n.height-c:l,b=y[3]+x*d[0]+y[1],S=y[0]+w*d[1]+y[2],T=r-y[3],C=i-y[0];(v||0!==p)&&(jw[0]=T,zw[0]=T,jw[1]=C,Dw[1]=C,Dw[0]=T+b,Gw[0]=Dw[0],Gw[1]=C+S,zw[1]=Gw[1]);let E=null;if(0!==p){const t=r+o,e=i+s;E=vy(Nw,t,e,1,1,p,-t,-e),my(Nw,jw),my(Nw,Dw),my(Nw,Gw),my(Nw,zw),Rm(Math.min(jw[0],Dw[0],Gw[0],zw[0]),Math.min(jw[1],Dw[1],Gw[1],zw[1]),Math.max(jw[0],Dw[0],Gw[0],zw[0]),Math.max(jw[1],Dw[1],Gw[1],zw[1]),kw)}else Rm(T,C,T+b,C+S,kw);this.renderBuffer_[0]=Math.max(
 this.renderBuffer_[0],Wm(kw)),this.renderBuffer_[1]=Math.max(this.renderBuffer_[1],zm(kw));const R=t.canvas,P=_?_[2]*d[0]/2:0,I=this.renderBuffer_,O=kw[0]-P<=(R.width+I[0])/e&&kw[2]+P>=-I[0]/e&&kw[1]-P<=(R.height+I[1])/e&&kw[3]+P>=-I[1]/e;if(f&&(r=Math.round(r),i=Math.round(i)),a){if(!O&&1==a[0])return!1;const e=O?[t,E?E.slice(0):null,u,n,h,c,x,w,r,i,d,kw.slice()]:null;e&&(v&&e.push(m,_,jw.slice(0),Dw.slice(0),Gw.slice(0),zw.slice(0)),a.push(e))}else O&&(v&&this.replayTextBackground_(t,jw,Dw,Gw,zw,m,_,!1),ky(t,E,u,n,h,c,x,w,r,i,d));return!0}fill_(t){if(this.alignFill_){const e=my(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;t.save(),t.translate(e[0]%r,e[1]%r),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))}renderDeclutter(t,e,r,i){const n=[];for(let r=1,i=t.length;r<i;++r){const i=t[r][11];n.pu
 sh({minX:i[0],minY:i[1],maxX:i[2],maxY:i[3],value:e})}i||(i=new ec.a(9));let o=!1;for(let t=0,e=n.length;t<e;++t)if(i.collides(n[t])){o=!0;break}if(!o){i.load(n);for(let e=1,i=t.length;e<i;++e){const i=t[e],n=i[0],o=n.globalAlpha;o!==r&&(n.globalAlpha=r),i.length>12&&this.replayTextBackground_(i[0],i[14],i[15],i[16],i[17],i[12],i[13],!0),ky.apply(void 0,i),o!==r&&(n.globalAlpha=o)}}return t.length=1,i}drawLabelWithPointPlacement_(t,e,r,i){const n=this.textStates[e],o=this.createLabel(t,e,i,r),s=this.strokeStates[r],a=this.pixelRatio,l=Lw[n.textAlign||"center"],u=Lw[n.textBaseline||"middle"],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*n.scale[0])+2*(.5-l)*h,anchorY:u*o.height/a+2*(.5-u)*h}}execute_(t,e,r,i,n,o,s){let a;var l,u;this.declutterItems.length=0,this.pixelCoordinates_&&Vg(r,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=Y_(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_)
 ,l=this.renderedTransform_,u=r,l[0]=u[0],l[1]=u[1],l[2]=u[2],l[3]=u[3],l[4]=u[4],l[5]=u[5]);let h=0;const c=i.length;let p,d,f,g,y,m,_,v,x,w,b,S,T,C,E=0,R=0,P=0,I=null,O=null;const L=this.coordinateCache_,M=this.viewRotation_,F=Math.round(1e12*Math.atan2(-r[1],r[0]))/1e12,A={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:M},k=this.instructions!=i||this.overlaps?0:200;let N,j,D;for(;h<c;){const r=i[h];switch(r[0]){case Rw.BEGIN_GEOMETRY:N=r[1],N.getGeometry()?void 0===s||Vm(s,r[3])?++h:h=r[2]+1:h=r[2];break;case Rw.BEGIN_PATH:R>k&&(this.fill_(t),R=0),P>k&&(t.stroke(),P=0),R||P||(t.beginPath(),g=NaN,y=NaN),++h;break;case Rw.CIRCLE:E=r[1];const i=a[E],l=a[E+1],u=a[E+2]-i,c=a[E+3]-l,G=Math.sqrt(u*u+c*c);t.moveTo(i+G,l),t.arc(i,l,G,0,2*Math.PI,!0),++h;break;case Rw.CLOSE_PATH:t.closePath(),++h;break;case Rw.CUSTOM:E=r[1],p=r[2];const z=r[3],B=r[4],U=6==r.length?r[5]:void 0;A.geometry=z,A.feature=N,h in L||(L[h]=[]);const Y=L[h];U?U(a,E,p,2,Y):(Y[0]=a[E],Y[1]=a[E
 +1],Y.length=2),B(Y,A),++h;break;case Rw.DRAW_IMAGE:E=r[1],p=r[2],w=r[3],d=r[4],f=r[5],x=o?null:r[6];let W=r[7];const V=r[8],X=r[9],q=r[10],Z=r[11];let K=r[12];const H=r[13];let J,$,Q,tt,et=r[14];if(!w&&r.length>=19){b=r[18],S=r[19],T=r[20],C=r[21];const t=this.drawLabelWithPointPlacement_(b,S,T,C);w=t.label,r[3]=w;const e=r[22];d=(t.anchorX-e)*this.pixelRatio,r[4]=d;const i=r[23];f=(t.anchorY-i)*this.pixelRatio,r[5]=f,W=w.height,r[7]=W,et=w.width,r[14]=et}r.length>24&&(J=r[24]),r.length>16?($=r[15],Q=r[16],tt=r[17]):($=Sy,Q=!1,tt=!1),Z&&F?K+=M:Z||F||(K-=M);let rt=0,it=0;for(;E<p;E+=2){if(J&&J[rt++]<et/this.pixelRatio)continue;if(x){const t=Math.floor(it);v=x.length<t+1?[x[0][0]]:x[t]}this.replayImageOrLabel_(t,e,a[E],a[E+1],w,d,f,v,W,V,X,q,K,H,n,et,$,Q?I:null,tt?O:null)&&v&&x[x.length-1]!==v&&x.push(v),v&&(v.length-1===v[0]&&this.declutterItems.push(this,v,N),it+=1/v[0])}++h;break;case Rw.DRAW_CHARS:const nt=r[1],ot=r[2],st=r[3];v=o?null:r[4];const at=r[5];C=r[6];const lt=r[7],ut=r
 [8],ht=r[9];T=r[10];const ct=r[11];b=r[12],S=r[13];const pt=[r[14],r[14]],dt=this.textStates[S],ft=dt.font,gt=[dt.scale[0]*ut,dt.scale[1]*ut];let yt;ft in this.widths_?yt=this.widths_[ft]:(yt={},this.widths_[ft]=yt);const mt=rw(a,nt,ot,2),_t=Math.abs(gt[0])*Fy(ft,b,yt);if(at||_t<=mt){const r=this.textStates[S].textAlign,i=Aw(a,nt,ot,2,b,(mt-_t)*Lw[r],lt,Math.abs(gt[0]),Fy,ft,yt,F?0:this.viewRotation_);if(i){let r,n,o,s,a,l=!1;if(T)for(r=0,n=i.length;r<n;++r)a=i[r],o=a[4],s=this.createLabel(o,S,"",T),d=a[2]+ct,f=st*s.height+2*(.5-st)*ct*gt[1]/gt[0]-ht,l=this.replayImageOrLabel_(t,e,a[0],a[1],s,d,f,v,s.height,1,0,0,a[3],pt,!1,s.width,Sy,null,null)||l;if(C)for(r=0,n=i.length;r<n;++r)a=i[r],o=a[4],s=this.createLabel(o,S,C,""),d=a[2],f=st*s.height-ht,l=this.replayImageOrLabel_(t,e,a[0],a[1],s,d,f,v,s.height,1,0,0,a[3],pt,!1,s.width,Sy,null,null)||l;l&&this.declutterItems.push(this,v,N)}}++h;break;case Rw.END_GEOMETRY:if(void 0!==o){N=r[1];const t=o(N);if(t)return t}++h;break;case Rw.FILL
 :k?R++:this.fill_(t),++h;break;case Rw.MOVE_TO_LINE_TO:for(E=r[1],p=r[2],j=a[E],D=a[E+1],m=j+.5|0,_=D+.5|0,m===g&&_===y||(t.moveTo(j,D),g=m,y=_),E+=2;E<p;E+=2)j=a[E],D=a[E+1],m=j+.5|0,_=D+.5|0,E!=p-2&&m===g&&_===y||(t.lineTo(j,D),g=m,y=_);++h;break;case Rw.SET_FILL_STYLE:I=r,this.alignFill_=r[2],R&&(this.fill_(t),R=0,P&&(t.stroke(),P=0)),t.fillStyle=r[1],++h;break;case Rw.SET_STROKE_STYLE:O=r,P&&(t.stroke(),P=0),this.setStrokeStyle_(t,r),++h;break;case Rw.STROKE:k?P++:t.stroke(),++h;break;default:++h}}R&&this.fill_(t),P&&t.stroke()}execute(t,e,r,i,n){this.viewRotation_=i,this.execute_(t,e,r,this.instructions,n,void 0,void 0)}executeHitDetection(t,e,r,i,n){return this.viewRotation_=r,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,n)}};const Uw=[ex,Jv,tx,Qv,rx,$v];const Yw={0:[[!0]]};function Ww(t,e,r){let i;const n=Math.floor(t.length/2);if(e>=n)for(i=n;i<e;i++)t[i][r]=!0;else if(e<n)for(i=e+1;i<n;i++)t[i][r]=!0}function Vw(t,e,r,i,n,o){const s=Object.keys(t).map(Number).sort
 (Ug);for(let a=0,l=s.length;a<l;++a){const l=t[s[a].toString()];let u;for(let t=0,s=l.length;t<s;){const s=l[t++],a=l[t++];s.execute(e,1,a,r,n),s!==u&&s.declutterItems.length>0&&(u=s,o.push({items:s.declutterItems,opacity:i}))}}}var Xw=class{constructor(t,e,r,i,n,o){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(n)}clip(t,e){const r=this.getClipCoords(e);t.beginPath(),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3]),t.lineTo(r[4],r[5]),t.lineTo(r[6],r[7]),t.clip()}createExecutors_(t){for(const e in t){let r=this.executorsByZIndex_[e];void 0===r&&(r={},this.executorsByZIndex_[e]=r);const i=t[e],n=[this.renderBuffer_||0,this.renderBuffer_||0];for(const t in i){const e=i[t];r[t]=new Bw(this.resolution_,this.pixelRatio_,this.overlaps_,e,n)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const r=this.executorsByZIndex_[e
 ];for(let e=0,i=t.length;e<i;++e)if(t[e]in r)return!0}return!1}forEachFeatureAtCoordinate(t,e,r,i,n,o){const s=2*(i=Math.round(i))+1,a=vy(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-r,-t[0],-t[1]);this.hitDetectionContext_||(this.hitDetectionContext_=Dg(s,s));const l=this.hitDetectionContext_;let u;l.canvas.width!==s||l.canvas.height!==s?(l.canvas.width=s,l.canvas.height=s):l.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(u=[1/0,1/0,-1/0,-1/0],Fm(u,t),xm(u,e*(this.renderBuffer_+i),u));const h=function(t){if(void 0!==Yw[t])return Yw[t];const e=2*t+1,r=new Array(e);for(let t=0;t<e;t++)r[t]=new Array(e);let i=t,n=0,o=0;for(;i>=n;)Ww(r,t+i,t+n),Ww(r,t+n,t+i),Ww(r,t-n,t+i),Ww(r,t-i,t+n),Ww(r,t-i,t-n),Ww(r,t-n,t-i),Ww(r,t+n,t-i),Ww(r,t+i,t-n),n++,o+=1+2*n,2*(o-i)+1>0&&(i-=1,o+=1-2*i);return Yw[t]=r,r}(i);let c;function p(t){const e=l.getImageData(0,0,s,s).data;for(let r=0;r<s;r++)for(let i=0;i<s;i++)if(h[r][i]&&e[4*(i*s+r)+3]>0){let e;return(!o||c!=Qv&&c!=rx||-1!==o.indexOf(t))&&(e=
 n(t)),e||void l.clearRect(0,0,s,s)}}const d=Object.keys(this.executorsByZIndex_).map(Number);let f,g,y,m,_;for(d.sort(Ug),f=d.length-1;f>=0;--f){const t=d[f].toString();for(y=this.executorsByZIndex_[t],g=Uw.length-1;g>=0;--g)if(c=Uw[g],m=y[c],void 0!==m&&(_=m.executeHitDetection(l,a,r,p,u),_))return _}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const r=e[0],i=e[1],n=e[2],o=e[3],s=[r,i,r,o,n,o,n,i];return Y_(s,0,8,2,t,s),s}isEmpty(){return Kg(this.executorsByZIndex_)}execute(t,e,r,i,n,o,s){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(Ug),this.maxExtent_&&(t.save(),this.clip(t,r));const l=o||Uw;let u,h,c,p,d,f;for(u=0,h=a.length;u<h;++u){const o=a[u].toString();for(d=this.executorsByZIndex_[o],c=0,p=l.length;c<p;++c){const a=l[c];if(f=d[a],void 0!==f)if(!s||a!=Qv&&a!=rx)f.execute(t,e,r,i,n);else{const t=s[o];t?t.push(f,r.slice(0)):s[o]=[f,r.slice(0)]}}}this.maxExtent_&&t.restore()}};function qw(t,e,r,i,n,o,s){const a=Dg(t[0]/2,t[1]/2);a.imageSmoothin
 gEnabled=!1;const l=a.canvas,u=new Hv(a,.5,n,null,s),h=r.length,c=Math.floor(16777215/h),p={};for(let t=1;t<=h;++t){const e=r[t-1],s=e.getStyleFunction()||i;if(!i)continue;let a=s(e,o);if(!a)continue;Array.isArray(a)||(a=[a]);const l="#"+("000000"+(t*c).toString(16)).slice(-6);for(let t=0,r=a.length;t<r;++t){const r=a[t],i=r.clone(),o=i.getFill();o&&o.setColor(l);const s=i.getStroke();s&&s.setColor(l),i.setText(void 0);const u=r.getImage();if(u){const t=u.getImageSize();if(!t)continue;const e=document.createElement("canvas");e.width=t[0],e.height=t[1];const r=e.getContext("2d",{alpha:!1});r.fillStyle=l;const n=r.canvas;r.fillRect(0,0,n.width,n.height),Dg(t?t[0]:n.width,t?t[1]:n.height).drawImage(n,0,0),i.setImage(new Jm({img:n,imgSize:t,anchor:u.getAnchor(),anchorXUnits:sm,anchorYUnits:sm,offset:u.getOrigin(),size:u.getSize(),opacity:u.getOpacity(),scale:u.getScale(),rotation:u.getRotation(),rotateWithView:u.getRotateWithView()}))}const h=Number(i.getZIndex());let c=p[h];c||(c={},p[
 h]=c,c[Xy]=[],c[Jy]=[],c[Wy]=[],c[Yy]=[]);const d=i.getGeometryFunction()(e);d&&Vm(n,d.getExtent())&&c[d.getType().replace("Multi","")].push(d,i)}}const d=Object.keys(p).map(Number).sort(Ug);for(let t=0,r=d.length;t<r;++t){const r=p[d[t]];for(const t in r){const i=r[t];for(let t=0,r=i.length;t<r;t+=2){u.setStyle(i[t+1]);for(let r=0,n=e.length;r<n;++r)u.setTransform(e[r]),u.drawGeometry(i[t])}}}return a.getImageData(0,0,l.width,l.height)}function Zw(t,e,r){const i=[];if(r){const n=4*(Math.round(t[0]/2)+Math.round(t[1]/2)*r.width),o=r.data[n],s=r.data[n+1],a=r.data[n+2]+256*(s+256*o),l=Math.floor(16777215/e.length);a&&a%l==0&&i.push(e[a/l-1])}return i}var Kw=class extends mw{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.dirty_=!1,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRot
 ation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0}useContainer(t,e,r){r<1&&(t=null),super.useContainer(t,e,r)}renderFrame(t,e){const r=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];!function(t,e,r){yy(t,e,0,0,r,0,0)}(this.pixelTransform,1/r,1/r),xy(this.inversePixelTransform,this.pixelTransform);const n=wy(this.pixelTransform);this.useContainer(e,n,i.opacity);const o=this.context,s=o.canvas,a=this.replayGroup_;if(!a||a.isEmpty())return!this.containerReused&&s.width>0&&(s.width=0),this.container;const l=Math.round(t.size[0]*r),u=Math.round(t.size[1]*r);s.width!=l||s.height!=u?(s.width=l,s.height=u,s.style.transform!==n&&(s.style.transform=n)):this.containerReused||o.clearRect(0,0,l,u),this.preRender(o,t);const h=t.extent,c=t.viewState,p=c.center,d=c.resolution,f=c.projection,g=c.rotation,y=f.getExtent(),m=this.getLayer().getSource();let _=!1;if(i.extent){const e=G_(i.extent,f);_=!Tm(e,t.ex
 tent)&&Vm(e,t.extent),_&&this.clipUnrotated(o,t,e)}const v=t.viewHints,x=!(v[dx]||v[fx]),w=this.getRenderTransform(p,d,g,r,l,u,0),b=this.getLayer().getDeclutter()?{}:null;if(a.execute(o,1,w,g,x,void 0,b),m.getWrapX()&&f.canWrapX()&&!Tm(y,h)){let t=h[0];const e=Wm(y);let i,n=0;for(;t<y[0];){--n,i=e*n;const s=this.getRenderTransform(p,d,g,r,l,u,i);a.execute(o,1,s,g,x,void 0,b),t+=e}for(n=0,t=h[2];t>y[2];){++n,i=e*n;const s=this.getRenderTransform(p,d,g,r,l,u,i);a.execute(o,1,s,g,x,void 0,b),t-=e}}if(b){const e=t.viewHints;Vw(b,o,g,1,!(e[dx]||e[fx]),t.declutterItems)}_&&o.restore(),this.postRender(o,t);const S=i.opacity,T=this.container;return S!==parseFloat(T.style.opacity)&&(T.style.opacity=1===S?"":String(S)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e,r){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.conte
 xt.canvas.height];my(this.pixelTransform,t);const e=this.renderedCenter_,r=this.renderedResolution_,i=this.renderedRotation_,n=this.renderedProjection_,o=this.renderedExtent_,s=this.getLayer(),a=[],l=t[0]/2,u=t[1]/2;a.push(this.getRenderTransform(e,r,i,.5,l,u,0).slice());const h=s.getSource(),c=n.getExtent();if(h.getWrapX()&&n.canWrapX()&&!Tm(c,o)){let t=o[0];const n=Wm(c);let s,h=0;for(;t<c[0];)--h,s=n*h,a.push(this.getRenderTransform(e,r,i,.5,l,u,s).slice()),t+=n;for(h=0,t=o[2];t>c[2];)++h,s=n*h,a.push(this.getRenderTransform(e,r,i,.5,l,u,s).slice()),t-=n}this.hitDetectionImageData_=qw(t,a,this.renderedFeatures_,s.getStyleFunction(),o,r,i)}e(Zw(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,r,i,n){if(this.replayGroup_){const o=e.viewState.resolution,s=e.viewState.rotation,a=this.getLayer(),l={};return this.replayGroup_.forEachFeatureAtCoordinate(t,o,s,r,(function(t){const e=gg(t);if(!(e in l))return l[e]=!0,i(t,a)}),a.getDeclutte
 r()?n:null)}}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),r=e.getSource();if(!r)return!1;const i=t.viewHints[dx],n=t.viewHints[fx],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&i||!s&&n)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=e.getRevision(),d=e.getRenderBuffer();let f=e.getRenderOrder();void 0===f&&(f=nx);const g=l.center.slice(),y=xm(a,d*h),m=[y.slice()],_=u.getExtent();if(r.getWrapX()&&u.canWrapX()&&!Tm(_,t.extent)){const t=Wm(_),e=Math.max(Wm(y)/2,t);y[0]=_[0]-e,y[2]=_[2]+e,C_(g,u);const r=function(t,e){const r=e.getExtent(),i=Gm(t);if(e.canWrapX()&&(i[0]<r[0]||i[0]>=r[2])){const e=Wm(r),n=Math.floor((i[0]-r[0])/e)*e;t[0]-=n,t[2]-=n}return t}(m[0],u);r[0]<_[0]&&r[2]<_[2]?m.push([r[0]+t,r[1]
 ,r[2]+t,r[3]]):r[0]>_[0]&&r[2]>_[2]&&m.push([r[0]-t,r[1],r[2]-t,r[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==f&&Tm(this.renderedExtent_,y))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;const v=new Fw(sx(h,c),y,h,c,e.getDeclutter()),x=j_();let w;if(x){for(let t=0,e=m.length;t<e;++t)r.loadFeatures(D_(m[t],u),h,x);w=F_(x,u)}else for(let t=0,e=m.length;t<e;++t)r.loadFeatures(m[t],h,u);const b=ox(h,c),S=function(t){let r;const i=t.getStyleFunction()||e.getStyleFunction();if(i&&(r=i(t,h)),r){const e=this.renderFeature(t,b,r,v,w);this.dirty_=this.dirty_||e}}.bind(this),T=D_(y,u),C=r.getFeaturesInExtent(T);f&&C.sort(f);for(let t=0,e=C.length;t<e;++t)S(C[t]);this.renderedFeatures_=C;const E=v.finish(),R=new Xw(y,h,c,r.getOverlaps(),E,e.getRenderBuffer());return this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=f,this.renderedExtent_=y,this.renderedCenter_=g,this.renderedProj
 ection_=u,this.replayGroup_=R,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,r,i,n){if(!r)return!1;let o=!1;if(Array.isArray(r))for(let s=0,a=r.length;s<a;++s)o=ax(i,t,r[s],e,this.boundHandleStyleImageChange_,n)||o;else o=ax(i,t,r,e,this.boundHandleStyleImageChange_,n);return o}};var Hw=class extends ww{constructor(t){super(t)}createRenderer(){return new Kw(this)}},Jw="image",$w="hybrid",Qw="vector";const tb={image:[ex,Jv,tx,Qv,rx],hybrid:[ex,tx],vector:[]},eb={image:[$v],hybrid:[Qv,rx,$v],vector:[ex,Jv,tx,Qv,rx,$v]};var rb=class extends vw{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.dirty_=!1,this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderTileImageQueue_={},this.tileListenerKeys_={},this.tmpTransform_=[1,0,0,1,0,0]}prepareTile(t,e,r,i){let n;const o=gg(t),s=t.getState();return(s===hx&&t.hifi||s===cx)&&o in this.tileListenerKeys_&&
 (iy(this.tileListenerKeys_[o]),delete this.tileListenerKeys_[o]),s!==hx&&s!==cx||(this.updateExecutorGroup_(t,e,r),this.tileImageNeedsRender_(t,e,r)&&(n=!0,i&&(this.renderTileImageQueue_[o]=t))),n}getTile(t,e,r,i){const n=i.pixelRatio,o=i.viewState,s=o.resolution,a=o.projection,l=this.getLayer(),u=l.getSource().getTile(t,e,r,n,a);if(u.getState()<hx){u.wantedResolution=s;const t=gg(u);if(!(t in this.tileListenerKeys_)){const e=ey(u,Jg,this.prepareTile.bind(this,u,n,a,!0));this.tileListenerKeys_[t]=e}}else{const t=i.viewHints;!!(t[dx]||t[fx])&&u.wantedResolution||(u.wantedResolution=s),this.prepareTile(u,n,a,!1)&&l.getRenderMode()!==Qw&&this.renderTileImage_(u,i)}return super.getTile(t,e,r,i)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()===Qw?gg(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!=e&&(this.rendere
 dTiles.length=0),this.renderedLayerRevision_=e,super.prepareFrame(t)}updateExecutorGroup_(t,e,r){const i=this.getLayer(),n=i.getRevision(),o=i.getRenderOrder()||null,s=t.wantedResolution,a=t.getReplayState(i);if(!a.dirty&&a.renderedResolution===s&&a.renderedRevision==n&&a.renderedRenderOrder==o&&a.renderedZ===t.sourceZ)return;const l=i.getSource(),u=l.getTileGrid(),h=l.getTileGridForProjection(r).getTileCoordExtent(t.wrappedTileCoord),c=l.getSourceTiles(e,r,t),p=gg(i);delete t.hitDetectionImageData[p],t.executorGroups[p]=[];for(let r=0,n=c.length;r<n;++r){const n=c[r];if(n.getState()!=hx)continue;const d=n.tileCoord,f=u.getTileCoordExtent(d),g=Bm(h,f),y=Lm(f,g)?null:xm(g,i.getRenderBuffer()*s,this.tmpExtent);a.dirty=!1;const m=new Fw(0,g,s,e,i.getDeclutter()),_=ox(s,e),v=function(t){let e;const r=t.getStyleFunction()||i.getStyleFunction();if(r&&(e=r(t,s)),e){const r=this.renderFeature(t,_,e,m);this.dirty_=this.dirty_||r,a.dirty=a.dirty||r}},x=n.getFeatures();o&&o!==a.renderedRenderO
 rder&&x.sort(o);for(let t=0,e=x.length;t<e;++t){const e=x[t];y&&!Vm(y,e.getGeometry().getExtent())||v.call(this,e)}const w=m.finish(),b=i.getRenderMode()!==Qw&&i.getDeclutter()&&1===c.length?null:g,S=new Xw(b,s,e,l.getOverlaps(),w,i.getRenderBuffer());t.executorGroups[p].push(S)}a.renderedRevision=n,a.renderedZ=t.sourceZ,a.renderedRenderOrder=o,a.renderedResolution=s}forEachFeatureAtCoordinate(t,e,r,i,n){const o=e.viewState.resolution,s=e.viewState.rotation;r=null==r?0:r;const a=this.getLayer(),l=a.getDeclutter(),u=a.getSource().getTileGridForProjection(e.viewState.projection),h={},c=this.renderedTiles;let p,d,f;for(d=0,f=c.length;d<f;++d){const e=c[d],f=Sm(u.getTileCoordExtent(e.wrappedTileCoord),t);if(!l&&!f)continue;const g=e.executorGroups[gg(a)];for(let e=0,l=g.length;e<l;++e){const l=g[e];p=p||l.forEachFeatureAtCoordinate(t,o,s,r,(function(t){if(f||n&&-1!==n.indexOf(t)){let e=t.getId();if(void 0===e&&(e=gg(t)),!(e in h))return h[e]=!0,i(t,a)}}),a.getDeclutter()?n:null)}}return
  p}getFeatures(t){return new Promise(function(e,r){const i=this.getLayer(),n=gg(i),o=i.getSource(),s=this.renderedProjection,a=s.getExtent(),l=this.renderedResolution,u=o.getTileGridForProjection(s),h=my(this.renderedPixelToCoordinateTransform_,t.slice()),c=u.getTileCoordForCoordAndResolution(h,l);let p;for(let t=0,e=this.renderedTiles.length;t<e;++t)if(c.toString()===this.renderedTiles[t].tileCoord.toString()){if(p=this.renderedTiles[t],p.getState()===hx&&p.hifi){const t=u.getTileCoordExtent(p.tileCoord);o.getWrapX()&&s.canWrapX()&&!Tm(a,t)&&C_(h,s);break}p=void 0}if(!p||p.loadingSourceTiles>0)return void e([]);const d=Um(u.getTileCoordExtent(p.wrappedTileCoord)),f=[(h[0]-d[0])/l,(d[1]-h[1])/l],g=p.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let y=p.hitDetectionImageData[n];if(!y&&!this.animatingOrInteracting_){const t=yg(u.getTileSize(u.getZForResolution(l))),e=[t[0]/2,t[1]/2],r=this.renderedRotation_;y=qw(t,[this.getRenderTransform(u.getTileCoord
 Center(p.wrappedTileCoord),l,0,.5,e[0],e[1],0)],g,i.getStyleFunction(),u.getTileCoordExtent(p.wrappedTileCoord),p.getReplayState(i).renderedResolution,r),p.hitDetectionImageData[n]=y}e(Zw(f,g,y))}.bind(this))}handleFontsChanged(){Zg(this.renderTileImageQueue_);const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderFrame(t,e){const r=t.viewHints,i=!(r[dx]||r[fx]);this.renderQueuedTileImages_(i,t),super.renderFrame(t,e),this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;const n=this.getLayer(),o=n.getRenderMode();if(o===Jw)return this.container;const s=n.getSource(),a=t.usedTiles[gg(s)];for(const t in this.renderTileImageQueue_)a&&t in a||delete this.renderTileImageQueue_[t];const l=this.context,u=n.getDeclutter()?{}:null,h=eb[o],c=t.pixelRatio,p=t.viewState,d=p.center,f=p.resolution,g=p.rotation,y=t.size,m=Math.round
 (y[0]*c),_=Math.round(y[1]*c),v=this.renderedTiles,x=s.getTileGridForProjection(t.viewState.projection),w=[],b=[];for(let t=v.length-1;t>=0;--t){const e=v[t],r=e.tileCoord,o=x.getTileCoordExtent(e.wrappedTileCoord),s=x.getTileCoordExtent(r,this.tmpExtent)[0]-o[0],a=gy(_y(this.inversePixelTransform.slice(),1/c,1/c),this.getRenderTransform(d,f,g,c,m,_,s)),p=e.executorGroups[gg(n)];let y=!1;for(let t=0,r=p.length;t<r;++t){const r=p[t];if(!r.hasExecutors(h))continue;const n=e.tileCoord[0];let o;if(!u&&!y){o=r.getClipCoords(a),l.save();for(let t=0,e=w.length;t<e;++t){const e=w[t];n<b[t]&&(l.beginPath(),l.moveTo(o[0],o[1]),l.lineTo(o[2],o[3]),l.lineTo(o[4],o[5]),l.lineTo(o[6],o[7]),l.moveTo(e[6],e[7]),l.lineTo(e[4],e[5]),l.lineTo(e[2],e[3]),l.lineTo(e[0],e[1]),l.clip())}}r.execute(l,1,a,g,i,h,u),u||y||(l.restore(),w.push(o),b.push(n),y=!0)}}if(u){Vw(u,l,g,t.layerStatesArray[t.layerIndex].opacity,i,t.declutterItems)}return this.container}renderQueuedTileImages_(t,e){for(const r in this.ren
 derTileImageQueue_){if(!t&&Date.now()-e.time>8){e.animate=!0;break}const i=this.renderTileImageQueue_[r];delete this.renderTileImageQueue_[r],this.renderTileImage_(i,e)}}renderFeature(t,e,r,i){if(!r)return!1;let n=!1;if(Array.isArray(r))for(let o=0,s=r.length;o<s;++o)n=ax(i,t,r[o],e,this.boundHandleStyleImageChange_)||n;else n=ax(i,t,r,e,this.boundHandleStyleImageChange_);return n}tileImageNeedsRender_(t,e,r){const i=this.getLayer(),n=t.getReplayState(i),o=i.getRevision(),s=t.sourceZ,a=t.wantedResolution;return n.renderedTileResolution!==a||n.renderedTileRevision!==o||n.renderedTileZ!==s}renderTileImage_(t,e){const r=this.getLayer(),i=t.getReplayState(r),n=r.getRevision(),o=t.executorGroups[gg(r)];i.renderedTileRevision=n,i.renderedTileZ=t.sourceZ;const s=t.wrappedTileCoord,a=s[0],l=r.getSource();let u=e.pixelRatio;const h=e.viewState.projection,c=l.getTileGridForProjection(h),p=c.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*p,f=c.getResolution(a),g=t.getContext(r
 );u=Math.max(u,d/u);const y=l.getTilePixelSize(a,u,h);g.canvas.width=y[0],g.canvas.height=y[1];const m=u/d;if(1!==m){const t=fy(this.tmpTransform_);_y(t,m,m),g.setTransform.apply(g,t)}const _=c.getTileCoordExtent(s,this.tmpExtent),v=d/f,x=fy(this.tmpTransform_);_y(x,v,-v),function(t,e,r){gy(t,yy(dy,1,0,0,1,e,r))}(x,-_[0],-_[3]);for(let t=0,e=o.length;t<e;++t){o[t].execute(g,m,x,0,!0,tb[r.getRenderMode()])}i.renderedTileResolution=t.wantedResolution}};var ib=class extends ww{constructor(t){const e=t||{},r=qg({},e);delete r.preload,delete r.useInterimTilesOnError,super(r);const i=e.renderMode||$w;wg(null==i||i==Jw||i==$w||i==Qw,28),this.renderMode_=i,this.setPreload(e.preload?e.preload:0),this.setUseInterimTilesOnError(void 0===e.useInterimTilesOnError||e.useInterimTilesOnError)}createRenderer(){return new rb(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(fw)}getUseInterimTilesOnError(){return this.get(gw)}setPrelo
 ad(t){this.set(fw,t)}setUseInterimTilesOnError(t){this.set(gw,t)}};var nb,ob=/font-family: ?([^;]*);/,sb=/("|')/g;function ab(t){if(!nb){nb={};for(var e=document.styleSheets,r=0,i=e.length;r<i;++r){var n=e[r];try{var o=n.rules||n.cssRules;if(o)for(var s=0,a=o.length;s<a;++s){var l=o[s];if(5==l.type){var u=l.cssText.match(ob);nb[u[1].replace(sb,"")]=!0}}}catch(t){}}}return t in nb}var lb={},ub=bv.a.getNames();function hb(t){var e=t.toString();if(e in lb)return t;for(var r=t.map((function(t){var e=lg()(t,1).split(" ");return[e.slice(3).join(" ").replace(/"/g,""),e[1]+e[0]]})),i=0,n=r.length;i<n;++i){var o=r[i],s=o[0];if(!ab(s)&&-1!==ub.indexOf(s)){var a="https://fonts.googleapis.com/css?family="+s.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+a+'"]')){var l=document.createElement("link");l.href=a,l.rel="stylesheet",document.head.appendChild(l)}}}return lb[e]=!0,t}var cb=/^(.*)(\?.*)$/;function pb(t,e){return e&&0===t.indexOf(".")&&(t=e+t),t}function db(t,e,r){var
  i=(t=pb(t,e)).match(cb);return i?i[1]+r+(i.length>2?i[2]:""):t+r}function fb(t,e,r,i,n){return new Promise((function(o,s){if("object"!=typeof e&&(e=JSON.parse(e)),8!=e.version)return s(new Error("glStyle version 8 required."));if(!(t instanceof Hw||t instanceof ib))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,l,u;function h(){u||e.sprite&&!a?u?(t.setStyle(u),o()):s(new Error("Something went wrong trying to apply style.")):(u=xv(t,e,r,n,a,l,hb),t.getStyle()?o():s(new Error("Nothing to show for source ["+r+"]")))}if(e.sprite){var c=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",p=db(e.sprite,i,c+".json");fetch(p,{credentials:"same-origin"}).then((function(t){return t.ok||""===c?t:(p=db(e.sprite,i,".json"),fetch(p,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();s(new Error("Problem fetching sprite from "+p+": "+t.statusText))})).then((function(t){if(void 0===t||0===Object.keys(t).length)return s(new Error("No sprites found.
 "));a=t,l=db(e.sprite,i,c+".png"),h()})).catch((function(t){s(new Error("Sprites cannot be loaded: "+p+": "+t.message))}))}else h()}))}new dw;var gb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function yb(t){return 0!==t.indexOf("mapbox://")?"":t.slice("mapbox://".length)}var mb=function(t){function e(e){var r=t.call(this,L)||this;return r.error=e,r}return gb(e,t),e}(h),_b="vector",vb=function(t){function e(e){var r=this,i=!("declutter"in e)||e.declutter,n=new hd({state:Tn,format:new ng});return(r=t.call(this,{source:n,declutter:i,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,rende
 rOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError})||this).sourceId=e.source,r.layers=e.layers,r.accessToken=e.accessToken,r.fetchStyle(e.styleUrl),r}return gb(e,t),e.prototype.fetchStyle=function(t){var e=this,r=function(t,e){var r=yb(t);if(!r)return t;if(0!==r.indexOf("styles/"))throw new Error("unexpected style url: "+t);return"https://api.mapbox.com/styles/v1/"+r.slice("styles/".length)+"?&access_token="+e}(t,this.accessToken);fetch(r).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: "+t.status);return t.json()})).then((function(t){e.onStyleLoad(t)})).catch((function(t){e.handleError(t)}))},e.prototype.onStyleLoad=function(t){var e,r,i=this;if(this.layers){for(var n={},o=0;o<t.layers.length;++o){var s=t.layers[o];s.source&&(n[s.id]=s.source)}var a=void 0;f
 or(o=0;o<this.layers.length;++o){var l=n[this.layers[o]];if(!l)return void this.handleError(new Error("could not find source for "+this.layers[o]));if(a){if(a!==l)return void this.handleError(new Error("layers can only use a single source, found "+a+" and "+l))}else a=l}e=a,r=this.layers}else r=e=this.sourceId;r||(r=e=Object.keys(t.sources)[0]),t.sprite&&(t.sprite=function(t,e){var r=yb(t);if(!r)return t;if(0!==r.indexOf("sprites/"))throw new Error("unexpected sprites url: "+t);return"https://api.mapbox.com/styles/v1/"+r.slice("sprites/".length)+"/sprite?access_token="+e}(t.sprite,this.accessToken)),t.glyphs&&(t.glyphs=function(t,e){var r=yb(t);if(!r)return t;if(0!==r.indexOf("fonts/"))throw new Error("unexpected fonts url: "+t);return"https://api.mapbox.com/fonts/v1/"+r.slice("fonts/".length)+"/0-255.pbf?access_token="+e}(t.glyphs,this.accessToken));var u=t.sources[e];if(u.type===_b){var h,c,p,d=this.getSource();d.setUrl((h=u.url,c=this.accessToken,(p=yb(h))?"https://{a-d}.tiles.ma
 pbox.com/v4/"+p+"/{z}/{x}/{y}.vector.pbf?access_token="+c:h)),fb(this,t,r).then((function(){d.setState(Cn)})).catch((function(t){i.handleError(t)}))}else this.handleError(new Error("only works for vector sources, found "+u.type))},e.prototype.handleError=function(t){this.dispatchEvent(new mb(t)),this.getSource().setState(En)},e}(sg),xb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),wb=function(t){function e(e){var r=this,i=e||{},n=T({},i);return delete n.imageRatio,(r=t.call(this,n)||this).imageRatio_=void 0!==i.imageRatio?i.imageRatio:1,r}return xb(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new df(this)},e}(_d),bb=function(){var t=functi
 on(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Sb="addfeatures",Tb=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.features=i,o.file=r,o.projection=n,o}return bb(e,t),e}(h),Cb=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{handleEvent:w})||this).formatConstructors_=i.formatConstructors?i.formatConstructors:[],r.projection_=i.projection?gr(i.projection):null,r.dropListenKeys_=null,r.source_=i.source||null,r.target=i.target?i.target:null,r}return bb(e,t),e.prototype.handleResult_=function(t,e){var r=e.target.result,i=this.getMap(),n=this.projection_;n||(n=i.getView().getProjection());for(var o=this.formatConstructors_,s=0,a=o.length;s<a;++s){var l=new o[s],u=this.tryReadFeatures_(l,r,{featur
 eProjection:n});if(u&&u.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(u)),this.dispatchEvent(new Tb(Sb,t,u,n));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[W(e,j,this.handleDrop,this),W(e,k,this.handleStop,this),W(e,N,this.handleStop,this),W(e,j,this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,r){try{return t.readFeatures(e,r)}catch(t){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(X),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,r=0,i
 =e.length;r<i;++r){var n=e.item(r),o=new FileReader;o.addEventListener(z,this.handleResult_.bind(this,n)),o.readAsText(n)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(Qs),Eb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Rb=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,i)||this).condition_=i.condition?i.condition:ga,r.lastAngle_=void 0,r.lastMagnitude_=void 0,r.lastScaleDelta_=0,r.duration_=void 0!==i.duration?i.duration:400,r}return Eb(e,t),e.prototype.handleDragEvent=function(t){if(ma(t)){var e=t.map,r=e.getSize(),i=t.pixel,n=i[0]-r[0]/2,o=r[1]/2-i[1],s=Math.atan2(o,n),a=Math.sqrt(n*n+o*o),l=e.getView();if(void 0!==th
 is.lastAngle_){var u=this.lastAngle_-s;l.adjustRotationInternal(u)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&l.adjustResolutionInternal(this.lastMagnitude_/a),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/a),this.lastMagnitude_=a}},e.prototype.handleUpEvent=function(t){if(!ma(t))return!0;var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!ma(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(na),Pb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ib=function(t){function e(e,r,i){var n=t.call(
 this)||this;if(void 0!==i&&void 0===r)n.setFlatCoordinates(i,e);else{var o=r||0;n.setCenterAndRadius(e,o,i)}return n}return Pb(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,r,i){var n=this.flatCoordinates,o=t-n[0],s=e-n[1],a=o*o+s*s;if(a<i){if(0===a)for(var l=0;l<this.stride;++l)r[l]=n[l];else{var u=this.getRadius()/Math.sqrt(a);r[0]=n[0]+u*o,r[1]=n[1]+u*s;for(l=2;l<this.stride;++l)r[l]=n[l]}return r.length=this.stride,a}return i},e.prototype.containsXY=function(t,e){var r=this.flatCoordinates,i=t-r[0],n=e-r[1];return i*i+n*n<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,r=e[this.stride]-e[0];return qt(e[0]-r,e[1]-r,e[0]+r,e[1]+r,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCo
 ordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return gt.CIRCLE},e.prototype.intersectsExtent=function(t){if(ge(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||ie(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],i=t.slice();i[e]=i[0]+r;for(var n=1;n<e;++n)i[e+n]=t[n];this.setFlatCoordinates(this.layout,i),this.changed()},e.prototype.setCenterAndRadius=function(t,e,r){this.setLayout(r,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var i=this.flatCoordinates,n=Hr(i,0,t,this.stride);i[n++]=i[0]+e;for(var o=1,s=this.stride;o<s;++o)i[n++]=i[o];i.length=n,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.
 stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var r=this.getCenter(),i=this.getStride();this.setCenter(jr(r,0,r.length,i,t,e,r)),this.changed()},e.prototype.translate=function(t,e){var r=this.getCenter(),i=this.getStride();this.setCenter(Dr(r,0,r.length,i,t,e,r)),this.changed()},e}(Wr);Ib.prototype.transform;var Ob=Ib,Lb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Mb="Point",Fb="LineString",Ab="Polygon",kb="Circle",Nb="drawstart",jb="drawend",Db="drawabort",Gb=function(t){function e(e,r){var i=t.call(this,e)||this;return i.feature=r,i}return Lb(e,t),e}(h);var zb=function(t){function e(e){var r=this,i=e;i.stopDown||(i.stopDown=b),(r=t.call(this,i)||this).shouldHandle_
 =!1,r.downPx_=null,r.downTimeout_,r.lastDragTime_,r.freehand_=!1,r.source_=e.source?e.source:null,r.features_=e.features?e.features:null,r.snapTolerance_=e.snapTolerance?e.snapTolerance:12,r.type_=e.type,r.mode_=function(t){var e;t===gt.POINT||t===gt.MULTI_POINT?e=Mb:t===gt.LINE_STRING||t===gt.MULTI_LINE_STRING?e=Fb:t===gt.POLYGON||t===gt.MULTI_POLYGON?e=Ab:t===gt.CIRCLE&&(e=kb);return(e)}(r.type_),r.stopClick_=!!e.stopClick,r.minPoints_=e.minPoints?e.minPoints:r.mode_===Ab?3:2,r.maxPoints_=e.maxPoints?e.maxPoints:1/0,r.finishCondition_=e.finishCondition?e.finishCondition:w;var n,o=e.geometryFunction;if(!o)if(r.type_===gt.CIRCLE)o=function(t,e,r){var i=e||new Ob([NaN,NaN]),n=Mr(t[0],r),o=sr(n,Mr(t[1],r));i.setCenterAndRadius(n,Math.sqrt(o));var s=Or();return s&&i.transform(r,s),i};else{var s,a=r.mode_;a===Mb?s=pi:a===Fb?s=Tf:a===Ab&&(s=Pi),o=function(t,e,r){var i=e;return i?a===Ab?t[0].length?i.setCoordinates([t[0].concat([t[0][0]])]):i.setCoordinates([]):i.setCoordinates(t):i=new s
 (t),i}}return r.geometryFunction_=o,r.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,r.finishCoordinate_=null,r.sketchFeature_=null,r.sketchPoint_=null,r.sketchCoords_=null,r.sketchLine_=null,r.sketchLineCoords_=null,r.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,r.overlay_=new Ef({source:new uc({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(n=oh(),function(t,e){return n[t.getGeometry().getType()]}),updateWhileInteracting:!0}),r.geometryName_=e.geometryName,r.condition_=e.condition?e.condition:fa,r.freehandCondition_,e.freehand?r.freehandCondition_=ha:r.freehandCondition_=e.freehandCondition?e.freehandCondition:ga,r.addEventListener(tt(Hs),r.updateState_),r}return Lb(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===M&&e.preventDefault(),this.freehand_=this.m
 ode_!==Mb&&this.freehandCondition_(e);var r=e.type===Zo.POINTERMOVE,i=!0;!this.freehand_&&this.lastDragTime_&&e.type===Zo.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,r=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===Zo.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===Zo.POINTERDOWN?i=!1:r?(i=e.type===Zo.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.preventDefault()):("mouse"==e.originalEvent.pointerType||e.type===Zo.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===Zo.DBLCLICK&&(i=!1),t.prototype.handleEvent.call(this,e)&&i},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this
 .startDrawing_(t),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new qo(Zo.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);var r=this.mode_===kb;return this.shouldHandle_?(this.finishCoordinate_?this.freehand_||r?this.finishDrawing():this.atFinish_(t)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate):(this.startDrawing_(t),this.mode_===Mb&&this.finishDrawing()),e=!1):this.freehand_&&this.abortDrawing(),!e&&this.stopClick_&&t.stopPropagation(),e},e.prototype.handlePointerMove_=function(t){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,r=t.pixel,i=e[0]-r[0],n=e[1]-r[1],o=i*i+n*n
 ;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t):this.createOrUpdateSketchPoint_(t)},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var r=!1,i=[this.finishCoordinate_];if(this.mode_===Fb)r=this.sketchCoords_.length>this.minPoints_;else if(this.mode_===Ab){var n=this.sketchCoords_;r=n[0].length>this.minPoints_,i=[n[0][0],n[0][n[0].length-2]]}if(r)for(var o=t.map,s=0,a=i.length;s<a;s++){var l=i[s],u=o.getPixelFromCoordinate(l),h=t.pixel,c=h[0]-u[0],p=h[1]-u[1],d=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(c*c+p*p)<=d){this.finishCoordinate_=l;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){var e=t.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new ht(new pi(e)),this.updateSketchFeatures_())},e.prototype.startDrawing_=function(t){var e=t.coordinate,r=t.map.ge
 tView().getProjection();this.finishCoordinate_=e,this.mode_===Mb?this.sketchCoords_=e.slice():this.mode_===Ab?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new ht(new Tf(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,r);this.sketchFeature_=new ht,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Gb(Nb,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,r,i,n=t.coordinate,o=this.sketchFeature_.getGeometry(),s=t.map.getView().getProjection();(this.mode_===Mb?r=this.sketchCoords_:this.mode_===Ab?(r=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(t)&&(n=this.finishCoordinate_.slice())):r=(e=this.sketchCoords_)[e.length-1],r[0]=n[0],r[1]=n[1],this.geometryFunction_(this.sketchCoords_,o,s),this.sket
 chPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(n);if(o.getType()==gt.POLYGON&&this.mode_!==Ab){this.sketchLine_||(this.sketchLine_=new ht);var a=o.getLinearRing(0);(i=this.sketchLine_.getGeometry())?(i.setFlatCoordinates(a.getLayout(),a.getFlatCoordinates()),i.changed()):(i=new Tf(a.getFlatCoordinates(),a.getLayout()),this.sketchLine_.setGeometry(i))}else this.sketchLineCoords_&&(i=this.sketchLine_.getGeometry()).setCoordinates(this.sketchLineCoords_);this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,r,i=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();this.mode_===Fb?(this.finishCoordinate_=t.slice(),(r=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),this.geometryFunction_(r,i,n)):this.mode_===Ab&&((r=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),e&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,i,n)),t
 his.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection();this.mode_===Fb?((t=this.sketchCoords_).splice(-2,1),this.geometryFunction_(t,e,r),t.length>=2&&(this.finishCoordinate_=t[t.length-2].slice())):this.mode_===Ab&&((t=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,r)),0===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,r=t.getGeometry(),i=this.getMap().getView().getProjection();this.mode_===Fb?(e.pop(),this.geometryFunction_(e,r,i)):this.mode_===Ab&&(e[0].pop(),this.geometryFunction_(e,r,i),e=r.getCoordinates()),this.type_===gt.MULTI_POINT?t.setGeometry(new Wf([e])):this.type_===gt.MULTI_LINE_STRING?t.setGeometry(new Uf([e])):this.type_===gt.MULTI_POLY
 GON&&t.setGeometry(new qf([e])),this.dispatchEvent(new Gb(jb,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Gb(Db,t))},e.prototype.appendCoordinates=function(t){var e=this.mode_,r=[];e===Fb?r=this.sketchCoords_:e===Ab&&(r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]);for(var i=r.pop(),n=0;n<t.length;n++)this.addToDrawing_(t[n]);this.addToDrawing_(i)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.updateSketchFeatures_(),this.dispatchEvent(
 new Gb(Nb,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(na),Bb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ub="extentchanged",Yb=function(t){function e(e){var r=t.call(this,Ub)||this;return r.extent=e,r}return Bb(e,t),e}(h);function Wb(){var t=oh();return function(e,r){return t[gt.POINT]}}function Vb(t){return function(e){return Dt([t,e])}}func
 tion Xb(t,e){return t[0]==e[0]?function(r){return Dt([t,[r[0],e[1]]])}:t[1]==e[1]?function(r){return Dt([t,[e[0],r[1]]])}:null}var qb=function(t){function e(e){var r,i=this,n=e||{};return(i=t.call(this,n)||this).condition_=n.condition?n.condition:ha,i.extent_=null,i.pointerHandler_=null,i.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.snappedToVertex_=!1,i.extentFeature_=null,i.vertexFeature_=null,e||(e={}),i.extentOverlay_=new Ef({source:new uc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:(r=oh(),function(t,e){return r[gt.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.vertexOverlay_=new Ef({source:new uc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:Wb(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&i.setExtent(e.extent),i}return Bb(e,t),e.prototype.snapToVertex_=function(t,e){var r=e.getCoordinateFromPixelInternal(t),i=this.getExtentInternal();if(i){var n=function(t){return[[[t[0],t
 [1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(i);n.sort((function(t,e){return lr(r,t)-lr(r,e)}));var o=n[0],s=tr(r,o),a=e.getPixelFromCoordinateInternal(s);if(ar(t,a)<=this.pixelTolerance_){var l=e.getPixelFromCoordinateInternal(o[0]),u=e.getPixelFromCoordinateInternal(o[1]),h=sr(a,l),c=sr(a,u),p=Math.sqrt(Math.min(h,c));return this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(s=h>c?o[1]:o[0]),s}}return null},e.prototype.handlePointerMove_=function(t){var e=t.pixel,r=t.map,i=this.snapToVertex_(e,r);i||(i=r.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(i)},e.prototype.createOrUpdateExtentFeature_=function(t){var e=this.extentFeature_;return e?t?e.setGeometry(Oi(t)):e.setGeometry(void 0):(e=new ht(t?Oi(t):{}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e},e.prototype.createOrUpdatePointerFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates
 (t):(e=new ht(new pi(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||!this.condition_(e)||(e.type!=Zo.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),t.prototype.handleEvent.call(this,e),!1)},e.prototype.handleDownEvent=function(t){var e=t.pixel,r=t.map,i=this.getExtentInternal(),n=this.snapToVertex_(e,r),o=function(t){var e=null,r=null;return t[0]==i[0]?e=i[2]:t[0]==i[2]&&(e=i[0]),t[1]==i[1]?r=i[3]:t[1]==i[3]&&(r=i[1]),null!==e&&null!==r?[e,r]:null};if(n&&i){var s=n[0]==i[0]||n[0]==i[2]?n[0]:null,a=n[1]==i[1]||n[1]==i[3]?n[1]:null;null!==s&&null!==a?this.pointerHandler_=Vb(o(n)):null!==s?this.pointerHandler_=Xb(o([s,i[1]]),o([s,i[3]])):null!==a&&(this.pointerHandler_=Xb(o([i[0],a]),o([i[2],a])))}else n=r.getCoordinateFromPixelInternal(e),this.setExtent([n[0],n[1],n[0],n[1]]),this.pointerHandler_=Vb(n);return!0},e.prototype.handleDragEvent=function(t){if(this.pointerHa
 ndler_){var e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}},e.prototype.handleUpEvent=function(t){this.pointerHandler_=null;var e=this.getExtentInternal();return e&&0!==ne(e)||this.setExtent(null),!1},e.prototype.setMap=function(e){this.extentOverlay_.setMap(e),this.vertexOverlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getExtent=function(){return Fr(this.getExtentInternal(),this.getMap().getView().getProjection())},e.prototype.getExtentInternal=function(){return this.extent_},e.prototype.setExtent=function(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new Yb(this.extent_))},e}(na),Zb=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.p
 rototype,new i)}}(),Kb=[0,0,0,0],Hb=[],Jb="modifystart",$b="modifyend",Qb=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.features=r,n.mapBrowserEvent=i,n}return Zb(e,t),e}(h);function tS(t,e){return t.index-e.index}function eS(t,e,r){var i=e.geometry;if(i.getType()===gt.CIRCLE){var n=i;if(1===e.index){var o=Or();o&&(n=n.clone().transform(o,r));var s=sr(n.getCenter(),Mr(t,r)),a=Math.sqrt(s)-n.getRadius();return a*a}}var l=Mr(t,r);return Hb[0]=Mr(e.segment[0],r),Hb[1]=Mr(e.segment[1],r),lr(l,Hb)}function rS(t,e,r){var i=e.geometry;if(i.getType()===gt.CIRCLE&&1===e.index){var n=i,o=Or();return o&&(n=n.clone().transform(o,r)),Lr(n.getClosestPoint(Mr(t,r)),r)}var s=Mr(t,r);return Hb[0]=Mr(e.segment[0],r),Hb[1]=Mr(e.segment[1],r),Lr(tr(s,Hb),r)}var iS=function(t){function e(e){var r,i,n=t.call(this,e)||this;if(n.boundHandleFeatureChange_=n.handleFeatureChange_.bind(n),n.condition_=e.condition?e.condition:_a,n.defaultDeleteCondition_=function(t){return sa(t)&&da(t)},n.de
 leteCondition_=e.deleteCondition?e.deleteCondition:n.defaultDeleteCondition_,n.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:ha,n.vertexFeature_=null,n.vertexSegments_=null,n.lastPixel_=[0,0],n.ignoreNextSingleClick_=!1,n.modified_=!1,n.rBush_=new rc,n.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,n.snappedToVertex_=!1,n.changingFeature_=!1,n.dragSegments_=[],n.overlay_=new Ef({source:new uc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(r=oh(),function(t,e){return r[gt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.SEGMENT_WRITERS_={Point:n.writePointGeometry_.bind(n),LineString:n.writeLineStringGeometry_.bind(n),LinearRing:n.writeLineStringGeometry_.bind(n),Polygon:n.writePolygonGeometry_.bind(n),MultiPoint:n.writeMultiPointGeometry_.bind(n),MultiLineString:n.writeMultiLineStringGeometry_.bind(n),MultiPolygon:n.writeMultiPolygonGeometry_.bind(n),Circle:n.writeCircleGeometry_.bind(n),GeometryCollection:n.writeGe
 ometryCollectionGeometry_.bind(n)},n.source_=null,e.source?(n.source_=e.source,i=new at(n.source_.getFeatures()),n.source_.addEventListener(ic,n.handleSourceAdd_.bind(n)),n.source_.addEventListener(sc,n.handleSourceRemove_.bind(n))):i=e.features,!i)throw new Error("The modify interaction requires features or a source");return n.features_=i,n.features_.forEach(n.addFeature_.bind(n)),n.features_.addEventListener(rt,n.handleFeatureAdd_.bind(n)),n.features_.addEventListener(it,n.handleFeatureRemove_.bind(n)),n.lastPointerEvent_=null,n}return Zb(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}var i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(O,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t){this.modified_||(this.modified_=!0,this.dispatchEvent(new Qb(Jb,this.features_,t)))},e.prototype.removeFeature_=function(t){this.
 removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(O,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,r=[];e.forEach((function(e){t===e.feature&&r.push(e)}));for(var i=r.length-1;i>=0;--i){for(var n=r[i],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===n&&this.dragSegments_.splice(o,1);e.remove(n)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remov
 e(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),i={feature:t,geometry:e,segment:[r,r]};this.rBush_.insert(e.getExtent(),i)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i){var o=r[i],s={feature:t,geometry:e,depth:[i],index:i,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length-1;i<n;++i){var o=r.slice(i,i+2),s={feature:t,geometry:e,index:i,segment:o};this.rBush_.insert(Dt(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length-
 1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,geometry:e,depth:[i],index:s,segment:l};this.rBush_.insert(Dt(l),u)}},e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,geometry:e,depth:[i],index:s,segment:l};this.rBush_.insert(Dt(l),u)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length;s<a;++s)for(var l=o[s],u=0,h=l.length-1;u<h;++u){var c=l.slice(u,u+2),p={feature:t,geometry:e,depth:[s,i],index:u,segment:c};this.rBush_.insert(Dt(c),p)}},e.prototype.writeCircleGeometry_=function(t,e){var r=e.getCenter(),i={feature:t,geometry:e,index:0,segment:[r,r]},n={feature:t,geometry:e,index:1,segment:[r,r]},o=[i,n];i.featureSegments=o,n.featureSegments=o,this.rBush_.insert(Kt(r),i);var s=e,a=Or();if(a&&this.getMap()){var l=this.getMap().getView().getProjection();s=Li(s=s.clone().transform(a
 ,l)).transform(l,a)}this.rBush_.insert(s.getExtent(),n)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),i=0;i<r.length;++i){var n=r[i];(0,this.SEGMENT_WRITERS_[n.getType()])(t,n)}},e.prototype.createOrUpdateVertexFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new ht(new pi(t)),this.vertexFeature_=e,this.overlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=Zo.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(r=!(e.type!=Zo.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==Zo.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!r);var r},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t);for(var e=t.coordinate,r=0,i=t
 his.dragSegments_.length;r<i;++r){for(var n=this.dragSegments_[r],o=n[0],s=o.depth,a=o.geometry,l=void 0,u=o.segment,h=n[1];e.length<a.getStride();)e.push(u[h][e.length]);switch(a.getType()){case gt.POINT:l=e,u[0]=e,u[1]=e;break;case gt.MULTI_POINT:(l=a.getCoordinates())[o.index]=e,u[0]=e,u[1]=e;break;case gt.LINE_STRING:(l=a.getCoordinates())[o.index+h]=e,u[h]=e;break;case gt.MULTI_LINE_STRING:case gt.POLYGON:(l=a.getCoordinates())[s[0]][o.index+h]=e,u[h]=e;break;case gt.MULTI_POLYGON:(l=a.getCoordinates())[s[1]][s[0]][o.index+h]=e,u[h]=e;break;case gt.CIRCLE:if(u[0]=e,u[1]=e,0===o.index)this.changingFeature_=!0,a.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;var c=t.map.getView().getProjection(),p=ar(Mr(a.getCenter(),c),Mr(e,c)),d=Or();if(d){var f=a.clone().transform(d,c);f.setRadius(p),p=f.transform(c,d).getRadius()}a.setRadius(p),this.changingFeature_=!1}}l&&this.setGeometryCoordinates_(a,l)}this.createOrUpdateVertexFeature_(e)},e.prototype.handleDownEvent=
 function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.modified_=!1;var r=this.vertexFeature_;if(r){var i=t.map.getView().getProjection(),n=[],s=r.getGeometry().getCoordinates(),a=Dt([s]),l=this.rBush_.getInExtent(a),u={};l.sort(tS);for(var h=0,c=l.length;h<c;++h){var p=l[h],d=p.segment,f=o(p.geometry),g=p.depth;if(g&&(f+="-"+g.join("-")),u[f]||(u[f]=new Array(2)),p.geometry.getType()!==gt.CIRCLE||1!==p.index)if(!ir(d[0],s)||u[f][0])if(!ir(d[1],s)||u[f][1])o(d)in this.vertexSegments_&&!u[f][0]&&!u[f][1]&&this.insertVertexCondition_(t)&&n.push([p,s]);else{if((p.geometry.getType()===gt.LINE_STRING||p.geometry.getType()===gt.MULTI_LINE_STRING)&&u[f][0]&&0===u[f][0].index)continue;this.dragSegments_.push([p,1]),u[f][1]=p}else this.dragSegments_.push([p,0]),u[f][0]=p;else ir(rS(e,p,i),s)&&!u[f][0]&&(this.dragSegments_.push([p,0]),u[f][0]=p)}n.length&&this.willModifyFeatures_(t);for(var y=n.length-1;y>=0;
 --y)this.insertVertex_.apply(this,n[y])}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var r=this.dragSegments_[e][0],i=r.geometry;if(i.getType()===gt.CIRCLE){var n=i.getCenter(),o=r.featureSegments[0],s=r.featureSegments[1];o.segment[0]=n,o.segment[1]=n,s.segment[0]=n,s.segment[1]=n,this.rBush_.update(Kt(n),o);var a=i,l=Or();if(l){var u=t.map.getView().getProjection();a=Li(a=a.clone().transform(l,u)).transform(u,l)}this.rBush_.update(a.getExtent(),s)}else this.rBush_.update(Dt(r.segment),r)}return this.modified_&&(this.dispatchEvent(new Qb($b,this.features_,t)),this.modified_=!1),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,r){var i=r||e.getCoordinateFromPixel(t),n=e.getView().getProjection(),s=Fr(Gt(Ar(Kt(i,Kb),n),e.getView().getResolution()*this.pixelTolerance_,Kb),n),a=this.rBush_.getI
 nExtent(s);if(a.length>0){a.sort((function(t,e){return eS(i,t,n)-eS(i,e,n)}));var l=a[0],u=l.segment,h=rS(i,l,n),c=e.getPixelFromCoordinate(h),p=ar(t,c);if(p<=this.pixelTolerance_){var d={};if(l.geometry.getType()===gt.CIRCLE&&1===l.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h);else{var f=e.getPixelFromCoordinate(u[0]),g=e.getPixelFromCoordinate(u[1]),y=sr(c,f),m=sr(c,g);p=Math.sqrt(Math.min(y,m)),this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(h=y>m?u[1]:u[0]),this.createOrUpdateVertexFeature_(h);for(var _=1,v=a.length;_<v;++_){var x=a[_].segment;if(!(ir(u[0],x[0])&&ir(u[1],x[1])||ir(u[0],x[1])&&ir(u[1],x[0])))break;d[o(x)]=!0}}return d[o(u)]=!0,void(this.vertexSegments_=d)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var r,i=t.segment,n=t.feature,o=t.geometry,s=t.depth,a=t.index;e.length<o.getStride();)e.push(0);switch(o.getType(
 )){case gt.MULTI_LINE_STRING:case gt.POLYGON:(r=o.getCoordinates())[s[0]].splice(a+1,0,e);break;case gt.MULTI_POLYGON:(r=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,e);break;case gt.LINE_STRING:(r=o.getCoordinates()).splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,r);var l=this.rBush_;l.remove(t),this.updateSegmentIndices_(o,a,s,1);var u={segment:[i[0],e],feature:n,geometry:o,depth:s,index:a};l.insert(Dt(u.segment),u),this.dragSegments_.push([u,1]);var h={segment:[e,i[1]],feature:n,geometry:o,depth:s,index:a+1};l.insert(Dt(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Zo.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t);var e=this.removeVertex_();return this.dispatchEvent(new Qb($b,this.features_,t)),this.modified_=!1,e}return!1},e.prototype.removeVertex_=function(){var t,e,r,i,n,s,a,l,u,h,c,p=this.dragSegments_,d={},f=!1;
 for(n=p.length-1;n>=0;--n)c=o((h=(r=p[n])[0]).feature),h.depth&&(c+="-"+h.depth.join("-")),c in d||(d[c]={}),0===r[1]?(d[c].right=h,d[c].index=h.index):1==r[1]&&(d[c].left=h,d[c].index=h.index+1);for(c in d){switch(u=d[c].right,a=d[c].left,(l=(s=d[c].index)-1)<0&&(l=0),t=e=(i=(h=void 0!==a?a:u).geometry).getCoordinates(),f=!1,i.getType()){case gt.MULTI_LINE_STRING:e[h.depth[0]].length>2&&(e[h.depth[0]].splice(s,1),f=!0);break;case gt.LINE_STRING:e.length>2&&(e.splice(s,1),f=!0);break;case gt.MULTI_POLYGON:t=t[h.depth[1]];case gt.POLYGON:(t=t[h.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),f=!0,0===s&&(t.pop(),t.push(t[0]),l=t.length-1))}if(f){this.setGeometryCoordinates_(i,e);var g=[];if(void 0!==a&&(this.rBush_.remove(a),g.push(a.segment[0])),void 0!==u&&(this.rBush_.remove(u),g.push(u.segment[1])),void 0!==a&&void 0!==u){var y={depth:h.depth,feature:h.feature,geometry:h.geometry,index:l,segment:g};this.rBush_.insert(Dt(y.segment),y)}this.updateSegmentIndices_(i,s,h.dept
 h,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),p.length=0}}return f},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,r,i){this.rBush_.forEachInExtent(t.getExtent(),(function(n){n.geometry===t&&(void 0===r||void 0===n.depth||v(n.depth,r))&&n.index>e&&(n.index+=i)}))},e}(na),nS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),oS="select",sS=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.selected=r,o.deselected=i,o.mapBrowserEvent=n,o}return nS(e,t),e}(h),aS={};var lS=function(t){function e(e){var r,i,n=t.
 call(this)||this,o=e||{};if(n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=o.condition?o.condition:da,n.addCondition_=o.addCondition?o.addCondition:pa,n.removeCondition_=o.removeCondition?o.removeCondition:pa,n.toggleCondition_=o.toggleCondition?o.toggleCondition:ga,n.multi_=!!o.multi&&o.multi,n.filter_=o.filter?o.filter:w,n.hitTolerance_=o.hitTolerance?o.hitTolerance:0,n.style_=void 0!==o.style?o.style:(m((r=oh())[gt.POLYGON],r[gt.LINE_STRING]),m(r[gt.GEOMETRY_COLLECTION],r[gt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),n.features_=o.features||new at,o.layers)if("function"==typeof o.layers)i=o.layers;else{var s=o.layers;i=function(t){return f(s,t)}}else i=w;return n.layerFilter_=i,n.featureLayerAssociation_={},n}return nS(e,t),e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[o(t)]=e},e.prototype.getFeatures=function(){return this.features_},e.prototype.g
 etHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[o(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),t.prototype.setMap.call(this,e),e?(this.features_.addEventListener(rt,this.boundAddFeature_),this.features_.addEventListener(it,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(rt,this.boundAddFeature_),this.features_.removeEventListener(it,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var e=t.element;this.style_&&this.applySelectedStyle_(e)},e.prototype.removeFeature_=function(t){var e=t.element;this.style_&&this.restorePreviousStyle_(e)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var e=o(t);e in aS||(aS[e]=t.getStyle()
 ),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){var r=o(t),i=this.getMap().getInteractions().getArray().filter((function(r){return r instanceof e&&r.getStyle()&&-1!==r.getFeatures().getArray().indexOf(t)}));i.length>0?t.setStyle(i[i.length-1].getStyle()):(t.setStyle(aS[r]),delete aS[r])},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[o(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),r=this.removeCondition_(t),i=this.toggleCondition_(t),n=!e&&!r&&!i,o=t.map,s=this.getFeatures(),a=[],l=[];if(n){C(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return l.push(t),this.addFeatureLayerAssociation_(t,e),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var u=s.getLength()-1;u>=0;--u){var h=s.item(u),c=l.indexOf(h);c>-1?l.splice(c,1):(s.remove(h),a.push(h))}0!==l.length&&s.exten
 d(l)}else{o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.filter_(t,n))return!e&&!i||f(s.getArray(),t)?(r||i)&&f(s.getArray(),t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(l.push(t),this.addFeatureLayerAssociation_(t,n)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=a.length-1;p>=0;--p)s.remove(a[p]);s.extend(l)}return(l.length>0||a.length>0)&&this.dispatchEvent(new sS(oS,l,a,t)),!0},e}(Qs),uS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function hS(t){return t.feature?t.feature:t.element?t.element:void 0}var cS=[],pS=function(t){function e(e){var r=this,i=e||{},n=i;return n.handleDownEvent||(n.handleDownEvent=w),n.stopDown||(n.stopDow
 n=b),(r=t.call(this,n)||this).source_=i.source?i.source:null,r.vertex_=void 0===i.vertex||i.vertex,r.edge_=void 0===i.edge||i.edge,r.features_=i.features?i.features:null,r.featuresListenerKeys_=[],r.featureChangeListenerKeys_={},r.indexedFeaturesExtents_={},r.pendingFeatures_={},r.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,r.rBush_=new rc,r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r)},r}return uS(e,t),e.prototype.addFeature=function(t,e){var r=void 0===e||e,i=o(t),n=t.getGeometry();if(n){var s=this.SEGMENT_WRITERS_[n.getType()];s&&(this.indexedFeaturesExtents_[i]=n.getExtent([1
 /0,1/0,-1/0,-1/0]),s(t,n))}r&&(this.featureChangeListenerKeys_[i]=W(t,O,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var r=this.snapTo(e.pixel,e.coordinate,e.map);return r.snapped&&(e.coordinate=r.vertex.slice(0,2),e.pixel=r.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=hS(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=hS(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var r=o(e);r in this.pendingFeatures_||(this.pendingFeatures_[r]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=E(this.pendingFeatures_);return e.length&&(e.for
 Each(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var r=void 0===e||e,i=o(t),n=this.indexedFeaturesExtents_[i];if(n){var s=this.rBush_,a=[];s.forEachInExtent(n,(function(e){t===e.feature&&a.push(e)}));for(var l=a.length-1;l>=0;--l)s.remove(a[l])}r&&(X(this.featureChangeListenerKeys_[i]),delete this.featureChangeListenerKeys_[i])},e.prototype.setMap=function(e){var r=this.getMap(),i=this.featuresListenerKeys_,n=this.getFeatures_();r&&(i.forEach(X),i.length=0,n.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?i.push(W(this.features_,rt,this.handleFeatureAdd_,this),W(this.features_,it,this.handleFeatureRemove_,this)):this.source_&&i.push(W(this.source_,ic,this.handleFeatureAdd_,this),W(this.source_,sc,this.handleFeatureRemove_,this)),n.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,r){var i=Dt([r.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]
 +this.pixelTolerance_]),r.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),n=this.rBush_.getInExtent(i);this.vertex_&&!this.edge_&&(n=n.filter((function(t){return t.feature.getGeometry().getType()!==gt.CIRCLE})));var o=!1,s=null,a=null;if(0===n.length)return{snapped:o,vertex:s,vertexPixel:a};for(var l,u=r.getView().getProjection(),h=Mr(e,u),c=1/0,p=0;p<n.length;++p){var d=n[p];cS[0]=Mr(d.segment[0],u),cS[1]=Mr(d.segment[1],u);var f=lr(h,cS);f<c&&(l=d,c=f)}var g=l.segment;if(this.vertex_&&!this.edge_){var y=r.getPixelFromCoordinate(g[0]),m=r.getPixelFromCoordinate(g[1]),_=sr(t,y),v=sr(t,m);Math.sqrt(Math.min(_,v))<=this.pixelTolerance_&&(o=!0,s=_>v?g[1]:g[0],a=r.getPixelFromCoordinate(s))}else if(this.edge_){var x=l.feature.getGeometry().getType()===gt.CIRCLE;if(x){var w=l.feature.getGeometry(),b=Or();b&&(w=w.clone().transform(b,u)),s=Lr(function(t,e){var r=e.getRadius(),i=e.getCenter(),n=i[0],o=i[1],s=t[0]-n,a=t[1]-o;0===s&&0===a&&(s=1);var l=Math.sqrt
 (s*s+a*a);return[n+r*s/l,o+r*a/l]}(h,w),u)}else cS[0]=Mr(g[0],u),cS[1]=Mr(g[1],u),s=Lr(tr(h,cS),u);if(ar(t,a=r.getPixelFromCoordinate(s))<=this.pixelTolerance_&&(o=!0,this.vertex_&&!x)){y=r.getPixelFromCoordinate(g[0]),m=r.getPixelFromCoordinate(g[1]),_=sr(a,y),v=sr(a,m);Math.sqrt(Math.min(_,v))<=this.pixelTolerance_&&(s=_>v?g[1]:g[0],a=r.getPixelFromCoordinate(s))}}return o&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:o,vertex:s,vertexPixel:a}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){var r=this.getMap().getView().getProjection(),i=e,n=Or();n&&(i=i.clone().transform(n,r));var o=Li(i);n&&o.transform(r,n);for(var s=o.getCoordinates()[0],a=0,l=s.length-1;a<l;++a){var u=s.slice(a,a+2),h={feature:t,segment:u};this.rBush_.insert(Dt(u),h)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),i=0;i<r.length;++i){var n=this.SEGMENT_WRITERS_[r[i].getType()
 ];n&&n(t,r[i])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length-1;i<n;++i){var o=r.slice(i,i+2),s={feature:t,segment:o};this.rBush_.insert(Dt(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,segment:l};this.rBush_.insert(Dt(l),u)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i){var o=r[i],s={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length;s<a;++s)for(var l=o[s],u=0,h=l.length-1;u<h;++u){var c=l.slice(u,u+2),p={feature:t,segment:c};this.rBush_.insert(Dt(c),p)}},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),i={feature:t,segment:[r,r]};this.rBush_.insert(e.getExtent(),i)}
 ,e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,segment:l};this.rBush_.insert(Dt(l),u)}},e}(na),dS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),fS="translatestart",gS="translating",yS="translateend",mS=function(t){function e(e,r,i,n,o){var s=t.call(this,e)||this;return s.features=r,s.coordinate=i,s.startCoordinate=n,s.mapBrowserEvent=o,s}return dS(e,t),e}(h),_S=function(t){function e(e){var r,i=this,n=e||{};if((i=t.call(this,n)||this).lastCoordinate_=null,i.startCoordinate_=null,i.features_=void 0!==n.features?n.features:null,n.layers)if("function"==typeof n.layers)r=n.layers;el
 se{var o=n.layers;r=function(t){return f(o,t)}}else r=w;return i.layerFilter_=r,i.filter_=n.filter?n.filter:w,i.hitTolerance_=n.hitTolerance?n.hitTolerance:0,i.lastFeature_=null,i.addEventListener(tt(Hs),i.handleActiveChanged_),i}return dS(e,t),e.prototype.handleDownEvent=function(t){if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);var e=this.features_||new at([this.lastFeature_]);return this.dispatchEvent(new mS(fS,e,t.coordinate,this.startCoordinate_,t)),!0}return!1},e.prototype.handleUpEvent=function(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);var e=this.features_||new at([this.lastFeature_]);return this.dispatchEvent(new mS(yS,e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1},e.prototype.handleDragEvent=function(t){if(this.lastCoordinate_){var e=t.coordinate,r=e[0]-this.las
 tCoordinate_[0],i=e[1]-this.lastCoordinate_[1],n=this.features_||new at([this.lastFeature_]);n.forEach((function(t){var e=t.getGeometry();e.translate(r,i),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new mS(gS,n,e,this.startCoordinate_,t))}},e.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},e.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||f(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var r=this.getMap();t.prototype.setMap.call(this,e),t
 his.updateState_(r)},e.prototype.handleActiveChanged_=function(){this.updateState_(null)},e.prototype.updateState_=function(t){var e=this.getMap(),r=this.getActive();e&&r||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},e}(na),vS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function xS(t){for(var e=[],r=0,i=t.length;r<i;++r)e.push(t[r].clone());return e}var wS=function(t){function e(e){var r=t.call(this)||this;return r.geometries_=e||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return vS(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(X),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries
 _)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(W(this.geometries_[t],O,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t},e.prototype.closestPointXY=function(t,e,r,i){if(i<Bt(this.getExtent(),t,e))return i;for(var n=this.geometries_,o=0,s=n.length;o<s;++o)i=n[o].closestPointXY(t,e,r,i);return i},e.prototype.containsXY=function(t,e){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)if(r[i].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){Zt(t);for(var e=this.geometries_,r=0,i=e.length;r<i;++r)$t(t,e[r].getExtent());return t},e.prototype.getGeometries=function(){return xS(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,r=0,i=e.length;r<i;++r)e[r].getType()===this.getType()?t=t.concat(e[r].getGeometriesArrayRecursive()):t.push(e[r]);return t},e.prototype.
 getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var r=[],i=this.geometries_,n=!1,o=0,s=i.length;o<s;++o){var a=i[o],l=a.getSimplifiedGeometry(t);r.push(l),l!==a&&(n=!0)}if(n){var u=new e(null);return u.setGeometriesArray(r),u}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return gt.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,r=0,i=e.length;r<i;++r)if(e[r].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)r[i].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,r){var i=r;i||(i=ae(this.getExte
 nt()));for(var n=this.geometries_,o=0,s=n.length;o<s;++o)n[o].scale(t,e,i);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(xS(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,r=0,i=e.length;r<i;++r)e[r].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)r[i].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(Br),bS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new 
 i)}}();function SS(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var TS=function(t){function e(){return t.call(this)||this}return bS(e,t),e.prototype.getType=function(){return gl},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(SS(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(SS(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return i()},e.prototype.readFeaturesFromObject=function(t,e){return i()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(SS(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return i()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(SS(t))},e.prototype.readProjectionFromObject=function(t){return i()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t
 ,e){return i()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return i()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return i()},e}(Df),CS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ES={};ES[gt.POINT]=function(t){var e;e=void 0!==t.m&&void 0!==t.z?new pi([t.x,t.y,t.z,t.m],ft):void 0!==t.z?new pi([t.x,t.y,t.z],pt):void 0!==t.m?new pi([t.x,t.y,t.m],dt):new pi([t.x,t.y]);return e},ES[gt.LINE_STRING]=function(t){var e=IS(t);return new Tf(t.paths[0],e)},ES[gt.POLYGON]=function(t){var e=IS(t);return new Pi(t.rings,e)},ES
 [gt.MULTI_POINT]=function(t){var e=IS(t);return new Wf(t.points,e)},ES[gt.MULTI_LINE_STRING]=function(t){var e=IS(t);return new Uf(t.paths,e)},ES[gt.MULTI_POLYGON]=function(t){var e=IS(t);return new qf(t.rings,e)};var RS={};function PS(t,e){var r,i,n;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)n=gt.POINT;else if(t.points)n=gt.MULTI_POINT;else if(t.paths){n=1===t.paths.length?gt.LINE_STRING:gt.MULTI_LINE_STRING}else if(t.rings){var o=t,s=IS(o),a=function(t,e){var r,i,n=[],o=[],s=[];for(r=0,i=t.length;r<i;++r){n.length=0,Jr(n,0,t[r],e.length),bi(n,0,n.length,e.length)?o.push([t[r]]):s.push(t[r])}for(;s.length;){var a=s.shift(),l=!1;for(r=o.length-1;r>=0;r--){var u=o[r][0];if(Yt(new hi(u).getExtent(),new hi(a).getExtent())){o[r].push(a),l=!0;break}}l||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(n=gt.POLYGON,t=T({},t,((r={}).rings=a[0],r))):(n=gt.MULTI_POLYGON,t=T({},t,((i={}).rings=a,i)))}return Gf((0,ES[n])(t),!1,e)}function IS(t){var e=ct;return!0===t
 .hasZ&&!0===t.hasM?e=ft:!0===t.hasZ?e=pt:!0===t.hasM&&(e=dt),e}function OS(t){var e=t.getLayout();return{hasZ:e===pt||e===ft,hasM:e===dt||e===ft}}function LS(t,e){return(0,RS[t.getType()])(Gf(t,!0,e),e)}RS[gt.POINT]=function(t,e){var r,i=t.getCoordinates(),n=t.getLayout();n===pt?r={x:i[0],y:i[1],z:i[2]}:n===dt?r={x:i[0],y:i[1],m:i[2]}:n===ft?r={x:i[0],y:i[1],z:i[2],m:i[3]}:n===ct?r={x:i[0],y:i[1]}:lt(!1,34);return r},RS[gt.LINE_STRING]=function(t,e){var r=OS(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:[t.getCoordinates()]}},RS[gt.POLYGON]=function(t,e){var r=OS(t);return{hasZ:r.hasZ,hasM:r.hasM,rings:t.getCoordinates(!1)}},RS[gt.MULTI_POINT]=function(t,e){var r=OS(t);return{hasZ:r.hasZ,hasM:r.hasM,points:t.getCoordinates()}},RS[gt.MULTI_LINE_STRING]=function(t,e){var r=OS(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:t.getCoordinates()}},RS[gt.MULTI_POLYGON]=function(t,e){for(var r=OS(t),i=t.getCoordinates(!1),n=[],o=0;o<i.length;o++)for(var s=i[o].length-1;s>=0;s--)n.push(i[o][s]);return{has
 Z:r.hasZ,hasM:r.hasM,rings:n}};var MS=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this)||this).geometryName_=i.geometryName,r}return CS(e,t),e.prototype.readFeatureFromObject=function(t,e,r){var i=t,n=PS(i.geometry,e),o=new ht;if(this.geometryName_&&o.setGeometryName(this.geometryName_),o.setGeometry(n),i.attributes){o.setProperties(i.attributes,!0);var s=i.attributes[r];void 0!==s&&o.setId(s)}return o},e.prototype.readFeaturesFromObject=function(t,e){var r=e||{};if(t.features){for(var i=[],n=t.features,o=0,s=n.length;o<s;++o)i.push(this.readFeatureFromObject(n[o],r,t.objectIdFieldName));return i}return[this.readFeatureFromObject(t,r)]},e.prototype.readGeometryFromObject=function(t,e){return PS(t,e)},e.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?gr("EPSG:"+t.spatialReference.wkid):null},e.prototype.writeGeometryObject=function(t,e){return LS(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=functio
 n(t,e){e=this.adaptOptions(e);var r={};if(!t.hasProperties())return r.attributes={},r;var i=t.getProperties(),n=t.getGeometry();return n&&(r.geometry=LS(n,e),e&&e.featureProjection&&(r.geometry.spatialReference={wkid:Number(gr(e.featureProjection).getCode().split(":").pop())}),delete i[t.getGeometryName()]),R(i)?r.attributes={}:r.attributes=i,r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],i=0,n=t.length;i<n;++i)r.push(this.writeFeatureObject(t[i],e));return{features:r}},e}(TS),FS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),AS=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===su&&"undefined"!=typeof XMLSerializer&&(su=new XMLSerializ
 er),su),e}return FS(e,t),e.prototype.getType=function(){return ml},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var r=Wl(t);return this.readFeatureFromDocument(r,e)}return Yl(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var r=this.readFeaturesFromDocument(t,e);return r.length>0?r[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var r=Wl(t);return this.readFeaturesFromDocument(r,e)}return Yl(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var r=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&m(r,this.readFeaturesFromNode(i,e));return r},e.prototype.readFeaturesFromNode=function(t,e){return i()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var r=Wl(t);return this.readG
 eometryFromDocument(r,e)}return Yl(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=Wl(t);return this.readProjectionFromDocument(e)}return Yl(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var r=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var r=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=funct
 ion(t,e){var r=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeGeometryNode=function(t,e){return null},e}(Df),kS=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),NS="http://www.opengis.net/gml",jS=/^[\s\xa0]*$/,DS=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.featureType=i.featureType,r.featureNS=i.featureNS,r.srsName=i.srsName,r.schemaLocation="",r.FEATURE_COLLECTION_PARSERS={},r.FEATURE_COLLECTION_PARSERS[r.namespace]={featureMember:Xl(r.readFeaturesInternal),featureMembers:ql(r.readFeaturesInternal)},r}return kS(e,t),e.prototype.readFeaturesInternal=function(t,e){var r=t.localName,i=null;if("FeatureCollection"==r)i=iu([],this.FEATURE_COLL
 ECTION_PARSERS,t,e,this);else if("featureMembers"==r||"featureMember"==r){var n=e[0],o=n.featureType,s=n.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,l=t.childNodes.length;a<l;++a){var u=t.childNodes[a];if(1===u.nodeType){var h=u.nodeName.split(":").pop();if(-1===o.indexOf(h)){var c="",p=0,d=u.namespaceURI;for(var f in s){if(s[f]===d){c=f;break}++p}c||(s[c="p"+p]=d),o.push(c+":"+h)}}}"featureMember"!=r&&(n.featureType=o,n.featureNS=s)}if("string"==typeof s){var g=s;(s={}).p0=g}var y={},m=Array.isArray(o)?o:[o];for(var _ in s){var v={};for(a=0,l=m.length;a<l;++a){(-1===m[a].indexOf(":")?"p0":m[a].split(":")[0])===_&&(v[m[a].split(":").pop()]="featureMembers"==r?Xl(this.readFeatureElement,this):ql(this.readFeatureElement,this))}y[s[_]]=v}i=iu("featureMember"==r?void 0:[],y,t,e)}return null===i&&(i=[]),i},e.prototype.readGeometryElement=function(t,e){var r=e[0];r.srsName=t.firstElementChild.getAttribute("srsName"),r.srsDimension=t.firstElementChild.getAttribute("srsDimension");
 var i=iu(null,this.GEOMETRY_PARSERS,t,e,this);return i?Array.isArray(i)?zf(i,r):Gf(i,!1,r):void 0},e.prototype.readFeatureElementInternal=function(t,e,r){for(var i,n={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,a=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=Ul(o,!1),jS.test(s)&&(s=void 0)):(r&&(s=this.readGeometryElement(o,e)),s?"boundedBy"!==a&&(i=a):s=this.readFeatureElementInternal(o,e,!1)),n[a]?(n[a]instanceof Array||(n[a]=[n[a]]),n[a].push(s)):n[a]=s;var l=o.attributes.length;if(l>0){n[a]={_content_:n[a]};for(var u=0;u<l;u++){var h=o.attributes[u].name;n[a][h]=o.attributes[u].value}}}if(r){var c=new ht(n);i&&c.setGeometryName(i);var p=t.getAttribute("fid")||function(t,e,r){return t.getAttributeNS(e,r)||""}(t,this.namespace,"id");return p&&c.setId(p),c}return n},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,
 e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new pi(r,pt)},e.prototype.readMultiPoint=function(t,e){var r=iu([],this.MULTIPOINT_PARSERS,t,e,this);return r?new Wf(r):void 0},e.prototype.readMultiLineString=function(t,e){var r=iu([],this.MULTILINESTRING_PARSERS,t,e,this);if(r)return new Uf(r)},e.prototype.readMultiPolygon=function(t,e){var r=iu([],this.MULTIPOLYGON_PARSERS,t,e,this);if(r)return new qf(r)},e.prototype.pointMemberParser=function(t,e){ru(this.POINTMEMBER_PARSERS,t,e,this)},e.prototype.lineStringMemberParser=function(t,e){ru(this.LINESTRINGMEMBER_PARSERS,t,e,this)},e.prototype.polygonMemberParser=function(t,e){ru(this.POLYGONMEMBER_PARSERS,t,e,this)},e.prototype.readLineString=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);return r?new Tf(r,pt):void 0},e.prototype.readFlatLinearRing=function(t,e){var r=iu(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this);return r||void 0},e.prototype.readLinearRing=function(t,e){var r=this.readFlatCoordinatesF
 romNode(t,e);if(r)return new hi(r,pt)},e.prototype.readPolygon=function(t,e){var r=iu([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(r&&r[0]){var i,n=r[0],o=[n.length],s=void 0;for(s=1,i=r.length;s<i;++s)m(n,r[s]),o.push(n.length);return new Pi(n,pt,o)}},e.prototype.readFlatCoordinatesFromNode=function(t,e){return iu(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){var r=this.readGeometryElement(t,[this.getReadOptions(t,e||{})]);return r||null},e.prototype.readFeaturesFromNode=function(t,e){var r={featureType:this.featureType,featureNS:this.featureNS};return e&&T(r,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[r])||[]},e.prototype.readProjectionFromNode=function(t){return gr(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(AS);DS.prototype.namespace=NS,DS.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},DS.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.n
 et/gml":{}},DS.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},DS.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Xl(DS.prototype.pointMemberParser),pointMembers:Xl(DS.prototype.pointMemberParser)}},DS.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Xl(DS.prototype.lineStringMemberParser),lineStringMembers:Xl(DS.prototype.lineStringMemberParser)}},DS.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Xl(DS.prototype.polygonMemberParser),polygonMembers:Xl(DS.prototype.polygonMemberParser)}},DS.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Xl(DS.prototype.readFlatCoordinatesFromNode)}},DS.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Xl(DS.prototype.readLineString)}},DS.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Xl(DS.prototype.readPolygon)}},DS.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:ql
 (DS.prototype.readFlatLinearRing)}};var GS=DS;function zS(t){return BS(Ul(t,!1))}function BS(t){var e=/^\s*(true|1)|(false|0)\s*$/.exec(t);return e?void 0!==e[1]||!1:void 0}function US(t){var e=Ul(t,!1),r=Date.parse(e);return isNaN(r)?void 0:r/1e3}function YS(t){return WS(Ul(t,!1))}function WS(t){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return e?parseFloat(e[1]):void 0}function VS(t){return XS(Ul(t,!1))}function XS(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function qS(t){return Ul(t,!1).trim()}function ZS(t,e){JS(t,e?"1":"0")}function KS(t,e){var r=e.toPrecision();t.appendChild(lu().createTextNode(r))}function HS(t,e){var r=e.toString();t.appendChild(lu().createTextNode(r))}function JS(t,e){t.appendChild(lu().createTextNode(e))}var $S=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function
 (e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),QS={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},tT=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,i)||this).surface_=void 0!==i.surface&&i.surface,r.curve_=void 0!==i.curve&&i.curve,r.multiCurve_=void 0===i.multiCurve||i.multiCurve,r.multiSurface_=void 0===i.multiSurface||i.multiSurface,r.schemaLocation=i.schemaLocation?i.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",r.hasZ=void 0!==i.hasZ&&i.hasZ,r}return $S(e,t),e.prototype.readMultiCurve=function(t,e){var r=iu([],this.MULTICURVE_PARSERS,t,e,this);return r?new Uf(r):void 0},e.prototype.readMultiSurface=function(t,e){var r=iu([],this.MULTISURFACE_PARSERS,t,e,this);if(r)return new qf(r)},e.prototype.curveMemberParser=function(t,e){ru(this.CURVEMEMBER_P
 ARSERS,t,e,this)},e.prototype.surfaceMemberParser=function(t,e){ru(this.SURFACEMEMBER_PARSERS,t,e,this)},e.prototype.readPatch=function(t,e){return iu([null],this.PATCHES_PARSERS,t,e,this)},e.prototype.readSegment=function(t,e){return iu([null],this.SEGMENTS_PARSERS,t,e,this)},e.prototype.readPolygonPatch=function(t,e){return iu([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment=function(t,e){return iu([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser=function(t,e){var r=iu(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.exteriorParser=function(t,e){var r=iu(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.readSurface=function(t,e){var r=iu([null],this.SURFACE_PARSERS,t,e,this);if(r&&r[0]){var i,n=r[0],o=[n.length],s=void 0;for(s=1,i=r.length;s<i;++s)m(n,r[s]),o.push(n.length);return new Pi(n,pt,o)}},e.prototype.readCurve=function(t,e){var r=iu([null],this.CURVE_PARSERS,
 t,e,this);return r?new Tf(r,pt):void 0},e.prototype.readEnvelope=function(t,e){var r=iu([null],this.ENVELOPE_PARSERS,t,e,this);return qt(r[1][0],r[1][1],r[2][0],r[2][1])},e.prototype.readFlatPos=function(t,e){for(var r,i=Ul(t,!1),n=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];r=n.exec(i);)o.push(parseFloat(r[1])),i=i.substr(r[0].length);if(""===i){var s=e[0].srsName,a="enu";if(s)a=gr(s).getAxisOrientation();if("neu"===a){var l,u=void 0;for(u=0,l=o.length;u<l;u+=3){var h=o[u],c=o[u+1];o[u]=c,o[u+1]=h}}var p=o.length;if(2==p&&o.push(0),0!==p)return o}},e.prototype.readFlatPosList=function(t,e){var r=Ul(t,!1).replace(/^\s*|\s*$/g,""),i=e[0],n=i.srsName,o=i.srsDimension,s="enu";n&&(s=gr(n).getAxisOrientation());var a,l,u,h=r.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=XS(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=XS(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=XS(t.parentNode.getAttribute("srsDimension")):o&&(c=XS(o));for(var p=[
 ],d=0,f=h.length;d<f;d+=c)a=parseFloat(h[d]),l=parseFloat(h[d+1]),u=3===c?parseFloat(h[d+2]):0,"en"===s.substr(0,2)?p.push(a,l,u):p.push(l,a,u);return p},e.prototype.writePos_=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=n?"3":"2";t.setAttribute("srsDimension",o);var s=i.srsName,a="enu";s&&(a=gr(s).getAxisOrientation());var l,u=e.getCoordinates();(l="en"===a.substr(0,2)?u[0]+" "+u[1]:u[1]+" "+u[0],n)&&(l+=" "+(u[2]||0));JS(t,l)},e.prototype.getCoords_=function(t,e,r){var i="enu";e&&(i=gr(e).getAxisOrientation());var n="en"===i.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];r&&(n+=" "+(t[2]||0));return n},e.prototype.writePosList_=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=n?"3":"2";t.setAttribute("srsDimension",o);for(var s,a=i.srsName,l=e.getCoordinates(),u=l.length,h=new Array(u),c=0;c<u;++c)s=l[c],h[c]=this.getCoords_(s,a,n);JS(t,h.join(" "))},e.prototype.writePoint=function(t,e,r){var i=r[r.length-1].srsName;i&&t.setAttribute("srsName",i);var n=Bl(t.namespaceURI,"pos");t.appendCh
 ild(n),this.writePos_(n,e,r)},e.prototype.writeEnvelope=function(t,e,r){var i=r[r.length-1].srsName;i&&t.setAttribute("srsName",i);var n=[e[0]+" "+e[1],e[2]+" "+e[3]];ou({node:t},this.ENVELOPE_SERIALIZERS,Ql,n,r,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing=function(t,e,r){var i=r[r.length-1].srsName;i&&t.setAttribute("srsName",i);var n=Bl(t.namespaceURI,"posList");t.appendChild(n),this.writePosList_(n,e,r)},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var i=e[e.length-1],n=i.node,o=i.exteriorWritten;return void 0===o&&(i.exteriorWritten=!0),Bl(n.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();ou({node:t,hasZ:n,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,r,void 0,this)}else if("Surface"===t.nodeName){var a=Bl(t.namespac
 eURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,r)}},e.prototype.writeCurveOrLineString=function(t,e,r){var i=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&i&&t.setAttribute("srsName",i),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var n=Bl(t.namespaceURI,"posList");t.appendChild(n),this.writePosList_(n,e,r)}else if("Curve"===t.nodeName){var o=Bl(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName,s=i.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();ou({node:t,hasZ:n,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeMultiPoint=function(t,e,r){var i=r[r.length-1],n=i.srsName,o=i.hasZ;n&&t.setAttribute("srsName",n);var s=e.getPoints();ou({node:t,hasZ:o,srsName:n},this.POINTMEMBER_SERIALIZERS,$l("pointMember"),s,r,void 0,this)
 },e.prototype.writeMultiCurveOrLineString=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName,s=i.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();ou({node:t,hasZ:n,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeRing=function(t,e,r){var i=Bl(t.namespaceURI,"LinearRing");t.appendChild(i),this.writeLinearRing(i,e,r)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var i=this.GEOMETRY_NODE_FACTORY_(e,r);i&&(t.appendChild(i),this.writeSurfaceOrPolygon(i,e,r))},e.prototype.writePointMember=function(t,e,r){var i=Bl(t.namespaceURI,"Point");t.appendChild(i),this.writePoint(i,e,r)},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var i=this.GEOMETRY_NODE_FACTORY_(e,r);i&&(t.appendChild(i),this.writeCurveOrLineString(i,e,r))},e.prototype.writeSurfacePatches_=function(t,e,r){var i=Bl(t.namespaceURI,"PolygonPatch");t.appendChild(i),this.writeSurfaceOrPolygon(i,e,r)},e.protot
 ype.writeCurveSegments_=function(t,e,r){var i=Bl(t.namespaceURI,"LineStringSegment");t.appendChild(i),this.writeCurveOrLineString(i,e,r)},e.prototype.writeGeometryElement=function(t,e,r){var i,n=r[r.length-1],o=T({},n);o.node=t,i=Array.isArray(e)?zf(e,n):Gf(e,!0,n),ou(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[i],r,void 0,this)},e.prototype.writeFeatureElement=function(t,e,r){var i=e.getId();i&&t.setAttribute("fid",i);var n=r[r.length-1],o=n.featureNS,s=e.getGeometryName();n.serializers||(n.serializers={},n.serializers[o]={});var a=[],l=[];if(e.hasProperties()){var u=e.getProperties();for(var h in u){var c=u[h];null!==c&&(a.push(h),l.push(c),h==s||"function"==typeof c.getSimplifiedGeometry?h in n.serializers[o]||(n.serializers[o][h]=Hl(this.writeGeometryElement,this)):h in n.serializers[o]||(n.serializers[o][h]=Hl(JS)))}}var p=T({},n);p.node=t,ou(p,n.serializers,$l(void 0,o),l,r,a)},e.prototype.writeFeatureMembers_=function(t,e,r){var i=r[r.length-1],n=i.featureType,o=
 i.featureNS,s={};s[o]={},s[o][n]=Hl(this.writeFeatureElement,this);var a=T({},i);a.node=t,ou(a,s,$l(n,o),e,r)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var i=e[e.length-1].node;return Bl(this.namespace,QS[i.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var i,n=e[e.length-1],o=n.multiSurface,s=n.surface,a=n.curve,l=n.multiCurve;return Array.isArray(t)?i="Envelope":"MultiPolygon"===(i=t.getType())&&!0===o?i="MultiSurface":"Polygon"===i&&!0===s?i="Surface":"LineString"===i&&!0===a?i="Curve":"MultiLineString"===i&&!0===l&&(i="MultiCurve"),Bl(this.namespace,i)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var r=Bl(this.namespace,"geom"),i={node:r,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&T(i,e),this.writeGeometryElement(r,t,[i]),r},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Bl(this.namespace,"fe
 atureMembers");r.setAttributeNS(zl,"xsi:schemaLocation",this.schemaLocation);var i={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&T(i,e),this.writeFeatureMembers_(r,t,[i]),r},e}(GS);tT.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:ql(tT.prototype.readFlatPos),posList:ql(tT.prototype.readFlatPosList)}},tT.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:tT.prototype.interiorParser,exterior:tT.prototype.exteriorParser}},tT.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:ql(GS.prototype.readPoint),MultiPoint:ql(GS.prototype.readMultiPoint),LineString:ql(GS.prototype.readLineString),MultiLineString:ql(GS.prototype.readMultiLineString),LinearRing:ql(GS.prototype.readLinearRing),Polygon:ql(GS.prototype.readPolygon),MultiPolygon:ql(GS.prototype.readMultiPolygon),
 Surface:ql(tT.prototype.readSurface),MultiSurface:ql(tT.prototype.readMultiSurface),Curve:ql(tT.prototype.readCurve),MultiCurve:ql(tT.prototype.readMultiCurve),Envelope:ql(tT.prototype.readEnvelope)}},tT.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Xl(tT.prototype.curveMemberParser),curveMembers:Xl(tT.prototype.curveMemberParser)}},tT.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Xl(tT.prototype.surfaceMemberParser),surfaceMembers:Xl(tT.prototype.surfaceMemberParser)}},tT.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Xl(GS.prototype.readLineString),Curve:Xl(tT.prototype.readCurve)}},tT.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Xl(GS.prototype.readPolygon),Surface:Xl(tT.prototype.readSurface)}},tT.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:ql(tT.prototype.readPatch)}},tT.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:ql(tT.prototype.re
 adSegment)}},tT.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:Xl(tT.prototype.readFlatPosList),upperCorner:Xl(tT.prototype.readFlatPosList)}},tT.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:ql(tT.prototype.readPolygonPatch)}},tT.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:ql(tT.prototype.readLineStringSegment)}},tT.prototype.writeFeatures,tT.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:Hl(tT.prototype.writeRing),interior:Hl(tT.prototype.writeRing)}},tT.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:Hl(JS),upperCorner:Hl(JS)}},tT.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:Hl(tT.prototype.writeSurfaceOrPolygonMember),polygonMember:Hl(tT.prototype.writeSurfaceOrPolygonMember)}},tT.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:Hl(tT.prototype.writePointMember)}},tT.prototype.LINESTR
 INGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:Hl(tT.prototype.writeLineStringOrCurveMember),curveMember:Hl(tT.prototype.writeLineStringOrCurveMember)}},tT.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:Hl(tT.prototype.writeCurveOrLineString),MultiCurve:Hl(tT.prototype.writeMultiCurveOrLineString),Point:Hl(tT.prototype.writePoint),MultiPoint:Hl(tT.prototype.writeMultiPoint),LineString:Hl(tT.prototype.writeCurveOrLineString),MultiLineString:Hl(tT.prototype.writeMultiCurveOrLineString),LinearRing:Hl(tT.prototype.writeLinearRing),Polygon:Hl(tT.prototype.writeSurfaceOrPolygon),MultiPolygon:Hl(tT.prototype.writeMultiSurfaceOrPolygon),Surface:Hl(tT.prototype.writeSurfaceOrPolygon),MultiSurface:Hl(tT.prototype.writeMultiSurfaceOrPolygon),Envelope:Hl(tT.prototype.writeEnvelope)}};var eT=tT,rT=eT;rT.prototype.writeFeatures,rT.prototype.writeFeaturesNode;var iT=rT,nT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]
 }instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),oT={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},sT=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,i)||this).FEATURE_COLLECTION_PARSERS[NS].featureMember=Xl(r.readFeaturesInternal),r.schemaLocation=i.schemaLocation?i.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",r}return nT(e,t),e.prototype.readFlatCoordinates=function(t,e){var r=Ul(t,!1).replace(/^\s*|\s*$/g,""),i=e[0].srsName,n="enu";if(i){var o=gr(i);o&&(n=o.getAxisOrientation())}for(var s=r.trim().split(/\s+/),a=[],l=0,u=s.length;l<u;l++){var h=s[l].split(/,+/),c=parseFloat(h[0]),p=parseFloat(h[1]),d=3===h.length?parseFloat(h[2]):0;"en"===n.su
 bstr(0,2)?a.push(c,p,d):a.push(p,c,d)}return a},e.prototype.readBox=function(t,e){var r=iu([null],this.BOX_PARSERS_,t,e,this);return qt(r[1][0],r[1][1],r[1][3],r[1][4])},e.prototype.innerBoundaryIsParser=function(t,e){var r=iu(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.outerBoundaryIsParser=function(t,e){var r=iu(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var i,n=e[e.length-1],o=n.multiSurface,s=n.surface,a=n.multiCurve;return Array.isArray(t)?i="Envelope":"MultiPolygon"===(i=t.getType())&&!0===o?i="MultiSurface":"Polygon"===i&&!0===s?i="Surface":"MultiLineString"===i&&!0===a&&(i="MultiCurve"),Bl("http://www.opengis.net/gml",i)},e.prototype.writeFeatureElement=function(t,e,r){var i=e.getId();i&&t.setAttribute("fid",i);var n=r[r.length-1],o=n.featureNS,s=e.getGeometryName();n.serializers||(n.serializers={},n.serializers[o]={});var a=[],l=[];if(e.hasProperties()){var u=e.getProperties();f
 or(var h in u){var c=u[h];null!==c&&(a.push(h),l.push(c),h==s||"function"==typeof c.getSimplifiedGeometry?h in n.serializers[o]||(n.serializers[o][h]=Hl(this.writeGeometryElement,this)):h in n.serializers[o]||(n.serializers[o][h]=Hl(JS)))}}var p=T({},n);p.node=t,ou(p,n.serializers,$l(void 0,o),l,r,a)},e.prototype.writeCurveOrLineString=function(t,e,r){var i=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&i&&t.setAttribute("srsName",i),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var n=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(n),this.writeCoordinates_(n,e,r)}else if("Curve"===t.nodeName){var o=Bl(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var i=this.GEOMETRY_NODE_FACTORY_(e,r);i&&(t.appendChild(i),this.writeCurveOrLineString(i,e,r))},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName,s=i.curve;o&&t.setAtt
 ribute("srsName",o);var a=e.getLineStrings();ou({node:t,hasZ:n,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeGeometryElement=function(t,e,r){var i,n=r[r.length-1],o=T({},n);o.node=t,i=Array.isArray(e)?zf(e,n):Gf(e,!0,n),ou(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[i],r,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=Bl(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,r){for(var i=r[r.length-1],n=i.hasZ,o=i.srsName,s=e.getCoordinates(),a=s.length,l=new Array(a),u=0;u<a;++u){var h=s[u];l[u]=this.getCoords_(h,o,n)}JS(t,l.join(" "))},e.prototype.writeCurveSegments_=function(t,e,r){var i=Bl(t.namespaceURI,"LineStringSegment");t.appendChild(i),this.writeCurveOrLineString(i,e,r)},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName;
 if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();ou({node:t,hasZ:n,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,r,void 0,this)}else if("Surface"===t.nodeName){var a=Bl(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,r)}},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var i=e[e.length-1],n=i.node,o=i.exteriorWritten;return void 0===o&&(i.exteriorWritten=!0),Bl(n.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,r){var i=Bl(t.namespaceURI,"PolygonPatch");t.appendChild(i),this.writeSurfaceOrPolygon(i,e,r)},e.prototype.writeRing=function(t,e,r){var i=Bl(t.namespaceURI,"LinearRing");t.appendChild(i),this.writeLinearRing(i,e,r)},e.prototype.getCoords_=function(t,e,r){var i="enu";e&&(i=gr(e).getAxisOrientation());var n="en"===i.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];r&&(n+=","+(t[2]||0));return n},e.pro
 totype.writePoint=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName;o&&t.setAttribute("srsName",o);var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s);var a=e.getCoordinates();JS(s,this.getCoords_(a,o,n))},e.prototype.writeMultiPoint=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName;o&&t.setAttribute("srsName",o);var s=e.getPoints();ou({node:t,hasZ:n,srsName:o},this.POINTMEMBER_SERIALIZERS,$l("pointMember"),s,r,void 0,this)},e.prototype.writePointMember=function(t,e,r){var i=Bl(t.namespaceURI,"Point");t.appendChild(i),this.writePoint(i,e,r)},e.prototype.writeLinearRing=function(t,e,r){var i=r[r.length-1].srsName;i&&t.setAttribute("srsName",i);var n=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(n),this.writeCoordinates_(n,e,r)},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var i=r[r.length-1],n=i.hasZ,o=i.srsName,s=i.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();ou({node:t,hasZ:n,srsName:o,surface:s},this.SURFACEORPOLYG
 ONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var i=this.GEOMETRY_NODE_FACTORY_(e,r);i&&(t.appendChild(i),this.writeSurfaceOrPolygon(i,e,r))},e.prototype.writeEnvelope=function(t,e,r){var i=r[r.length-1].srsName;i&&t.setAttribute("srsName",i);var n=[e[0]+" "+e[1],e[2]+" "+e[3]];ou({node:t},this.ENVELOPE_SERIALIZERS,Ql,n,r,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var i=e[e.length-1].node;return Bl("http://www.opengis.net/gml",oT[i.nodeName])},e}(GS);sT.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:ql(sT.prototype.readFlatCoordinates)}},sT.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:sT.prototype.innerBoundaryIsParser,outerBoundaryIs:sT.prototype.outerBoundaryIsParser}},sT.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:Xl(sT.prototype.readFlat
 Coordinates)}},sT.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:ql(GS.prototype.readPoint),MultiPoint:ql(GS.prototype.readMultiPoint),LineString:ql(GS.prototype.readLineString),MultiLineString:ql(GS.prototype.readMultiLineString),LinearRing:ql(GS.prototype.readLinearRing),Polygon:ql(GS.prototype.readPolygon),MultiPolygon:ql(GS.prototype.readMultiPolygon),Box:ql(sT.prototype.readBox)}},sT.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:Hl(sT.prototype.writeCurveOrLineString),MultiCurve:Hl(sT.prototype.writeMultiCurveOrLineString),Point:Hl(sT.prototype.writePoint),MultiPoint:Hl(sT.prototype.writeMultiPoint),LineString:Hl(sT.prototype.writeCurveOrLineString),MultiLineString:Hl(sT.prototype.writeMultiCurveOrLineString),LinearRing:Hl(sT.prototype.writeLinearRing),Polygon:Hl(sT.prototype.writeSurfaceOrPolygon),MultiPolygon:Hl(sT.prototype.writeMultiSurfaceOrPolygon),Surface:Hl(sT.prototype.writeSurfaceOrPolygon),MultiSurface:Hl(sT.prototype.writeMulti
 SurfaceOrPolygon),Envelope:Hl(sT.prototype.writeEnvelope)}},sT.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:Hl(sT.prototype.writeLineStringOrCurveMember),curveMember:Hl(sT.prototype.writeLineStringOrCurveMember)}},sT.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:Hl(sT.prototype.writeRing),innerBoundaryIs:Hl(sT.prototype.writeRing)}},sT.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:Hl(sT.prototype.writePointMember)}},sT.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:Hl(sT.prototype.writeSurfaceOrPolygonMember),polygonMember:Hl(sT.prototype.writeSurfaceOrPolygonMember)}},sT.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:Hl(JS),upperCorner:Hl(JS)}};var aT=sT,lT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in 
 e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),uT=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,i)||this).schemaLocation=i.schemaLocation?i.schemaLocation:r.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",r}return lT(e,t),e}(eT);uT.prototype.namespace="http://www.opengis.net/gml/3.2",uT.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:ql(eT.prototype.readFlatPos),posList:ql(eT.prototype.readFlatPosList)}},uT.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:eT.prototype.interiorParser,exterior:eT.prototype.exteriorParser}},uT.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:ql(GS.prototype.readPoint),MultiPoint:ql(GS.prototype.readMultiPoint),LineString:ql(GS.prototype.readLineString),MultiLineString:ql(GS.prototype.readMultiLineString),LinearR
 ing:ql(GS.prototype.readLinearRing),Polygon:ql(GS.prototype.readPolygon),MultiPolygon:ql(GS.prototype.readMultiPolygon),Surface:ql(uT.prototype.readSurface),MultiSurface:ql(eT.prototype.readMultiSurface),Curve:ql(uT.prototype.readCurve),MultiCurve:ql(eT.prototype.readMultiCurve),Envelope:ql(uT.prototype.readEnvelope)}},uT.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Xl(eT.prototype.curveMemberParser),curveMembers:Xl(eT.prototype.curveMemberParser)}},uT.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Xl(eT.prototype.surfaceMemberParser),surfaceMembers:Xl(eT.prototype.surfaceMemberParser)}},uT.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Xl(GS.prototype.readLineString),Curve:Xl(eT.prototype.readCurve)}},uT.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Xl(GS.prototype.readPolygon),Surface:Xl(eT.prototype.readSurface)}},uT.prototype.SURFACE_PARSERS={"http://www.open
 gis.net/gml/3.2":{patches:ql(eT.prototype.readPatch)}},uT.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:ql(eT.prototype.readSegment)}},uT.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Xl(eT.prototype.readFlatPosList),upperCorner:Xl(eT.prototype.readFlatPosList)}},uT.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:ql(eT.prototype.readPolygonPatch)}},uT.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:ql(eT.prototype.readLineStringSegment)}},uT.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Xl(GS.prototype.pointMemberParser),pointMembers:Xl(GS.prototype.pointMemberParser)}},uT.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Xl(GS.prototype.lineStringMemberParser),lineStringMembers:Xl(GS.prototype.lineStringMemberParser)}},uT.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Xl(GS.prot
 otype.polygonMemberParser),polygonMembers:Xl(GS.prototype.polygonMemberParser)}},uT.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Xl(GS.prototype.readFlatCoordinatesFromNode)}},uT.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Xl(GS.prototype.readLineString)}},uT.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Xl(GS.prototype.readPolygon)}},uT.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:ql(GS.prototype.readFlatLinearRing)}},uT.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:Hl(eT.prototype.writeRing),interior:Hl(eT.prototype.writeRing)}},uT.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Hl(JS),upperCorner:Hl(JS)}},uT.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Hl(eT.prototype.writeSurfaceOrPolygonMember),polygonMember:Hl(eT.prototype.writeSurfaceOrPolygonMember)}},uT.prot
 otype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:Hl(eT.prototype.writePointMember)}},uT.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Hl(eT.prototype.writeLineStringOrCurveMember),curveMember:Hl(eT.prototype.writeLineStringOrCurveMember)}},uT.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:Hl(eT.prototype.writeCurveOrLineString),MultiCurve:Hl(eT.prototype.writeMultiCurveOrLineString),Point:Hl(uT.prototype.writePoint),MultiPoint:Hl(eT.prototype.writeMultiPoint),LineString:Hl(eT.prototype.writeCurveOrLineString),MultiLineString:Hl(eT.prototype.writeMultiCurveOrLineString),LinearRing:Hl(eT.prototype.writeLinearRing),Polygon:Hl(eT.prototype.writeSurfaceOrPolygon),MultiPolygon:Hl(eT.prototype.writeMultiSurfaceOrPolygon),Surface:Hl(eT.prototype.writeSurfaceOrPolygon),MultiSurface:Hl(eT.prototype.writeMultiSurfaceOrPolygon),Envelope:Hl(eT.prototype.writeEnvelope)}};var hT=uT,cT=function(
 ){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),pT=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],dT={rte:BT,trk:UT,wpt:YT},fT=eu(pT,{rte:Xl(BT),trk:Xl(UT),wpt:Xl(YT)}),gT=eu(pT,{text:Kl(qS,"linkText"),type:Kl(qS,"linkType")}),yT=eu(pT,{rte:Hl((function(t,e,r){var i=r[0],n=e.getProperties(),o={node:t};o.properties=n;var s=e.getGeometry();if(s.getType()==gt.LINE_STRING){var a=Gf(s,!0,i);o.geometryLayout=a.getLayout(),n.rtept=a.getCoordinates()}var l=r[r.length-1].node,u=ET[l.namespaceURI],h=tu(n,u);ou(o,RT,Ql,h,r,u)})),trk:Hl((function(t,e,r){var i=r[0],n=e.getProperties(),o={node:t};o.properties=n;var s=e.getGeometry();if(s.getType()==gt.MULTI_LINE_STRING){var a=Gf(s,!0,i);n.trkseg=a.
 getLineStrings()}var l=r[r.length-1].node,u=IT[l.namespaceURI],h=tu(n,u);ou(o,OT,Ql,h,r,u)})),wpt:Hl((function(t,e,r){var i=r[0],n=r[r.length-1];n.properties=e.getProperties();var o=e.getGeometry();if(o.getType()==gt.POINT){var s=Gf(o,!0,i);n.geometryLayout=s.getLayout(),VT(t,s.getCoordinates(),r)}}))}),mT=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.dataProjection=gr("EPSG:4326"),r.readExtensions_=i.readExtensions,r}return cT(e,t),e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,r=t.length;e<r;++e){var i=t[e];if(this.readExtensions_){var n=i.get("extensionsNode_")||null;this.readExtensions_(i,n)}i.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!f(pT,t.namespaceURI))return null;var r=dT[t.localName];if(!r)return null;var i=r(t,[this.getReadOptions(t,e)]);return i?(this.handleReadExtensions_([i]),i):null},e.prototype.readFeaturesFromNode=function(t,e){if(!f(pT,t.namespaceURI))return[];if("gpx"==t.localName){v
 ar r=iu([],fT,t,[this.getReadOptions(t,e)]);return r?(this.handleReadExtensions_(r),r):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Bl("http://www.topografix.com/GPX/1/1","gpx");return r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",zl),r.setAttributeNS(zl,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),r.setAttribute("version","1.1"),r.setAttribute("creator","OpenLayers"),ou({node:r},yT,NT,t,[e]),r},e}(AS),_T=eu(pT,{name:Kl(qS),cmt:Kl(qS),desc:Kl(qS),src:Kl(qS),link:GT,number:Kl(VS),extensions:zT,type:Kl(qS),rtept:function(t,e){var r=iu({},vT,t,e);if(r){var i=e[e.length-1],n=i.flatCoordinates,o=i.layoutOptions;jT(n,o,t,r)}}}),vT=eu(pT,{ele:Kl(YS),time:Kl(US)}),xT=eu(pT,{name:Kl(qS),cmt:Kl(qS),desc:Kl(qS),src:Kl(qS),link:GT,number:Kl(VS),type:Kl(qS),extensions:zT,trkseg:function(t,e){var r=e[e.length-1];ru(wT,t,e);var i=r.flatCoordinates;r.ends.push(i.length)}}),wT=eu(pT,{trkpt:
 function(t,e){var r=iu({},bT,t,e);if(r){var i=e[e.length-1],n=i.flatCoordinates,o=i.layoutOptions;jT(n,o,t,r)}}}),bT=eu(pT,{ele:Kl(YS),time:Kl(US)}),ST=eu(pT,{ele:Kl(YS),time:Kl(US),magvar:Kl(YS),geoidheight:Kl(YS),name:Kl(qS),cmt:Kl(qS),desc:Kl(qS),src:Kl(qS),link:GT,sym:Kl(qS),type:Kl(qS),fix:Kl(qS),sat:Kl(VS),hdop:Kl(YS),vdop:Kl(YS),pdop:Kl(YS),ageofdgpsdata:Kl(YS),dgpsid:Kl(VS),extensions:zT}),TT=["text","type"],CT=eu(pT,{text:Hl(JS),type:Hl(JS)}),ET=eu(pT,["name","cmt","desc","src","link","number","type","rtept"]),RT=eu(pT,{name:Hl(JS),cmt:Hl(JS),desc:Hl(JS),src:Hl(JS),link:Hl(WT),number:Hl(HS),type:Hl(JS),rtept:Jl(Hl(VT))}),PT=eu(pT,["ele","time"]),IT=eu(pT,["name","cmt","desc","src","link","number","type","trkseg"]),OT=eu(pT,{name:Hl(JS),cmt:Hl(JS),desc:Hl(JS),src:Hl(JS),link:Hl(WT),number:Hl(HS),type:Hl(JS),trkseg:Jl(Hl((function(t,e,r){var i={node:t};i.geometryLayout=e.getLayout(),i.properties={},ou(i,MT,LT,e.getCoordinates(),r)})))}),LT=$l("trkpt"),MT=eu(pT,{trkpt:Hl(VT)})
 ,FT=eu(pT,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),AT=eu(pT,{ele:Hl(KS),time:Hl((function(t,e){var r=new Date(1e3*e),i=r.getUTCFullYear()+"-"+Je(r.getUTCMonth()+1,2)+"-"+Je(r.getUTCDate(),2)+"T"+Je(r.getUTCHours(),2)+":"+Je(r.getUTCMinutes(),2)+":"+Je(r.getUTCSeconds(),2)+"Z";t.appendChild(lu().createTextNode(i))})),magvar:Hl(KS),geoidheight:Hl(KS),name:Hl(JS),cmt:Hl(JS),desc:Hl(JS),src:Hl(JS),link:Hl(WT),sym:Hl(JS),type:Hl(JS),fix:Hl(JS),sat:Hl(HS),hdop:Hl(KS),vdop:Hl(KS),pdop:Hl(KS),ageofdgpsdata:Hl(KS),dgpsid:Hl(HS)}),kT={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function NT(t,e,r){var i=t.getGeometry();if(i){var n=kT[i.getType()];if(n)return Bl(e[e.length-1].node.namespaceURI,n)}}function jT(t,e,r,i){return t.push(parseFloat(r.getAttribute("lon")),parseFloat(r.getAttribute("lat"))),"ele"in i?(t.push(i.ele),delete i.ele,e.hasZ=!0):t.push(0),"time"in i?(t.push(i.time),de
 lete i.time,e.hasM=!0):t.push(0),t}function DT(t,e,r){var i=ct,n=2;if(t.hasZ&&t.hasM?(i=ft,n=4):t.hasZ?(i=pt,n=3):t.hasM&&(i=dt,n=3),4!==n){for(var o=0,s=e.length/4;o<s;o++)e[o*n]=e[4*o],e[o*n+1]=e[4*o+1],t.hasZ&&(e[o*n+2]=e[4*o+2]),t.hasM&&(e[o*n+2]=e[4*o+3]);if(e.length=e.length/4*n,r)for(o=0,s=r.length;o<s;o++)r[o]=r[o]/4*n}return i}function GT(t,e){var r=e[e.length-1],i=t.getAttribute("href");null!==i&&(r.link=i),ru(gT,t,e)}function zT(t,e){e[e.length-1].extensionsNode_=t}function BT(t,e){var r=e[0],i=iu({flatCoordinates:[],layoutOptions:{}},_T,t,e);if(i){var n=i.flatCoordinates;delete i.flatCoordinates;var o=i.layoutOptions;delete i.layoutOptions;var s=DT(o,n),a=new Tf(n,s);Gf(a,!1,r);var l=new ht(a);return l.setProperties(i,!0),l}}function UT(t,e){var r=e[0],i=iu({flatCoordinates:[],ends:[],layoutOptions:{}},xT,t,e);if(i){var n=i.flatCoordinates;delete i.flatCoordinates;var o=i.ends;delete i.ends;var s=i.layoutOptions;delete i.layoutOptions;var a=DT(s,n,o),l=new Uf(n,a,o);Gf(l
 ,!1,r);var u=new ht(l);return u.setProperties(i,!0),u}}function YT(t,e){var r=e[0],i=iu({},ST,t,e);if(i){var n={},o=jT([],n,t,i),s=DT(n,o),a=new pi(o,s);Gf(a,!1,r);var l=new ht(a);return l.setProperties(i,!0),l}}function WT(t,e,r){t.setAttribute("href",e);var i=r[r.length-1].properties,n=[i.linkText,i.linkType];ou({node:t},CT,Ql,n,r,TT)}function VT(t,e,r){var i=r[r.length-1],n=i.node.namespaceURI,o=i.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),i.geometryLayout){case ft:0!==e[3]&&(o.time=e[3]);case pt:0!==e[2]&&(o.ele=e[2]);break;case dt:0!==e[2]&&(o.time=e[2])}var s="rtept"==t.nodeName?PT[n]:FT[n],a=tu(o,s);ou({node:t,properties:o},AT,Ql,a,r,s)}var XT=mT,qT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null==
 =r?Object.create(r):(i.prototype=r.prototype,new i)}}();function ZT(t,e){if(!t)return null;var r;switch(t.type){case gt.POINT:r=function(t){return new pi(t.coordinates)}(t);break;case gt.LINE_STRING:r=function(t){return new Tf(t.coordinates)}(t);break;case gt.POLYGON:r=function(t){return new Pi(t.coordinates)}(t);break;case gt.MULTI_POINT:r=function(t){return new Wf(t.coordinates)}(t);break;case gt.MULTI_LINE_STRING:r=function(t){return new Uf(t.coordinates)}(t);break;case gt.MULTI_POLYGON:r=function(t){return new qf(t.coordinates)}(t);break;case gt.GEOMETRY_COLLECTION:r=function(t,e){var r=t.geometries.map((function(t){return ZT(t,e)}));return new wS(r)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Gf(r,!1,e)}function KT(t,e){var r,i=(t=Gf(t,!0,e)).getType();switch(i){case gt.POINT:r=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case gt.LINE_STRING:r=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}
 (t);break;case gt.POLYGON:r=function(t,e){var r;e&&(r=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(r)}}(t,e);break;case gt.MULTI_POINT:r=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case gt.MULTI_LINE_STRING:r=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case gt.MULTI_POLYGON:r=function(t,e){var r;e&&(r=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(r)}}(t,e);break;case gt.GEOMETRY_COLLECTION:r=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var r=T({},e);return delete r.featureProjection,KT(t,r)}))}}(t,e);break;case gt.CIRCLE:r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return r}var HT=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this)||this).dataProjection=gr(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(r.defaul
 tFeatureProjection=gr(i.featureProjection)),r.geometryName_=i.geometryName,r.extractGeometryName_=i.extractGeometryName,r}return qT(e,t),e.prototype.readFeatureFromObject=function(t,e){var r=null,i=ZT((r="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),n=new ht;return this.geometryName_?n.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in r!==void 0&&n.setGeometryName(r.geometry_name),n.setGeometry(i),"id"in r&&n.setId(r.id),r.properties&&n.setProperties(r.properties,!0),n},e.prototype.readFeaturesFromObject=function(t,e){var r=null;if("FeatureCollection"===t.type){r=[];for(var i=t.features,n=0,o=i.length;n<o;++n)r.push(this.readFeatureFromObject(i[n],e))}else r=[this.readFeatureFromObject(t,e)];return r},e.prototype.readGeometryFromObject=function(t,e){return ZT(t,e)},e.prototype.readProjectionFromObject=function(t){var e,r=t.crs;return r?"name"==r.type?e=gr(r.properties.name):"EPSG"===r.type?e=gr("EPSG:"+r.properties.code)
 :lt(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={type:"Feature",geometry:null,properties:null},i=t.getId();if(void 0!==i&&(r.id=i),!t.hasProperties())return r;var n=t.getProperties(),o=t.getGeometry();return o&&(r.geometry=KT(o,e),delete n[t.getGeometryName()]),R(n)||(r.properties=n),r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],i=0,n=t.length;i<n;++i)r.push(this.writeFeatureObject(t[i],e));return{type:"FeatureCollection",features:r}},e.prototype.writeGeometryObject=function(t,e){return KT(t,this.adaptOptions(e))},e}(TS),JT=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function $T(t){return"string"==typeof
  t?t:""}var QT,tC,eC,rC,iC,nC,oC,sC=function(t){function e(){return t.call(this)||this}return JT(e,t),e.prototype.getType=function(){return yl},e.prototype.readFeature=function(t,e){return this.readFeatureFromText($T(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return i()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText($T(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return i()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText($T(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return i()},e.prototype.readProjection=function(t){return this.readProjectionFromText($T(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return i()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t
 ,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return i()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return i()},e}(Df),aC=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),lC="barometric",uC="gps",hC="none",cC=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,pC=/^H.([A-Z]{3}).*?:(.*)/,dC=/^HFDTE(\d{2})(\d{2})(\d{2})/,fC=/\r\n|\r|\n/,gC=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.dataProjection=gr("EPSG:4326"),r.altitudeMode_=i.altitudeMode?i.altitudeMode:hC,r}return aC(e,t),e.prototype.readFeatureFromText=function(t,e){var r,i,n=thi
 s.altitudeMode_,o=t.split(fC),s={},a=[],l=2e3,u=0,h=1,c=-1;for(r=0,i=o.length;r<i;++r){var p=o[r],d=void 0;if("B"==p.charAt(0)){if(d=cC.exec(p)){var f=parseInt(d[1],10),g=parseInt(d[2],10),y=parseInt(d[3],10),m=parseInt(d[4],10)+parseInt(d[5],10)/6e4;"S"==d[6]&&(m=-m);var _=parseInt(d[7],10)+parseInt(d[8],10)/6e4;if("W"==d[9]&&(_=-_),a.push(_,m),n!=hC){var v=void 0;v=n==uC?parseInt(d[11],10):n==lC?parseInt(d[12],10):0,a.push(v)}var x=Date.UTC(l,u,h,f,g,y);x<c&&(x=Date.UTC(l,u,h+1,f,g,y)),a.push(x/1e3),c=x}}else"H"==p.charAt(0)&&((d=dC.exec(p))?(h=parseInt(d[1],10),u=parseInt(d[2],10)-1,l=2e3+parseInt(d[3],10)):(d=pC.exec(p))&&(s[d[1]]=d[2].trim()))}if(0===a.length)return null;var w=new Tf(a,n==hC?dt:ft),b=new ht(Gf(w,!1,e));return b.setProperties(s,!0),b},e.prototype.readFeaturesFromText=function(t,e){var r=this.readFeatureFromText(t,e);return r?[r]:[]},e}(sC),yC=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=
 e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),mC=["http://www.google.com/kml/ext/2.2"],_C=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],vC={fraction:Gu,pixels:zu,insetPixels:zu},xC=eu(_C,{ExtendedData:dE,Region:fE,MultiGeometry:Kl(nE,"geometry"),LineString:Kl(eE,"geometry"),LinearRing:Kl(rE,"geometry"),Point:Kl(oE,"geometry"),Polygon:Kl(aE,"geometry"),Style:Kl(uE),StyleMap:function(t,e){var r=BC.call(this,t,e);if(!r)return;var i=e[e.length-1];Array.isArray(r)?i.Style=r:"string"==typeof r?i.styleUrl=r:lt(!1,38)},address:Kl(qS),description:Kl(qS),name:Kl(qS),open:Kl(zS),phoneNumber:Kl(qS),styleUrl:Kl(DC),visibility:Kl(zS)},eu(mC,{MultiTrack:Kl((function(t,e){var r=iu([],ZC,t,e);if(!r)return;return new Uf(r)}),"geometry"),Track:Kl(H
 C,"geometry")})),wC=eu(_C,{ExtendedData:dE,Region:fE,Link:function(t,e){ru(bC,t,e)},address:Kl(qS),description:Kl(qS),name:Kl(qS),open:Kl(zS),phoneNumber:Kl(qS),visibility:Kl(zS)}),bC=eu(_C,{href:Kl(DC)}),SC=eu(_C,{LatLonAltBox:function(t,e){var r=iu({},mE,t,e);if(!r)return;var i=e[e.length-1],n=[parseFloat(r.west),parseFloat(r.south),parseFloat(r.east),parseFloat(r.north)];i.extent=n,i.altitudeMode=r.altitudeMode,i.minAltitude=parseFloat(r.minAltitude),i.maxAltitude=parseFloat(r.maxAltitude)},Lod:function(t,e){var r=iu({},_E,t,e);if(!r)return;var i=e[e.length-1];i.minLodPixels=parseFloat(r.minLodPixels),i.maxLodPixels=parseFloat(r.maxLodPixels),i.minFadeExtent=parseFloat(r.minFadeExtent),i.maxFadeExtent=parseFloat(r.maxFadeExtent)}}),TC=eu(_C,["Document","Placemark"]),CC=eu(_C,{Document:Hl((function(t,e,r){ou({node:t},SE,TE,e,r,void 0,this)})),Placemark:Hl(ZE)}),EC=null;var RC,PC=null;var IC,OC=null;var LC=null;var MC=null;var FC,AC=null;var kC=function(t){function e(e){var r=t.cal
 l(this)||this,i=e||{};return AC||(EC=new Du({color:QT=[255,255,255,1]}),PC=new th({anchor:tC=[20,2],anchorOrigin:Bu,anchorXUnits:eC=zu,anchorYUnits:rC=zu,crossOrigin:"anonymous",rotation:0,scale:oC=.5,size:iC=[64,64],src:nC="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),RC="NO_IMAGE",OC=new eh({color:QT,width:1}),IC=new eh({color:[51,51,51,1],width:2}),LC=new hh({font:"bold 16px Helvetica",fill:EC,stroke:IC,scale:.8}),MC=new ah({fill:EC,image:PC,text:LC,stroke:OC,zIndex:0}),AC=[MC]),r.dataProjection=gr("EPSG:4326"),r.defaultStyle_=i.defaultStyle?i.defaultStyle:AC,r.extractStyles_=void 0===i.extractStyles||i.extractStyles,r.writeStyles_=void 0===i.writeStyles||i.writeStyles,r.sharedStyles_={},r.showPointNames_=void 0===i.showPointNames||i.showPointNames,r.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",r}return yC(e,t),e.prototype.readDocumentOrFolder_=function(t,e){var r=iu([],eu(_C,{Document:Vl(this.readDocumentOrFolder_,this),Folder:Vl(this.readDocu
 mentOrFolder_,this),Placemark:Xl(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this);return r||void 0},e.prototype.readPlacemark_=function(t,e){var r=iu({geometry:null},xC,t,e,this);if(r){var i=new ht,n=t.getAttribute("id");null!==n&&i.setId(n);var o=e[0],s=r.geometry;if(s&&Gf(s,!1,o),i.setGeometry(s),delete r.geometry,this.extractStyles_){var a=function(t,e,r,i,n){return function(o,s){var a=n,l="",u=[];if(a){var h=o.getGeometry();if(h){var c=h.getType();a=c===gt.GEOMETRY_COLLECTION?(u=h.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===gt.POINT||e===gt.MULTI_POINT}))).length>0:c===gt.POINT||c===gt.MULTI_POINT}}a&&(l=o.get("name"),(a=a&&!!l)&&l.search(/&[^&]+;/)>-1&&(FC||(FC=document.createElement("textarea")),FC.innerHTML=l,l=FC.value));var p=r;if(t?p=t:e&&(p=function t(e,r,i){return Array.isArray(e)?e:"string"==typeof e?(!(e in i)&&"#"+e in i&&(e="#"+e),t(i[e],r,i)):r}(e,r,i)),a){var
  d=function(t,e){var r=[0,0],i="start",n=t.getImage();if(n){var o=n.getImageSize();if(null===o&&(o=iC),2==o.length){var s=n.getScaleArray();r[0]=s[0]*o[0]/2,r[1]=-s[1]*o[1]/2,i="left"}}var a=t.getText();a?((a=a.clone()).setFont(a.getFont()||LC.getFont()),a.setScale(a.getScale()||LC.getScale()),a.setFill(a.getFill()||LC.getFill()),a.setStroke(a.getStroke()||IC)):a=LC.clone();return a.setText(e),a.setOffsetX(r[0]),a.setOffsetY(r[1]),a.setTextAlign(i),new ah({image:n,text:a})}(p[0],l);return u.length>0?(d.setGeometry(new wS(u)),[d,new ah({geometry:p[0].getGeometry(),image:null,fill:p[0].getFill(),stroke:p[0].getStroke(),text:null})].concat(p.slice(1))):d}return p}}(r.Style,r.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);i.setStyle(a)}return delete r.Style,i.setProperties(r,!0),i}},e.prototype.readSharedStyle_=function(t,e){var r=t.getAttribute("id");if(null!==r){var i=uE.call(this,t,e);if(i){var n=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href
 ),o)n=new URL("#"+r,o).href;else n="#"+r;this.sharedStyles_[n]=i}}},e.prototype.readSharedStyleMap_=function(t,e){var r=t.getAttribute("id");if(null!==r){var i=BC.call(this,t,e);if(i){var n,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)n=new URL("#"+r,o).href;else n="#"+r;this.sharedStyles_[n]=i}}},e.prototype.readFeatureFromNode=function(t,e){if(!f(_C,t.namespaceURI))return null;var r=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return r||null},e.prototype.readFeaturesFromNode=function(t,e){if(!f(_C,t.namespaceURI))return[];var r,i=t.localName;if("Document"==i||"Folder"==i)return(r=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==i){var n=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return n?[n]:[]}if("kml"==i){r=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,e);s&&m(r,s)}return r}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=Wl(t);return this.readNa
 meFromDocument(e)}return Yl(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var r=this.readNameFromNode(e);if(r)return r}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(f(_C,e.namespaceURI)&&"name"==e.localName)return qS(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var r=e.localName;if(f(_C,e.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var i=this.readNameFromNode(e);if(i)return i}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var r=Wl(t);m(e,this.readNetworkLinksFromDocument(r))}else Yl(t)?m(e,this.readNetworkLinksFromDocument(t)):m(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&m(e,this.readNetworkLinksFromNod
 e(r));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(f(_C,r.namespaceURI)&&"NetworkLink"==r.localName){var i=iu({},wC,r,[]);e.push(i)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var n=r.localName;!f(_C,r.namespaceURI)||"Document"!=n&&"Folder"!=n&&"kml"!=n||m(e,this.readNetworkLinksFromNode(r))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var r=Wl(t);m(e,this.readRegionFromDocument(r))}else Yl(t)?m(e,this.readRegionFromDocument(t)):m(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&m(e,this.readRegionFromNode(r));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(f(_C,r.namespaceURI)&&"Region"==r.localName){var i=iu({},SC,r,[]);e.push(i)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var n
 =r.localName;!f(_C,r.namespaceURI)||"Document"!=n&&"Folder"!=n&&"kml"!=n||m(e,this.readRegionFromNode(r))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=Bl(_C[4],"kml"),i="http://www.w3.org/2000/xmlns/";r.setAttributeNS(i,"xmlns:gx",mC[0]),r.setAttributeNS(i,"xmlns:xsi",zl),r.setAttributeNS(zl,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var n={node:r},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=TC[r.namespaceURI],a=tu(o,s);return ou(n,CC,Ql,a,[e],s,this),r},e}(AS);function NC(t){var e=Ul(t,!1),r=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(r){var i=r[1];return[parseInt(i.substr(6,2),16),parseInt(i.substr(4,2),16),parseInt(i.substr(2,2),16),parseInt(i.substr(0,2),16)/255]}}function jC(t){for(var e,r=Ul(t,!1),i=[],n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;e=n.exec(r);){var o=parseF
 loat(e[1]),s=parseFloat(e[2]),a=e[3]?parseFloat(e[3]):0;i.push(o,s,a),r=r.substr(e[0].length)}if(""===r)return i}function DC(t){var e=Ul(t,!1).trim(),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function GC(t){return YS(t)}var zC=eu(_C,{Pair:function(t,e){var r=iu({},gE,t,e,this);if(!r)return;var i=r.key;if(i&&"normal"==i){var n=r.styleUrl;n&&(e[e.length-1]=n);var o=r.Style;o&&(e[e.length-1]=o)}}});function BC(t,e){return iu(void 0,zC,t,e,this)}var UC=eu(_C,{Icon:Kl((function(t,e){var r=iu({},JC,t,e);return r||null})),color:Kl(NC),heading:Kl(YS),hotSpot:Kl((function(t){var e,r=t.getAttribute("xunits"),i=t.getAttribute("yunits");return e="insetPixels"!==r?"insetPixels"!==i?Bu:Yu:"insetPixels"!==i?Uu:Wu,{x:parseFloat(t.getAttribute("x")),xunits:vC[r],y:parseFloat(t.getAttribute("y")),yunits:vC[i],origin:e}})),scale:Kl(GC)});var YC=eu(_C,{color:Kl(NC),scale:Kl(GC)});var WC=eu(_C,{color:Kl(NC),width:Kl(YS)});var VC=eu(_C,{color:Kl(NC),fill:Kl(zS
 ),outline:Kl(zS)});var XC=eu(_C,{coordinates:ql(jC)});function qC(t,e){return iu(null,XC,t,e)}var ZC=eu(mC,{Track:Xl(HC)});var KC=eu(_C,{when:function(t,e){var r=e[e.length-1].whens,i=Ul(t,!1),n=Date.parse(i);r.push(isNaN(n)?0:n)}},eu(mC,{coord:function(t,e){var r=e[e.length-1].flatCoordinates,i=Ul(t,!1),n=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(i);if(n){var o=parseFloat(n[1]),s=parseFloat(n[2]),a=parseFloat(n[3]);r.push(o,s,a,0)}else r.push(0,0,0,0)}}));function HC(t,e){var r=iu({flatCoordinates:[],whens:[]},KC,t,e);if(r){for(var i=r.flatCoordinates,n=r.whens,o=0,s=Math.min(i.length,n.length);o<s;++o)i[4*o+3]=n[o];return new Tf(i,ft)}}var JC=eu(_C,{href:Kl(DC)},eu(mC,{x:Kl(YS),y:Kl(YS),w:Kl(YS),h:Kl(YS)}));var $C=eu(_C,{coordinates:ql(jC)});function QC(t,e){return iu(null,$C,t,e)}var tE=eu(_C,{extrude:Kl(zS),tessellate:Kl(zS),altitudeMode:Kl(qS)});function eE(t,e){var r=iu({},tE,t,e),i=QC(t,e
 );if(i){var n=new Tf(i,pt);return n.setProperties(r,!0),n}}function rE(t,e){var r=iu({},tE,t,e),i=QC(t,e);if(i){var n=new Pi(i,pt,[i.length]);return n.setProperties(r,!0),n}}var iE=eu(_C,{LineString:Xl(eE),LinearRing:Xl(rE),MultiGeometry:Xl(nE),Point:Xl(oE),Polygon:Xl(aE)});function nE(t,e){var r,i=iu([],iE,t,e);if(!i)return null;if(0===i.length)return new wS(i);for(var n=!0,o=i[0].getType(),s=1,a=i.length;s<a;++s)if(i[s].getType()!=o){n=!1;break}if(n){var l=void 0,u=void 0;if(o==gt.POINT){var h=i[0];l=h.getLayout(),u=h.getFlatCoordinates();for(s=1,a=i.length;s<a;++s)m(u,i[s].getFlatCoordinates());hE(r=new Wf(u,l),i)}else o==gt.LINE_STRING?hE(r=new Uf(i),i):o==gt.POLYGON?hE(r=new qf(i),i):o==gt.GEOMETRY_COLLECTION?r=new wS(i):lt(!1,37)}else r=new wS(i);return(r)}function oE(t,e){var r=iu({},tE,t,e),i=QC(t,e);if(i){var n=new pi(i,pt);return n.setProperties(r,!0),n}}var sE=eu(_C,{innerBoundaryIs:function(t,e){var r=iu(void 0,vE,t,e);if(r){e[e.length-1].push(r)}},outerBoundaryIs:functi
 on(t,e){var r=iu(void 0,xE,t,e);if(r){e[e.length-1][0]=r}}});function aE(t,e){var r=iu({},tE,t,e),i=iu([null],sE,t,e);if(i&&i[0]){for(var n=i[0],o=[n.length],s=1,a=i.length;s<a;++s)m(n,i[s]),o.push(n.length);var l=new Pi(n,pt,o);return l.setProperties(r,!0),l}}var lE=eu(_C,{IconStyle:function(t,e){var r=iu({},UC,t,e);if(r){var i,n,o,s,a=e[e.length-1],l="Icon"in r?r.Icon:{},u=!("Icon"in r)||Object.keys(l).length>0,h=l.href;h?i=h:u&&(i=nC);var c,p=Bu,d=r.hotSpot;d?(n=[d.x,d.y],o=d.xunits,s=d.yunits,p=d.origin):i===nC?(n=tC,o=eC,s=rC):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(i)&&(n=[.5,0],o=Gu,s=Gu);var f,g=l.x,y=l.y;void 0!==g&&void 0!==y&&(c=[g,y]);var m,_=l.w,v=l.h;void 0!==_&&void 0!==v&&(f=[_,v]);var x=r.heading;void 0!==x&&(m=Re(x));var w=r.scale,b=r.color;if(u){i==nC&&(f=iC,void 0===w&&(w=oC));var S=new th({anchor:n,anchorOrigin:p,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.crossOrigin_,offset:c,offsetOrigin:Bu,rotation:m,scale:w,size:f,src:i,color:b});a.imageStyle=S}
 else a.imageStyle=RC}},LabelStyle:function(t,e){var r=iu({},YC,t,e);if(r){var i=e[e.length-1],n=new hh({fill:new Du({color:"color"in r?r.color:QT}),scale:r.scale});i.textStyle=n}},LineStyle:function(t,e){var r=iu({},WC,t,e);if(r){var i=e[e.length-1],n=new eh({color:"color"in r?r.color:QT,width:"width"in r?r.width:1});i.strokeStyle=n}},PolyStyle:function(t,e){var r=iu({},VC,t,e);if(r){var i=e[e.length-1],n=new Du({color:"color"in r?r.color:QT});i.fillStyle=n;var o=r.fill;void 0!==o&&(i.fill=o);var s=r.outline;void 0!==s&&(i.outline=s)}}});function uE(t,e){var r=iu({},lE,t,e,this);if(!r)return null;var i,n="fillStyle"in r?r.fillStyle:EC,o=r.fill;void 0===o||o||(n=null),"imageStyle"in r?r.imageStyle!=RC&&(i=r.imageStyle):i=PC;var s="textStyle"in r?r.textStyle:LC,a="strokeStyle"in r?r.strokeStyle:OC,l=r.outline;return void 0===l||l?[new ah({fill:n,image:i,stroke:a,text:s,zIndex:void 0})]:[new ah({geometry:function(t){var e=t.getGeometry(),r=e.getType();return r===gt.GEOMETRY_COLLECTION?
 new wS(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e!==gt.POLYGON&&e!==gt.MULTI_POLYGON}))):r!==gt.POLYGON&&r!==gt.MULTI_POLYGON?e:void 0},fill:n,image:i,stroke:a,text:s,zIndex:void 0}),new ah({geometry:function(t){var e=t.getGeometry(),r=e.getType();return r===gt.GEOMETRY_COLLECTION?new wS(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===gt.POLYGON||e===gt.MULTI_POLYGON}))):r===gt.POLYGON||r===gt.MULTI_POLYGON?e:void 0},fill:n,stroke:null,zIndex:void 0})]}function hE(t,e){var r,i,n,o=e.length,s=new Array(e.length),a=new Array(e.length),l=new Array(e.length);r=!1,i=!1,n=!1;for(var u=0;u<o;++u){var h=e[u];s[u]=h.get("extrude"),a[u]=h.get("tessellate"),l[u]=h.get("altitudeMode"),r=r||void 0!==s[u],i=i||void 0!==a[u],n=n||l[u]}r&&t.set("extrude",s),i&&t.set("tessellate",a),n&&t.set("altitudeMode",l)}var cE=eu(_C,{displayName:Kl(qS),value:Kl(qS)});var pE=eu(_C,{Data:function(t,e){var r=t.getAttribute("name");ru(cE,t,e);var
  i=e[e.length-1];r&&i.displayName?i[r]={value:i.value,displayName:i.displayName,toString:function(){return i.value}}:null!==r?i[r]=i.value:null!==i.displayName&&(i[i.displayName]=i.value),delete i.value},SchemaData:function(t,e){ru(yE,t,e)}});function dE(t,e){ru(pE,t,e)}function fE(t,e){ru(SC,t,e)}var gE=eu(_C,{Style:Kl(uE),key:Kl(qS),styleUrl:Kl(DC)});var yE=eu(_C,{SimpleData:function(t,e){var r=t.getAttribute("name");if(null!==r){var i=qS(t);e[e.length-1][r]=i}}});var mE=eu(_C,{altitudeMode:Kl(qS),minAltitude:Kl(YS),maxAltitude:Kl(YS),north:Kl(YS),south:Kl(YS),east:Kl(YS),west:Kl(YS)});var _E=eu(_C,{minLodPixels:Kl(YS),maxLodPixels:Kl(YS),minFadeExtent:Kl(YS),maxFadeExtent:Kl(YS)});var vE=eu(_C,{LinearRing:ql(qC)});var xE=eu(_C,{LinearRing:ql(qC)});function wE(t,e){for(var r=tn(e),i=[255*(4==r.length?r[3]:1),r[2],r[1],r[0]],n=0;n<4;++n){var o=Math.floor(i[n]).toString(16);i[n]=1==o.length?"0"+o:o}JS(t,i.join(""))}var bE=eu(_C,{Data:Hl((function(t,e,r){t.setAttribute("name",e.name)
 ;var i={node:t},n=e.value;"object"==typeof n?(null!==n&&n.displayName&&ou(i,bE,Ql,[n.displayName],r,["displayName"]),null!==n&&n.value&&ou(i,bE,Ql,[n.value],r,["value"])):ou(i,bE,Ql,[n],r,["value"])})),value:Hl((function(t,e){JS(t,e)})),displayName:Hl((function(t,e){!function(t,e){t.appendChild(lu().createCDATASection(e))}(t,e)}))});var SE=eu(_C,{Placemark:Hl(ZE)}),TE=function(t,e,r){return Bl(e[e.length-1].node.namespaceURI,"Placemark")};var CE=$l("Data");var EE=eu(_C,["href"],eu(mC,["x","y","w","h"])),RE=eu(_C,{href:Hl(JS)},eu(mC,{x:Hl(KS),y:Hl(KS),w:Hl(KS),h:Hl(KS)})),PE=function(t,e,r){return Bl(mC[0],"gx:"+r)};var IE=eu(_C,["scale","heading","Icon","color","hotSpot"]),OE=eu(_C,{Icon:Hl((function(t,e,r){var i={node:t},n=r[r.length-1].node,o=EE[n.namespaceURI],s=tu(e,o);ou(i,RE,Ql,s,r,o),s=tu(e,o=EE[mC[0]]),ou(i,RE,PE,s,r,o)})),color:Hl(wE),heading:Hl(KS),hotSpot:Hl((function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.
 setAttribute("yunits",e.yunits)})),scale:Hl(nR)});var LE=eu(_C,["color","scale"]),ME=eu(_C,{color:Hl(wE),scale:Hl(nR)});var FE=eu(_C,["color","width"]),AE=eu(_C,{color:Hl(wE),width:Hl(KS)});var kE={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},NE=function(t,e,r){if(t)return Bl(e[e.length-1].node.namespaceURI,kE[t.getType()])},jE=$l("Point"),DE=$l("LineString"),GE=$l("LinearRing"),zE=$l("Polygon"),BE=eu(_C,{LineString:Hl(JE),Point:Hl(JE),Polygon:Hl(rR),GeometryCollection:Hl(UE)});function UE(t,e,r){var i,n={node:t},o=e.getType(),s=[];o===gt.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach((function(t){var e=t.getType();e===gt.MULTI_POINT?s=s.concat(t.getPoints()):e===gt.MULTI_LINE_STRING?s=s.concat(t.getLineStrings()):e===gt.MULTI_POLYGON?s=s.concat(t.getPolygons()):e===gt.POINT||e===gt.LINE_STRING||e===gt.POLYGON?s.
 push(t):lt(!1,39)})),i=NE):o===gt.MULTI_POINT?(s=e.getPoints(),i=jE):o===gt.MULTI_LINE_STRING?(s=e.getLineStrings(),i=DE):o===gt.MULTI_POLYGON?(s=e.getPolygons(),i=zE):lt(!1,39),ou(n,BE,i,s,r)}var YE=eu(_C,{LinearRing:Hl(JE)});function WE(t,e,r){ou({node:t},YE,GE,[e],r)}var VE=eu(_C,{ExtendedData:Hl((function(t,e,r){for(var i={node:t},n=e.names,o=e.values,s=n.length,a=0;a<s;a++)ou(i,bE,CE,[{name:n[a],value:o[a]}],r)})),MultiGeometry:Hl(UE),LineString:Hl(JE),LinearRing:Hl(JE),Point:Hl(JE),Polygon:Hl(rR),Style:Hl((function(t,e,r){var i={node:t},n={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(n.LabelStyle=o);var s=e.pointStyles[0].getImage();s&&"function"==typeof s.getSrc&&(n.IconStyle=s)}if(e.lineStyles.length){(a=e.lineStyles[0].getStroke())&&(n.LineStyle=a)}if(e.polyStyles.length){var a;(a=e.polyStyles[0].getStroke())&&!n.LineStyle&&(n.LineStyle=a),n.PolyStyle=e.polyStyles[0]}var l=r[r.length-1].node,u=oR[l.namespaceURI],h=tu(n,u);ou(i,sR,Ql,h,r,u)})),address:Hl(J
 S),description:Hl(JS),name:Hl(JS),open:Hl(ZS),phoneNumber:Hl(JS),styleUrl:Hl(JS),visibility:Hl(ZS)}),XE=eu(_C,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),qE=$l("ExtendedData");function ZE(t,e,r){var i={node:t};e.getId()&&t.setAttribute("id",e.getId());var n=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var s=Object.keys(n||{}).sort().filter((function(t){return!o[t]})),a=e.getStyleFunction();if(a){var l=a(e,0);if(l){var u=Array.isArray(l)?l:[l],h=u;if(e.getGeometry()&&(h=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var i=r.getType();return i===gt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===gt.POINT||e===gt.MULTI_POINT})).length:i===gt.POINT||i===gt.MULTI_POINT}}))),this.writeStyles_){var c=u,p=u;e.getGeometry()&&(c=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var i=r.getType();r
 eturn i===gt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===gt.LINE_STRING||e===gt.MULTI_LINE_STRING})).length:i===gt.LINE_STRING||i===gt.MULTI_LINE_STRING}})),p=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var i=r.getType();return i===gt.GEOMETRY_COLLECTION?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return e===gt.POLYGON||e===gt.MULTI_POLYGON})).length:i===gt.POLYGON||i===gt.MULTI_POLYGON}}))),n.Style={pointStyles:h,lineStyles:c,polyStyles:p}}if(h.length&&void 0===n.name){var d=h[0].getText();d&&(n.name=d.getText())}}}var f=r[r.length-1].node,g=XE[f.namespaceURI],y=tu(n,g);if(ou(i,VE,Ql,y,r,g),s.length>0){var m=tu(n,s);ou(i,VE,qE,[{names:s,values:m}],r)}var _=r[0],v=e.getGeometry();v&&(v=Gf(v,!0,_)),ou(i,VE,NE,[v],r)}var KE=eu(_C,["extrude","tessellate","altitudeMode","coordinates"]),HE=eu(_C,{extrude:Hl(ZS),tessellate:Hl(ZS),altitudeMode:Hl(JS),coordinates:Hl((function(t,e,r){var i,n=r
 [r.length-1],o=n.layout,s=n.stride;o==ct||o==dt?i=2:o==pt||o==ft?i=3:lt(!1,34);var a=e.length,l="";if(a>0){l+=e[0];for(var u=1;u<i;++u)l+=","+e[u];for(var h=s;h<a;h+=s){l+=" "+e[h];for(u=1;u<i;++u)l+=","+e[h+u]}}JS(t,l)}))});function JE(t,e,r){var i=e.getFlatCoordinates(),n={node:t};n.layout=e.getLayout(),n.stride=e.getStride();var o=e.getProperties();o.coordinates=i;var s=r[r.length-1].node,a=KE[s.namespaceURI],l=tu(o,a);ou(n,HE,Ql,l,r,a)}var $E=eu(_C,["color","fill","outline"]),QE=eu(_C,{outerBoundaryIs:Hl(WE),innerBoundaryIs:Hl(WE)}),tR=$l("innerBoundaryIs"),eR=$l("outerBoundaryIs");function rR(t,e,r){var i=e.getLinearRings(),n=i.shift(),o={node:t};ou(o,QE,tR,i,r),ou(o,QE,eR,[n],r)}var iR=eu(_C,{color:Hl(wE),fill:Hl(ZS),outline:Hl(ZS)});function nR(t,e){KS(t,Math.round(1e6*e)/1e6)}var oR=eu(_C,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),sR=eu(_C,{IconStyle:Hl((function(t,e,r){var i={node:t},n={},o=e.getSrc(),s=e.getSize(),a=e.getImageSize(),l={href:o};if(s){l.w=s[0],l.h=s
 [1];var u=e.getAnchor(),h=e.getOrigin();if(h&&a&&0!==h[0]&&h[1]!==s[1]&&(l.x=h[0],l.y=a[1]-(h[1]+s[1])),u&&(u[0]!==s[0]/2||u[1]!==s[1]/2)){var c={x:u[0],xunits:zu,y:s[1]-u[1],yunits:zu};n.hotSpot=c}}n.Icon=l;var p=e.getScale();1!==p&&(n.scale=p);var d=e.getRotation();0!==d&&(n.heading=d);var f=e.getColor();f&&(n.color=f);var g=r[r.length-1].node,y=IE[g.namespaceURI],m=tu(n,y);ou(i,OE,Ql,m,r,y)})),LabelStyle:Hl((function(t,e,r){var i={node:t},n={},o=e.getFill();o&&(n.color=o.getColor());var s=e.getScale();s&&1!==s&&(n.scale=s);var a=r[r.length-1].node,l=LE[a.namespaceURI],u=tu(n,l);ou(i,ME,Ql,u,r,l)})),LineStyle:Hl((function(t,e,r){var i={node:t},n={color:e.getColor(),width:Number(e.getWidth())||1},o=r[r.length-1].node,s=FE[o.namespaceURI],a=tu(n,s);ou(i,AE,Ql,a,r,s)})),PolyStyle:Hl((function(t,e,r){var i={node:t},n=e.getFill(),o=e.getStroke(),s={color:n?n.getColor():void 0,fill:!!n&&void 0,outline:!!o&&void 0},a=r[r.length-1].node,l=$E[a.namespaceURI],u=tu(s,l);ou(i,iR,Ql,u,r,l)}))}
 );var aR=kC,lR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),uR=[null],hR=eu(uR,{nd:function(t,e){e[e.length-1].ndrefs.push(t.getAttribute("ref"))},tag:fR}),cR=eu(uR,{node:function(t,e){var r=e[0],i=e[e.length-1],n=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];i.nodes[n]=o;var s=iu({tags:{}},dR,t,e);if(!R(s.tags)){var a=new pi(o);Gf(a,!1,r);var l=new ht(a);l.setId(n),l.setProperties(s.tags,!0),i.features.push(l)}},way:function(t,e){var r=iu({id:t.getAttribute("id"),ndrefs:[],tags:{}},hR,t,e);e[e.length-1].ways.push(r)}}),pR=function(t){function e(){var e=t.call(this)||this;return e.dataProjection=gr("EPSG:4326"),e}return lR(e,t),e.prototype.readFeaturesFromNo
 de=function(t,e){var r=this.getReadOptions(t,e);if("osm"==t.localName){for(var i=iu({nodes:{},ways:[],features:[]},cR,t,[r]),n=0;n<i.ways.length;n++){for(var o=i.ways[n],s=[],a=0,l=o.ndrefs.length;a<l;a++){m(s,i.nodes[o.ndrefs[a]])}var u=void 0;Gf(u=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new Pi(s,ct,[s.length]):new Tf(s,ct),!1,r);var h=new ht(u);h.setId(o.id),h.setProperties(o.tags,!0),i.features.push(h)}if(i.features)return i.features}return[]},e}(AS),dR=eu(uR,{tag:fR});function fR(t,e){e[e.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var gR=pR;function yR(t,e,r,i,n,o){var s,a;void 0!==n?(s=n,a=void 0!==o?o:0):(s=[],a=0);for(var l=e;l<r;){var u=t[l++];s[a++]=t[l++],s[a++]=u;for(var h=2;h<i;++h)s[a++]=t[l++]}return s.length=a,s}var mR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.const
 ructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function _R(t,e,r){var i,n=r||1e5,o=new Array(e);for(i=0;i<e;++i)o[i]=0;for(var s=0,a=t.length;s<a;)for(i=0;i<e;++i,++s){var l=t[s],u=l-o[i];o[i]=l,t[s]=u}return xR(t,n)}function vR(t,e,r){var i,n=r||1e5,o=new Array(e);for(i=0;i<e;++i)o[i]=0;for(var s=wR(t,n),a=0,l=s.length;a<l;)for(i=0;i<e;++i,++a)o[i]+=s[a],s[a]=o[i];return s}function xR(t,e){for(var r=e||1e5,i=0,n=t.length;i<n;++i)t[i]=Math.round(t[i]*r);return function(t){for(var e=0,r=t.length;e<r;++e){var i=t[e];t[e]=i<0?~(i<<1):i<<1}return function(t){for(var e="",r=0,i=t.length;r<i;++r)e+=bR(t[r]);return e}(t)}(t)}function wR(t,e){for(var r=e||1e5,i=function(t){for(var e=function(t){for(var e=[],r=0,i=0,n=0,o=t.length;n<o;++n){var s=t.charCodeAt(n)-63;r|=(31&s)<<i,s<32?(e.push(r),r=0,i=0):i+=5}return e}(t),r=0,i=e.length;r<i;++r){var n=e[r];e[r]=1&n?~(n>>1):n>>1}return e}(t),n=0,o=i.length;n<o;++n)i[n]/=r;return i}function bR(t){for(var
  e,r="";t>=32;)e=63+(32|31&t),r+=String.fromCharCode(e),t>>=5;return e=t+63,r+=String.fromCharCode(e)}var SR=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.dataProjection=gr("EPSG:4326"),r.factor_=i.factor?i.factor:1e5,r.geometryLayout_=i.geometryLayout?i.geometryLayout:ct,r}return mR(e,t),e.prototype.readFeatureFromText=function(t,e){var r=this.readGeometryFromText(t,e);return new ht(r)},e.prototype.readFeaturesFromText=function(t,e){return[this.readFeatureFromText(t,e)]},e.prototype.readGeometryFromText=function(t,e){var r=Yr(this.geometryLayout_),i=vR(t,r,this.factor_);yR(i,0,i.length,r,i);var n=ni(i,0,i.length,r);return Gf(new Tf(n,this.geometryLayout_),!1,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){var r=t.getGeometry();return r?this.writeGeometryText(r,e):(lt(!1,40),"")},e.prototype.writeFeaturesText=function(t,e){return this.writeFeatureText(t[0],e)},e.prototype.writeGeometryText=function(t,e){var r=(t=Gf(t,!0,this.adaptOptions(e))).
 getFlatCoordinates(),i=t.getStride();return yR(r,0,r.length,i,r),_R(r,i,this.factor_)},e}(sC),TR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),CR=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.layerName_=i.layerName,r.layers_=i.layers?i.layers:null,r.dataProjection=gr(i.dataProjection?i.dataProjection:"EPSG:4326"),r}return TR(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var r=t,i=void 0,n=null,o=null;r.transform&&(n=(i=r.transform).scale,o=i.translate);var s=r.arcs;i&&function(t,e,r){for(var i=0,n=t.length;i<n;++i)OR(t[i],e,r)}(s,n,o);var a=[],l=r.objects,u=this.layerName_,h=void 0;for(var c in l)this.layers_&&-1==this.layers_.indexOf(c)||("GeometryColl
 ection"===l[c].type?(h=l[c],a.push.apply(a,PR(h,s,n,o,u,c,e))):(h=l[c],a.push(IR(h,s,n,o,u,c,e))));return a}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(TS),ER={Point:function(t,e,r){var i=t.coordinates;e&&r&&LR(i,e,r);return new pi(i)},LineString:function(t,e){var r=RR(t.arcs,e);return new Tf(r)},Polygon:function(t,e){for(var r=[],i=0,n=t.arcs.length;i<n;++i)r[i]=RR(t.arcs[i],e);return new Pi(r)},MultiPoint:function(t,e,r){var i=t.coordinates;if(e&&r)for(var n=0,o=i.length;n<o;++n)LR(i[n],e,r);return new Wf(i)},MultiLineString:function(t,e){for(var r=[],i=0,n=t.arcs.length;i<n;++i)r[i]=RR(t.arcs[i],e);return new Uf(r)},MultiPolygon:function(t,e){for(var r=[],i=0,n=t.arcs.length;i<n;++i){for(var o=t.arcs[i],s=[],a=0,l=o.length;a<l;++a)s[a]=RR(o[a],e);r[i]=s}return new qf(r)}};function RR(t,e){for(var r,i,n=[],o=0,s=t.length;o<s;++o)r=t[o],o>0&&n.pop(),i=r>=0?e[r]:e[~r].slice().reverse(),n.push.apply(n,i);for(var a=0,l=n.length;a<l;++a)n[a
 ]=n[a].slice();return n}function PR(t,e,r,i,n,o,s){for(var a=t.geometries,l=[],u=0,h=a.length;u<h;++u)l[u]=IR(a[u],e,r,i,n,o,s);return l}function IR(t,e,r,i,n,o,s){var a,l=t.type,u=ER[l];a="Point"===l||"MultiPoint"===l?u(t,r,i):u(t,e);var h=new ht;h.setGeometry(Gf(a,!1,s)),void 0!==t.id&&h.setId(t.id);var c=t.properties;return n&&(c||(c={}),c[n]=o),c&&h.setProperties(c,!0),h}function OR(t,e,r){for(var i=0,n=0,o=0,s=t.length;o<s;++o){var a=t[o];i+=a[0],n+=a[1],a[0]=i,a[1]=n,LR(a,e,r)}}function LR(t,e,r){t[0]=t[0]*e[0]+r[0],t[1]=t[1]*e[1]+r[1]}var MR=CR,FR=function(){function t(t){this.tagName_=t}return t.prototype.getTagName=function(){return this.tagName_},t}(),AR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)
 }}(),kR=function(t){function e(e,r){var i=t.call(this,e)||this;return i.conditions=r,lt(i.conditions.length>=2,57),i}return AR(e,t),e}(FR),NR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),jR=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return NR(e,t),e}(kR),DR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),GR=function(t){function e(e,r,i){var n=t.call(this,"BBOX")||this;if(n.geo
 metryName=e,n.extent=r,4!==r.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return n.srsName=i,n}return DR(e,t),e}(FR),zR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),BR=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.geometryName=r||"the_geom",o.geometry=i,o.srsName=n,o}return zR(e,t),e}(FR),UR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),YR=function(t){function e
 (e,r,i){return t.call(this,"Contains",e,r,i)||this}return UR(e,t),e}(BR),WR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),VR=function(t){function e(e,r){var i=t.call(this,e)||this;return i.propertyName=r,i}return WR(e,t),e}(FR),XR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),qR=function(t){function e(e,r,i){var n=t.call(this,"During",e)||this;return n.begin=r,n.end=i,n}return XR(e,t),e}(VR),ZR=function(){var t=function(e,r){re
 turn(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),KR=function(t){function e(e,r,i,n){var o=t.call(this,e,r)||this;return o.expression=i,o.matchCase=n,o}return ZR(e,t),e}(VR),HR=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),JR=function(t){function e(e,r,i){return t.call(this,"PropertyIsEqualTo",e,r,i)||this}return HR(e,t),e}(KR),$R=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t
 ,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),QR=function(t){function e(e,r){return t.call(this,"PropertyIsGreaterThan",e,r)||this}return $R(e,t),e}(KR),tP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),eP=function(t){function e(e,r){return t.call(this,"PropertyIsGreaterThanOrEqualTo",e,r)||this}return tP(e,t),e}(KR),rP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor
 =e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),iP=function(t){function e(e,r,i){return t.call(this,"Intersects",e,r,i)||this}return rP(e,t),e}(BR),nP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),oP=function(t){function e(e,r,i){var n=t.call(this,"PropertyIsBetween",e)||this;return n.lowerBoundary=r,n.upperBoundary=i,n}return nP(e,t),e}(VR),sP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),aP
 =function(t){function e(e,r,i,n,o,s){var a=t.call(this,"PropertyIsLike",e)||this;return a.pattern=r,a.wildCard=void 0!==i?i:"*",a.singleChar=void 0!==n?n:".",a.escapeChar=void 0!==o?o:"!",a.matchCase=s,a}return sP(e,t),e}(VR),lP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),uP=function(t){function e(e){return t.call(this,"PropertyIsNull",e)||this}return lP(e,t),e}(VR),hP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),cP=function
 (t){function e(e,r){return t.call(this,"PropertyIsLessThan",e,r)||this}return hP(e,t),e}(KR),pP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),dP=function(t){function e(e,r){return t.call(this,"PropertyIsLessThanOrEqualTo",e,r)||this}return pP(e,t),e}(KR),fP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),gP=function(t){function e(e){var r=t.call(this,"Not")||this;return r.condition=e,r}return fP(e,t),e}(FR),yP=function(){var t=fu
 nction(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),mP=function(t){function e(e,r,i){return t.call(this,"PropertyIsNotEqualTo",e,r,i)||this}return yP(e,t),e}(KR),_P=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),vP=function(t){function e(e){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return _P(e,t),e}(kR),xP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e
 }||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),wP=function(t){function e(e,r,i){return t.call(this,"Within",e,r,i)||this}return xP(e,t),e}(BR);function bP(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(jR,e))}function SP(t,e,r){return new GR(t,e,r)}var TP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),CP={"http://www.opengis.net/gml":{boundedBy:Kl(GS.prototype.readGeometryElement,"bounds")}},EP={"http://www.opengis.net/wfs":{totalInserted:Kl(VS),totalUpdated:Kl(VS),totalDeleted:Kl(VS)}},RP={"ht
 tp://www.opengis.net/wfs":{TransactionSummary:Kl((function(t,e){return iu({},EP,t,e)}),"transactionSummary"),InsertResults:Kl((function(t,e){return iu([],NP,t,e)}),"insertIds")}},PP={"http://www.opengis.net/wfs":{PropertyName:Hl(JS)}},IP={"http://www.opengis.net/wfs":{Insert:Hl((function(t,e,r){var i=r[r.length-1],n=i.featureType,o=i.featureNS,s=i.gmlVersion,a=Bl(o,n);t.appendChild(a),2===s?aT.prototype.writeFeatureElement(a,e,r):eT.prototype.writeFeatureElement(a,e,r)})),Update:Hl((function(t,e,r){var i=r[r.length-1];lt(void 0!==e.getId(),27);var n=i.featureType,o=i.featurePrefix,s=i.featureNS,a=DP(o,n),l=e.getGeometryName();t.setAttribute("typeName",a),t.setAttributeNS(OP,"xmlns:"+o,s);var u=e.getId();if(void 0!==u){for(var h=e.getKeys(),c=[],p=0,d=h.length;p<d;p++){var f=e.get(h[p]);if(void 0!==f){var g=h[p];f&&"function"==typeof f.getSimplifiedGeometry&&(g=l),c.push({name:g,value:f})}}ou({gmlVersion:i.gmlVersion,node:t,hasZ:i.hasZ,srsName:i.srsName},IP,$l("Property"),c,r),jP(t,u
 ,r)}})),Delete:Hl((function(t,e,r){var i=r[r.length-1];lt(void 0!==e.getId(),26);var n=i.featureType,o=i.featurePrefix,s=i.featureNS,a=DP(o,n);t.setAttribute("typeName",a),t.setAttributeNS(OP,"xmlns:"+o,s);var l=e.getId();void 0!==l&&jP(t,l,r)})),Property:Hl((function(t,e,r){var i=Bl(MP,"Name"),n=r[r.length-1].gmlVersion;if(t.appendChild(i),JS(i,e.name),void 0!==e.value&&null!==e.value){var o=Bl(MP,"Value");t.appendChild(o),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===n?aT.prototype.writeGeometryElement(o,e.value,r):eT.prototype.writeGeometryElement(o,e.value,r):JS(o,e.value)}})),Native:Hl((function(t,e,r){e.vendorId&&t.setAttribute("vendorId",e.vendorId);void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore));void 0!==e.value&&JS(t,e.value)}))}},OP="http://www.w3.org/2000/xmlns/",LP="http://www.opengis.net/ogc",MP="http://www.opengis.net/wfs",FP={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http:/
 /www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},AP=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.featureType_=i.featureType,r.featureNS_=i.featureNS,r.gmlFormat_=i.gmlFormat?i.gmlFormat:new eT,r.schemaLocation_=i.schemaLocation?i.schemaLocation:FP["1.1.0"],r}return TP(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var r={node:t};T(r,{featureType:this.featureType_,featureNS:this.featureNS_}),T(r,this.getReadOptions(t,e||{}));var i=[r];this.gmlFormat_.FEATURE_COLLECTION_PARSERS[NS].featureMember=Xl(GS.prototype.readFeaturesInternal);var n=iu([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,i,this.gmlFormat_);return n||(n=[]),n},e.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var e=Wl(t);return this.readTransactionResponseFromDocument(e)}return Yl(t)?this.readTransactionResponseFromDocument
 (t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var e=Wl(t);return this.readFeatureCollectionMetadataFromDocument(e)}return Yl(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},r=XS(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=r,iu(e,CP,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return iu({},RP,t,[])},e.prototype.writeGetFeature=function(t){var e,r=Bl(MP,"GetFeat
 ure");if(r.setAttribute("service","WFS"),r.setAttribute("version","1.1.0"),t&&(t.handle&&r.setAttribute("handle",t.handle),t.outputFormat&&r.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&r.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&r.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&r.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&r.setAttribute("count",String(t.count)),void 0!==t.viewParams&&r.setAttribute("viewParams",t.viewParams),e=t.filter,t.bbox)){lt(t.geometryName,12);var i=SP(t.geometryName,t.bbox,t.srsName);e=e?bP(e,i):i}r.setAttributeNS(zl,"xsi:schemaLocation",this.schemaLocation_);var n={node:r};return T(n,{srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,geometryName:t.geometryName,filter:e,propertyNames:t.propertyNames?t.propertyNames:[]}),lt(Array.isArray(t.featureTypes),11),function(t,e,r){var i=r[r.length-1],n=T({},i);n.node=t,ou(n,GP,$l("Query"
 ),e,r)}(r,t.featureTypes,[n]),r},e.prototype.writeTransaction=function(t,e,r,i){var n,o,s=[],a=Bl(MP,"Transaction"),l=i.version?i.version:"1.1.0",u="1.0.0"===l?2:3;a.setAttribute("service","WFS"),a.setAttribute("version",l),i&&(n=i.gmlOptions?i.gmlOptions:{},i.handle&&a.setAttribute("handle",i.handle));var h=FP[l];a.setAttributeNS(zl,"xsi:schemaLocation",h);var c=i.featurePrefix?i.featurePrefix:"feature";return t&&(o=T({node:a},{featureNS:i.featureNS,featureType:i.featureType,featurePrefix:c,gmlVersion:u,hasZ:i.hasZ,srsName:i.srsName}),T(o,n),ou(o,IP,$l("Insert"),t,s)),e&&(o=T({node:a},{featureNS:i.featureNS,featureType:i.featureType,featurePrefix:c,gmlVersion:u,hasZ:i.hasZ,srsName:i.srsName}),T(o,n),ou(o,IP,$l("Update"),e,s)),r&&ou({node:a,featureNS:i.featureNS,featureType:i.featureType,featurePrefix:c,gmlVersion:u,srsName:i.srsName},IP,$l("Delete"),r,s),i.nativeElements&&ou({node:a,featureNS:i.featureNS,featureType:i.featureType,featurePrefix:c,gmlVersion:u,srsName:i.srsName},IP,$
 l("Native"),i.nativeElements,s),a},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var r=[{}];return this.gmlFormat_.readGeometryElement(e,r),gr(r.pop().srsName)}return null},e}(AS);var kP={"http://www.opengis.net/ogc":{FeatureId:Xl((function(t,e){return t.getAttribute("fid")}))}};var NP={"http://www.opengis.net/wfs":{Feature:function(t,e){ru(kP,t,e)}}};function jP(t,e,r){var i=Bl(LP,"Filter"),n=Bl(LP,"FeatureId");i.appendChild(n),n.setAttribute("fid",e),t.appendChild(i)}function DP(t,e){var r=(t=t||"feature")+":";return 0===e.indexOf(r)?e:r+e}var GP={"http://www.opengis.net/w
 fs":{Query:Hl((function(t,e,r){var i,n=r[r.length-1],o=n.featurePrefix,s=n.featureNS,a=n.propertyNames,l=n.srsName;i=o?DP(o,e):e;t.setAttribute("typeName",i),l&&t.setAttribute("srsName",l);s&&t.setAttributeNS(OP,"xmlns:"+o,s);var u=T({},n);u.node=t,ou(u,PP,$l("PropertyName"),a,r);var h=n.filter;if(h){var c=Bl(LP,"Filter");t.appendChild(c),zP(c,h,r)}}))},"http://www.opengis.net/ogc":{During:Hl((function(t,e,r){var i=Bl("http://www.opengis.net/fes","ValueReference");JS(i,e.propertyName),t.appendChild(i);var n=Bl(NS,"TimePeriod");t.appendChild(n);var o=Bl(NS,"begin");n.appendChild(o),XP(o,e.begin);var s=Bl(NS,"end");n.appendChild(s),XP(s,e.end)})),And:Hl(BP),Or:Hl(BP),Not:Hl((function(t,e,r){var i={node:t},n=e.condition;ou(i,GP,$l(n.getTagName()),[n],r)})),BBOX:Hl((function(t,e,r){r[r.length-1].srsName=e.srsName,WP(t,e.geometryName),eT.prototype.writeGeometryElement(t,e.extent,r)})),Contains:Hl((function(t,e,r){r[r.length-1].srsName=e.srsName,WP(t,e.geometryName),eT.prototype.writeGeom
 etryElement(t,e.geometry,r)})),Intersects:Hl((function(t,e,r){r[r.length-1].srsName=e.srsName,WP(t,e.geometryName),eT.prototype.writeGeometryElement(t,e.geometry,r)})),Within:Hl((function(t,e,r){r[r.length-1].srsName=e.srsName,WP(t,e.geometryName),eT.prototype.writeGeometryElement(t,e.geometry,r)})),PropertyIsEqualTo:Hl(UP),PropertyIsNotEqualTo:Hl(UP),PropertyIsLessThan:Hl(UP),PropertyIsLessThanOrEqualTo:Hl(UP),PropertyIsGreaterThan:Hl(UP),PropertyIsGreaterThanOrEqualTo:Hl(UP),PropertyIsNull:Hl((function(t,e,r){WP(t,e.propertyName)})),PropertyIsBetween:Hl((function(t,e,r){WP(t,e.propertyName);var i=Bl(LP,"LowerBoundary");t.appendChild(i),VP(i,""+e.lowerBoundary);var n=Bl(LP,"UpperBoundary");t.appendChild(n),VP(n,""+e.upperBoundary)})),PropertyIsLike:Hl((function(t,e,r){t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString());WP(t,e.propertyName),V
 P(t,""+e.pattern)}))}};function zP(t,e,r){ou({node:t},GP,$l(e.getTagName()),[e],r)}function BP(t,e,r){for(var i={node:t},n=e.conditions,o=0,s=n.length;o<s;++o){var a=n[o];ou(i,GP,$l(a.getTagName()),[a],r)}}function UP(t,e,r){void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),WP(t,e.propertyName),VP(t,""+e.expression)}function YP(t,e,r){var i=Bl(LP,t);JS(i,r),e.appendChild(i)}function WP(t,e){YP("PropertyName",t,e)}function VP(t,e){YP("Literal",t,e)}function XP(t,e){var r=Bl(NS,"TimeInstant");t.appendChild(r);var i=Bl(NS,"timePosition");r.appendChild(i),JS(i,e)}var qP=AP,ZP=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),KP={POINT:pi,LINESTRING:Tf,POLYGON:Pi,MULTIPOINT:Wf,MULTILINESTRIN
 G:Uf,MULTIPOLYGON:qf},HP=1,JP=2,$P=3,QP=4,tI=5,eI=6,rI={};for(var iI in gt)rI[iI]=gt[iI].toUpperCase();var nI=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),r=this.index_,i=e;if("("==e)t=JP;else if(","==e)t=tI;else if(")"==e)t=$P;else if(this.isNumeric_(e)||"-"==e)t=QP,i=this.readNumber_();else if(this.isAlpha_(e))t=HP,i=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=eI}return{position:r,value:i,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,r=!1,i=!1;do{"."==t?r=!0:"e"!=t&&"E"!=t||(i=!0),t=this.nextChar_()}while(thi
 s.isNumeric_(t,r)||!i&&("e"==t||"E"==t)||i&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),oI=function(){function t(t){this.lexer_=t,this.token_,this.layout_=ct}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=ct,e=this.token_;if(this.isTokenType(HP)){var r=e.value;"Z"===r?t=pt:"M"===r?t=dt:"ZM"===r&&(t=ft),t!==ct&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(JP)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(tI));if(this.match($P))return t}el
 se if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(JP)){var t=this.parsePoint_();if(this.match($P))return t}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(JP)){var t=this.parsePointList_();if(this.match($P))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(JP)){var t=this.parseLineStringTextList_();if(this.match($P))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(JP)){var t=void 0;if(t=this.token_.type==JP?this.parsePointTextList_():this.parsePointList_(),this.match($P))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLineStringText
 _=function(){if(this.match(JP)){var t=this.parseLineStringTextList_();if(this.match($P))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(JP)){var t=this.parsePolygonTextList_();if(this.match($P))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,r=0;r<e;++r){var i=this.token_;if(!this.match(QP))break;t.push(i.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())},t.prototype.parsePointList_=function(){for(var t=[this.parsePoint_()];this.match(tI);)t.push(this.parsePoint_());return t},t.prototype.parsePointTextList_=function(){for(var t=[this.parsePointText_()];this.match(tI);)t.push(this.parsePointText_());return t},t.prototype.parseLineStringTextList_=function(){for(var t=[this.parseLineStringText_()];this.match(tI);)t.push(this.parseLineStringT
 ext_());return t},t.prototype.parsePolygonTextList_=function(){for(var t=[this.parsePolygonText_()];this.match(tI);)t.push(this.parsePolygonText_());return t},t.prototype.isEmptyGeometry_=function(){var t=this.isTokenType(HP)&&"EMPTY"==this.token_.value;return t&&this.consume_(),t},t.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},t.prototype.parseGeometry_=function(){var t=this.token_;if(this.match(HP)){var e=t.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==e){var r=this.parseGeometryCollectionText_();return new wS(r)}var i=KP[e];if(!i)throw new Error("Invalid geometry type: "+e);var n=void 0;switch(e){case"POINT":n=this.parsePointText_();break;case"LINESTRING":n=this.parseLineStringText_();break;case"POLYGON":n=this.parsePolygonText_();break;case"MULTIPOINT":n=this.parseMultiPointText_();break;case"MULTILINESTRING":n=this.parseMultiLineStringText_();break;cas
 e"MULTIPOLYGON":n=this.parseMultiPolygonText_();break;default:throw new Error("Invalid geometry type: "+e)}return n||(n=i===KP.POINT?[NaN,NaN]:[]),new i(n,this.layout_)}throw new Error(this.formatErrorMessage_())},t}(),sI=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.splitCollection_=void 0!==i.splitCollection&&i.splitCollection,r}return ZP(e,t),e.prototype.parse_=function(t){var e=new nI(t);return new oI(e).parse()},e.prototype.readFeatureFromText=function(t,e){var r=this.readGeometryFromText(t,e);if(r){var i=new ht;return i.setGeometry(r),i}return null},e.prototype.readFeaturesFromText=function(t,e){for(var r=[],i=this.readGeometryFromText(t,e),n=[],o=0,s=(r=this.splitCollection_&&i.getType()==gt.GEOMETRY_COLLECTION?i.getGeometriesArray():[i]).length;o<s;++o){var a=new ht;a.setGeometry(r[o]),n.push(a)}return n},e.prototype.readGeometryFromText=function(t,e){var r=this.parse_(t);return r?Gf(r,!1,e):null},e.prototype.writeFeatureText=function(t,e){var r=t.getGe
 ometry();return r?this.writeGeometryText(r,e):""},e.prototype.writeFeaturesText=function(t,e){if(1==t.length)return this.writeFeatureText(t[0],e);for(var r=[],i=0,n=t.length;i<n;++i)r.push(t[i].getGeometry());var o=new wS(r);return this.writeGeometryText(o,e)},e.prototype.writeGeometryText=function(t,e){return cI(Gf(t,!0,e))},e}(sC);function aI(t){var e=t.getCoordinates();return 0===e.length?"":e.join(" ")}function lI(t){for(var e=t.getCoordinates(),r=[],i=0,n=e.length;i<n;++i)r.push(e[i].join(" "));return r.join(",")}function uI(t){for(var e=[],r=t.getLinearRings(),i=0,n=r.length;i<n;++i)e.push("("+lI(r[i])+")");return e.join(",")}var hI={Point:aI,LineString:lI,Polygon:uI,MultiPoint:function(t){for(var e=[],r=t.getPoints(),i=0,n=r.length;i<n;++i)e.push("("+aI(r[i])+")");return e.join(",")},MultiLineString:function(t){for(var e=[],r=t.getLineStrings(),i=0,n=r.length;i<n;++i)e.push("("+lI(r[i])+")");return e.join(",")},MultiPolygon:function(t){for(var e=[],r=t.getPolygons(),i=0,n=r.l
 ength;i<n;++i)e.push("("+uI(r[i])+")");return e.join(",")},GeometryCollection:function(t){for(var e=[],r=t.getGeometries(),i=0,n=r.length;i<n;++i)e.push(cI(r[i]));return e.join(",")}};function cI(t){var e=t.getType(),r=(0,hI[e])(t);if(e=e.toUpperCase(),"function"==typeof t.getFlatCoordinates){var i=function(t){var e=t.getLayout(),r="";return e!==pt&&e!==ft||(r+="Z"),e!==dt&&e!==ft||(r+="M"),r}(t);i.length>0&&(e+=" "+i)}return 0===r.length?e+" EMPTY":e+"("+r+")"}var pI=sI,dI=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"==typeof t){var e=Wl(t);return this.readFromDocument(e)}return Yl(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},t.prototype.readFromNode=function(t){},t}();function fI(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}var gI=function(){var t=function(e
 ,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),yI=[null,"http://www.opengis.net/wms"],mI=eu(yI,{Service:Kl((function(t,e){return iu({},xI,t,e)})),Capability:Kl((function(t,e){return iu({},_I,t,e)}))}),_I=eu(yI,{Request:Kl((function(t,e){return iu({},PI,t,e)})),Exception:Kl((function(t,e){return iu([],TI,t,e)})),Layer:Kl((function(t,e){return iu({},CI,t,e)}))}),vI=function(t){function e(){var e=t.call(this)||this;return e.version=void 0,e}return gI(e,t),e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var e=iu({version:this.version},mI,t,[]);return e||null},e}(dI),xI=eu(yI,{Name:Kl(qS),Title:Kl(qS),Abstract:Kl(qS),KeywordList:Kl(DI),OnlineResource:Kl(fI),ContactInformation:Kl((function(t,e){return iu
 ({},wI,t,e)})),Fees:Kl(qS),AccessConstraints:Kl(qS),LayerLimit:Kl(VS),MaxWidth:Kl(VS),MaxHeight:Kl(VS)}),wI=eu(yI,{ContactPersonPrimary:Kl((function(t,e){return iu({},bI,t,e)})),ContactPosition:Kl(qS),ContactAddress:Kl((function(t,e){return iu({},SI,t,e)})),ContactVoiceTelephone:Kl(qS),ContactFacsimileTelephone:Kl(qS),ContactElectronicMailAddress:Kl(qS)}),bI=eu(yI,{ContactPerson:Kl(qS),ContactOrganization:Kl(qS)}),SI=eu(yI,{AddressType:Kl(qS),Address:Kl(qS),City:Kl(qS),StateOrProvince:Kl(qS),PostCode:Kl(qS),Country:Kl(qS)}),TI=eu(yI,{Format:Xl(qS)}),CI=eu(yI,{Name:Kl(qS),Title:Kl(qS),Abstract:Kl(qS),KeywordList:Kl(DI),CRS:Zl(qS),EX_GeographicBoundingBox:Kl((function(t,e){var r=iu({},RI,t,e);if(!r)return;var i=r.westBoundLongitude,n=r.southBoundLatitude,o=r.eastBoundLongitude,s=r.northBoundLatitude;if(void 0===i||void 0===n||void 0===o||void 0===s)return;return[i,n,o,s]})),BoundingBox:Zl((function(t,e){var r=[WS(t.getAttribute("minx")),WS(t.getAttribute("miny")),WS(t.getAttribute("ma
 xx")),WS(t.getAttribute("maxy"))],i=[WS(t.getAttribute("resx")),WS(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:r,res:i}})),Dimension:Zl((function(t,e){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:BS(t.getAttribute("multipleValues")),nearestValue:BS(t.getAttribute("nearestValue")),current:BS(t.getAttribute("current")),values:qS(t)}})),Attribution:Kl((function(t,e){return iu({},EI,t,e)})),AuthorityURL:Zl((function(t,e){var r=kI(t,e);if(r)return r.name=t.getAttribute("name"),r;return})),Identifier:Zl(qS),MetadataURL:Zl((function(t,e){var r=kI(t,e);if(r)return r.type=t.getAttribute("type"),r;return})),DataURL:Zl(kI),FeatureListURL:Zl(kI),Style:Zl((function(t,e){return iu({},MI,t,e)})),MinScaleDenominator:Kl(YS),MaxScaleDenominator:Kl(YS),Layer:Zl((function(t,e){var r=e[e.length-1],i=iu({},CI,t,e);if(!i)return;var n=BS(t.getAttribute("queryable"));void 0===n&&
 (n=r.queryable);i.queryable=void 0!==n&&n;var o=XS(t.getAttribute("cascaded"));void 0===o&&(o=r.cascaded);i.cascaded=o;var s=BS(t.getAttribute("opaque"));void 0===s&&(s=r.opaque);i.opaque=void 0!==s&&s;var a=BS(t.getAttribute("noSubsets"));void 0===a&&(a=r.noSubsets);i.noSubsets=void 0!==a&&a;var l=WS(t.getAttribute("fixedWidth"));l||(l=r.fixedWidth);i.fixedWidth=l;var u=WS(t.getAttribute("fixedHeight"));u||(u=r.fixedHeight);i.fixedHeight=u,["Style","CRS","AuthorityURL"].forEach((function(t){if(t in r){var e=i[t]||[];i[t]=e.concat(r[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in i)){var e=r[t];i[t]=e}})),i}))}),EI=eu(yI,{Title:Kl(qS),OnlineResource:Kl(fI),LogoURL:Kl(jI)}),RI=eu(yI,{westBoundLongitude:Kl(YS),eastBoundLongitude:Kl(YS),southBoundLatitude:Kl(YS),northBoundLatitude:Kl(YS)}),PI=eu(yI,{GetCapabilities:Kl(NI),GetMap:Kl(NI),GetFeatureInfo:Kl(NI)}),II=eu(yI,{Format:Z
 l(qS),DCPType:Zl((function(t,e){return iu({},OI,t,e)}))}),OI=eu(yI,{HTTP:Kl((function(t,e){return iu({},LI,t,e)}))}),LI=eu(yI,{Get:Kl(kI),Post:Kl(kI)}),MI=eu(yI,{Name:Kl(qS),Title:Kl(qS),Abstract:Kl(qS),LegendURL:Zl(jI),StyleSheetURL:Kl(kI),StyleURL:Kl(kI)}),FI=eu(yI,{Format:Kl(qS),OnlineResource:Kl(fI)}),AI=eu(yI,{Keyword:Xl(qS)});function kI(t,e){return iu({},FI,t,e)}function NI(t,e){return iu({},II,t,e)}function jI(t,e){var r=kI(t,e);if(r){var i=[XS(t.getAttribute("width")),XS(t.getAttribute("height"))];return r.size=i,r}}function DI(t,e){return iu([],AI,t,e)}var GI=vI,zI=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),BI=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.featureNS_="htt
 p://mapserver.gis.umn.edu/mapserver",r.gmlFormat_=new aT,r.layers_=i.layers?i.layers:null,r}return zI(e,t),e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,e){t.setAttribute("namespaceURI",this.featureNS_);var r=t.localName,i=[];if(0===t.childNodes.length)return i;if("msGMLOutput"==r)for(var n=0,o=t.childNodes.length;n<o;n++){var s=t.childNodes[n];if(s.nodeType===Node.ELEMENT_NODE){var a=s,l=e[0],u=a.localName.replace("_layer","");if(!this.layers_||f(this.layers_,u)){var h=u+"_feature";l.featureType=h,l.featureNS=this.featureNS_;var c={};c[h]=Xl(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var p=eu([l.featureNS,null],c);a.setAttribute("namespaceURI",this.featureNS_);var d=iu([],p,a,e,this.gmlFormat_);d&&m(i,d)}}}if("FeatureCollection"==r){var g=iu([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);g&&(i=g)}return i},e.prototype.readFeaturesFromNode=function(t,e){var 
 r={};return e&&T(r,this.getReadOptions(t,e)),this.readFeatures_(t,[r])},e}(AS),UI=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),YI=[null,"http://www.opengis.net/ows/1.1"],WI=eu(YI,{ServiceIdentification:Kl((function(t,e){return iu({},iO,t,e)})),ServiceProvider:Kl((function(t,e){return iu({},nO,t,e)})),OperationsMetadata:Kl((function(t,e){return iu({},QI,t,e)}))}),VI=function(t){function e(){return t.call(this)||this}return UI(e,t),e.prototype.readFromNode=function(t){var e=iu({},WI,t,[]);return e||null},e}(dI),XI=eu(YI,{DeliveryPoint:Kl(qS),City:Kl(qS),AdministrativeArea:Kl(qS),PostalCode:Kl(qS),Country:Kl(qS),ElectronicMailAddress:Kl(qS)}),qI=eu(YI,{Value:Zl((function(t,e){return qS(t)}))}),ZI=eu(YI,{All
 owedValues:Kl((function(t,e){return iu({},qI,t,e)}))}),KI=eu(YI,{Phone:Kl((function(t,e){return iu({},tO,t,e)})),Address:Kl((function(t,e){return iu({},XI,t,e)}))}),HI=eu(YI,{HTTP:Kl((function(t,e){return iu({},JI,t,e)}))}),JI=eu(YI,{Get:Zl((function(t,e){var r=fI(t);if(!r)return;return iu({href:r},eO,t,e)})),Post:void 0}),$I=eu(YI,{DCP:Kl((function(t,e){return iu({},HI,t,e)}))}),QI=eu(YI,{Operation:function(t,e){var r=t.getAttribute("name"),i=iu({},$I,t,e);if(!i)return;e[e.length-1][r]=i}}),tO=eu(YI,{Voice:Kl(qS),Facsimile:Kl(qS)}),eO=eu(YI,{Constraint:Zl((function(t,e){var r=t.getAttribute("name");if(!r)return;return iu({name:r},ZI,t,e)}))}),rO=eu(YI,{IndividualName:Kl(qS),PositionName:Kl(qS),ContactInfo:Kl((function(t,e){return iu({},KI,t,e)}))}),iO=eu(YI,{Abstract:Kl(qS),AccessConstraints:Kl(qS),Fees:Kl(qS),Title:Kl(qS),ServiceTypeVersion:Kl(qS),ServiceType:Kl(qS)}),nO=eu(YI,{ProviderName:Kl(qS),ProviderSite:Kl(fI),ServiceContact:Kl((function(t,e){return iu({},rO,t,e)}))});var o
 O=VI,sO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),aO=[null,"http://www.opengis.net/wmts/1.0"],lO=[null,"http://www.opengis.net/ows/1.1"],uO=eu(aO,{Contents:Kl((function(t,e){return iu({},cO,t,e)}))}),hO=function(t){function e(){var e=t.call(this)||this;return e.owsParser_=new oO,e}return sO(e,t),e.prototype.readFromNode=function(t){var e=t.getAttribute("version");e&&(e=e.trim());var r=this.owsParser_.readFromNode(t);return r?(r.version=e,(r=iu(r,uO,t,[]))||null):null},e}(dI),cO=eu(aO,{Layer:Zl((function(t,e){return iu({},pO,t,e)})),TileMatrixSet:Zl((function(t,e){return iu({},vO,t,e)}))}),pO=eu(aO,{Style:Zl((function(t,e){var r=iu({},dO,t,e);if(!r)return;var i="true"===t.getAttribute("isDefault");retu
 rn r.isDefault=i,r})),Format:Zl(qS),TileMatrixSetLink:Zl((function(t,e){return iu({},fO,t,e)})),Dimension:Zl((function(t,e){return iu({},mO,t,e)})),ResourceURL:Zl((function(t,e){var r=t.getAttribute("format"),i=t.getAttribute("template"),n=t.getAttribute("resourceType"),o={};r&&(o.format=r);i&&(o.template=i);n&&(o.resourceType=n);return o}))},eu(lO,{Title:Kl(qS),Abstract:Kl(qS),WGS84BoundingBox:Kl((function(t,e){var r=iu([],_O,t,e);if(2!=r.length)return;return Dt(r)})),Identifier:Kl(qS)})),dO=eu(aO,{LegendURL:Zl((function(t,e){var r={};return r.format=t.getAttribute("format"),r.href=fI(t),r}))},eu(lO,{Title:Kl(qS),Identifier:Kl(qS)})),fO=eu(aO,{TileMatrixSet:Kl(qS),TileMatrixSetLimits:Kl((function(t,e){return iu([],gO,t,e)}))}),gO=eu(aO,{TileMatrixLimits:Xl((function(t,e){return iu({},yO,t,e)}))}),yO=eu(aO,{TileMatrix:Kl(qS),MinTileRow:Kl(VS),MaxTileRow:Kl(VS),MinTileCol:Kl(VS),MaxTileCol:Kl(VS)}),mO=eu(aO,{Default:Kl(qS),Value:Zl(qS)},eu(lO,{Identifier:Kl(qS)})),_O=eu(lO,{LowerCorn
 er:Xl(wO),UpperCorner:Xl(wO)}),vO=eu(aO,{WellKnownScaleSet:Kl(qS),TileMatrix:Zl((function(t,e){return iu({},xO,t,e)}))},eu(lO,{SupportedCRS:Kl(qS),Identifier:Kl(qS)})),xO=eu(aO,{TopLeftCorner:Kl(wO),ScaleDenominator:Kl(YS),TileWidth:Kl(VS),TileHeight:Kl(VS),MatrixWidth:Kl(VS),MatrixHeight:Kl(VS)},eu(lO,{Identifier:Kl(qS)}));function wO(t,e){var r=qS(t).split(/\s+/);if(r&&2==r.length){var i=+r[0],n=+r[1];if(!isNaN(i)&&!isNaN(n))return[i,n]}}var bO=hO,SO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),TO=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],CO="enterfullscreen",EO="leavefullscreen";function RO(){var t=document.body;return!!(t.webkitRequestFullscreen||t.msRequestFullscreen&&docume
 nt.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled)}function PO(){return!!(document.webkitIsFullScreen||document.msFullscreenElement||document.fullscreenElement)}function IO(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var OO=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),target:i.target})||this).cssClassName_=void 0!==i.className?i.className:"ol-full-screen";var n=void 0!==i.label?i.label:"⤢";r.labelNode_="string"==typeof n?document.createTextNode(n):n;var o=void 0!==i.labelActive?i.labelActive:"×";r.labelActiveNode_="string"==typeof o?document.createTextNode(o):o,r.button_=document.createElement("button");var s=i.tipLabel?i.tipLabel:"Toggle full-screen";r.setClassName_(r.button_,PO()),r.button_.setAttribute("type","button"),r.button_.title=s,r.button_.appendChild(r.labelNode_),r.button_.addEventListener(F,r
 .handleClick_.bind(r),!1);var a=r.cssClassName_+" ol-unselectable ol-control "+(RO()?"":"ol-unsupported"),l=r.element;return l.className=a,l.appendChild(r.button_),r.keys_=void 0!==i.keys&&i.keys,r.source_=i.source,r}return SO(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){if(RO()){var t=this.getMap();if(t)if(PO())document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{var e=void 0;e=this.source_?"string"==typeof this.source_?document.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():IO(t)}(e):IO(e)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();PO()?(this.setClassName_(this.button_,!0),Yn(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(CO)):(this.setClassName_(this.bu
 tton_,!1),Yn(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(EO)),t&&t.updateSize()},e.prototype.setClassName_=function(t,e){var r=this.cssClassName_+"-true",i=this.cssClassName_+"-false",n=e?r:i;t.classList.remove(r),t.classList.remove(i),t.classList.add(n)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e)for(var r=0,i=TO.length;r<i;++r)this.listenerKeys.push(W(document,TO[r],this.handleFullScreenChange_,this))},e}(Us),LO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),MO=function(t){function e(e){var r=this,i=e||{},n=document.createElement("div");return n.className=void 0!==i.className?i.className:"ol-mouse-position",(r=t.call(this,{element:n,render:i.render,target:i.target})
 ||this).addEventListener(tt("projection"),r.handleProjectionChanged_),i.coordinateFormat&&r.setCoordinateFormat(i.coordinateFormat),i.projection&&r.setProjection(i.projection),r.undefinedHTML_=void 0!==i.undefinedHTML?i.undefinedHTML:" ",r.renderOnMouseOut_=!!r.undefinedHTML_,r.renderedHTML_=n.innerHTML,r.mapProjection_=null,r.transform_=null,r}return LO(e,t),e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get("coordinateFormat")},e.prototype.getProjection=function(){return this.get("projection")},e.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e){var r=e.getViewport();this.listenerKeys.push(W(r,Ko,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(W(r,$o,this.handleMouseOut,this))}},e.prototype.setCoor
 dinateFormat=function(t){this.set("coordinateFormat",t)},e.prototype.setProjection=function(t){this.set("projection",gr(t))},e.prototype.updateHTML_=function(t){var e=this.undefinedHTML_;if(t&&this.mapProjection_){if(!this.transform_){var r=this.getProjection();this.transform_=r?br(this.mapProjection_,r):dr}var i=this.getMap().getCoordinateFromPixelInternal(t);if(i){var n=Or();n&&(this.transform_=br(this.mapProjection_,n)),this.transform_(i,i);var o=this.getCoordinateFormat();e=o?o(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},e.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(Us),FO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return
  function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),AO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return FO(e,t),e.prototype.createRenderer=function(){return new zo(this)},e}(zs),kO=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).boundHandleRotationChanged_=r.handleRotationChanged_.bind(r),r.collapsed_=void 0===i.collapsed||i.collapsed,r.collapsible_=void 0===i.collapsible||i.collapsible,r.collapsible_||(r.collapsed_=!1),r.rotateWithView_=void 0!==i.rotateWithView&&i.rotateWithView,r.viewExtent_=void 0;var n=void 0!==i.className?i.className:"ol-overviewmap",o=void 0!==i.tipLabel?i.tipLabel:"Overview map",s=void 0!==i.collapseLabel?i.collapseLabel:"«";"string"==typeof s?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=s):r.collapseLabel_=s;var a=void 0!==i.labe
 l?i.label:"»";"string"==typeof a?(r.label_=document.createElement("span"),r.label_.textContent=a):r.label_=a;var l=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=o,u.appendChild(l),u.addEventListener(F,r.handleClick_.bind(r),!1),r.ovmapDiv_=document.createElement("div"),r.ovmapDiv_.className="ol-overviewmap-map",r.view_=i.view,r.ovmap_=new AO({view:i.view});var h=r.ovmap_;i.layers&&i.layers.forEach((function(t){h.addLayer(t)}));var c=document.createElement("div");c.className="ol-overviewmap-box",c.style.boxSizing="border-box",r.boxOverlay_=new dl({position:[0,0],positioning:rl,element:c}),r.ovmap_.addOverlay(r.boxOverlay_);var p=n+" ol-unselectable ol-control"+(r.collapsed_&&r.collapsible_?" ol-collapsed":"")+(r.collapsible_?"":" ol-uncollapsible"),d=r.element;d.className=p,d.appendChild(r.ovmapDiv_),d.appendChild(u);var f=r,g=r.boxOverlay_,y=r.boxOverlay_.getElement(),m=function(t){var e,r={clientX
 :(e=t).clientX,clientY:e.clientY},i=h.getEventCoordinateInternal(r);g.setPosition(i)},_=function(t){var e=h.getEventCoordinateInternal(t);f.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",_)};return y.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",_)})),r}return FO(e,t),e.prototype.setMap=function(e){var r=this.getMap();if(e!==r){if(r){var i=r.getView();i&&this.unbindView_(i),this.ovmap_.setTarget(null)}if(t.prototype.setMap.call(this,e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(W(e,c,this.handleMapPropertyChange_,this));var n=e.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_()))}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===as){var e=t.oldValue;e&&this.unbindView_(e);var r=this.getMap().getView();this.bindView_(r)}},e.prototype.bindView_=function(t){if(!this.view_){var 
 e=new ks({projection:t.getProjection()});this.ovmap_.setView(e)}t.addEventListener(tt(xs),this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeEventListener(tt(xs),this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),i=t.getView().calculateExtentInternal(r);if(!this.viewExtent_||!Jt(i,this.viewExtent_)){this.viewExtent_=i;var n=e.getSize(),o=e.getView().calculateExtentInternal(n),s=e.getPixelFromCoordinateInternal(pe(i)),a=e.getPixelFromCoordinateInternal(se(i)),l=Math.abs(s[0]-a[0]),u=Math.abs(s[1]-a[1]),h=n[0],c=n[1];l<.1*h||u<.1*c||l>.75*h||u>.75*c?this.resetExtent_():Yt(o,i)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getSize(),
 i=t.getView().calculateExtentInternal(r),n=e.getView(),o=Math.log(7.5)/Math.LN2;me(i,1/(.1*Math.pow(2,o/2))),n.fitInternal(Oi(i))},e.prototype.recenter_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getView();e.getView().setCenterInternal(r.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),i=t.getView(),n=e.getView(),o=this.rotateWithView_?0:-i.getRotation(),s=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=i.getCenterInternal(),u=i.getResolution(),h=n.getResolution(),c=r[0]*u/h,p=r[1]*u/h;if(s.setPosition(l),a){a.style.width=c+"px",a.style.height=p+"px";var d="rotate("+o+"rad)";a.style.transform=d}}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?Yn(this.collapseLabel_,this.label_):Yn(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=t
 his.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),V(t,es,(function(t){this.updateBox_()}),this)}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap
 _},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(Us),NO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),jO="degrees",DO="imperial",GO="nautical",zO="metric",BO="us",UO=[1,2,5],YO=function(t){function e(e){var r=this,i=e||{},n=void 0!==i.className?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return(r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).innerElement_=document.createElement("div"),r.innerElement_.className=n+"-inner",r.element.className=n+" ol-unselectable",r.element.appendChild(r.innerElement_),r.viewState_=null,r.minWidth_=void 0!==i.minWidth?i.minWidth:64,r.renderedVisible_=!1,r.renderedWidth_=void 0,r.renderedHTML_=""
 ,r.addEventListener(tt("units"),r.handleUnitsChanged_),r.setUnits(i.units||zO),r.scaleBar_=i.bar||!1,r.scaleBarSteps_=i.steps||4,r.scaleBarText_=i.text||!1,r.dpi_=i.dpi||void 0,r}return NO(e,t),e.prototype.getUnits=function(){return this.get("units")},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set("units",t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,r=t.projection,i=this.getUnits(),n=i==jO?_t.DEGREES:_t.METERS,o=yr(r,t.resolution,e,n),s=this.minWidth_*(this.dpi_||25.4/.28)/(25.4/.28),a=s*o,l="";if(i==jO){var u=mt[_t.DEGREES];(a*=u)<u/60?(l="″",o*=3600):a<u?(l="′",o*=60):l="°"}else i==DO?a<.9144?(l="in",o/=.0254):a<1609.344?(l="ft",o/=.3048):(l="mi",o/=1609.344):i==GO?(o/=1852,l="nm"):i==zO?a<.001?(l="μm",o*=1e6):a<1?(l="mm",o*=1e3):a<1e3?l="m":(l="km",o/=1e3):i==BO?a<.9144?(l="in",o*=39.37):a<1609.344?(l="ft",o/=.30480061):(l="mi",o/=
 1609.3472):lt(!1,33);for(var h,c,p,d,f=3*Math.floor(Math.log(s*o)/Math.log(10));;){p=Math.floor(f/3);var g=Math.pow(10,p);if(h=UO[(f%3+3)%3]*g,c=Math.round(h/o),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(c>=s)break;++f}d=this.scaleBar_?this.createScaleBar(c,h,l):h.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,r){for(var i="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),n=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a<this.scaleBarSteps_;a++)0===a&&n.push(this.createMarker("absolute",a)),n.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+s+';"></div
 >'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,r):"")+"</div>"),a===this.scaleBarSteps_-1&&n.push(this.createStepText(a+1,t,!0,e,r)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+i+"</div>":"")+n.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,r,i,n){var o=(0===t?0:Math.round(i/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+n);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(r?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=yr(this.viewState_.projection,this.viewState_.resolution,this.viewStat
 e_.center),e=this.dpi_||25.4/.28,r=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*r*39.37*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(Us),WO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),VO=0,XO=1,qO=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),render:i.render})||this).dragListenerKeys_=[],r.currentResolution_=void 0,r.direction_=VO,r.dragging_,r.heightLimit_=0,r.widthLimit_=0,r.startX_,r.startY_,r.thumbSize_=null,r.sliderInitialized_=!1,r.duration_=void 0!==i.duration?i.duration:200;var n=void 0!==i.className?i.className:"ol-zoomslider",o=document.crea
 teElement("button");o.setAttribute("type","button"),o.className=n+"-thumb ol-unselectable";var s=r.element;return s.className=n+" ol-unselectable ol-control",s.appendChild(o),s.addEventListener(Ho,r.handleDraggerStart_.bind(r),!1),s.addEventListener(Ko,r.handleDraggerDrag_.bind(r),!1),s.addEventListener(Jo,r.handleDraggerEnd_.bind(r),!1),s.addEventListener(F,r.handleContainerClick_.bind(r),!1),o.addEventListener(F,u,!1),r}return WO(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},e.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,r=t.offsetHeight;if(0===e&&0===r)return this.sliderInitialized_=!1;var i=t.firstElementChild,n=getComputedStyle(i),o=i.offsetWidth+parseFloat(n.marginRight)+parseFloat(n.marginLeft),s=i.offsetHeight+parseFloat(n.marginTop)+parseFloat(n.marginBottom);return this.thumbSize_=[o,s],e>r?(this.direction_=XO,this.widthLimit_=e-o):(this.direction_=VO,this.heightLimit_=r-s),this.sliderInitialized_=!0},e.prototype.
 handleContainerClick_=function(t){var e=this.getMap().getView(),r=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),i=this.getResolutionForPosition_(r),n=e.getConstrainedZoom(e.getZoomForResolution(i));e.animateInternal({zoom:n,duration:this.duration_,easing:Is})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var r=this.handleDraggerDrag_,i=this.handleDraggerEnd_;this.dragListenerKeys_.push(W(document,Ko,r,this),W(document,Jo,i,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,r=t.clientY-this.startY_,i=this.getRelativePosition_(e,r);this.currentResolution_=this.getResolutionForPosition_(i),this.getMap().get
 View().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(X),this.dragListenerKeys_.length=0)},e.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),r=this.element.firstElementChild;this.direction_==XO?r.style.left=this.widthLimit_*e+"px":r.style.top=this.heightLimit_*e+"px"},e.prototype.getRelativePosition_=function(t,e){return we(this.direction_===XO?t/this.widthLimit_:e/this.heightLimit_,0,1)},e.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},e.prototype.getPositionForResolution_=function(t){return we(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},e.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resolution;this.curr
 entResolution_=e,this.setThumbPosition_(e)}},e}(Us),ZO=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),KO=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),target:i.target})||this).extent=i.extent?i.extent:null;var n=void 0!==i.className?i.className:"ol-zoom-extent",o=void 0!==i.label?i.label:"E",s=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof o?document.createTextNode(o):o),a.addEventListener(F,r.handleClick_.bind(r),!1);var l=n+" ol-unselectable ol-control",u=r.element;return u.className=l,u.appendChild(a),r}return ZO(e,t),e.prototype.handleClick_=fu
 nction(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Oi(e))},e}(Us),HO={array:{},color:{},colorlike:{},control:{},coordinate:{},easing:{},events:{}};HO.events.condition={},HO.extent={},HO.featureloader={},HO.format={},HO.format.filter={},HO.geom={},HO.has={},HO.interaction={},HO.layer={},HO.loadingstrategy={},HO.proj={},HO.proj.Units={},HO.proj.proj4={},HO.render={},HO.render.canvas={},HO.renderer={},HO.renderer.canvas={},HO.renderer.webgl={},HO.size={},HO.source={},HO.sphere={},HO.style={},HO.style.IconImageCache={},HO.tilegrid={},HO.transform={},HO.util={},HO.webgl={},HO.xml={},HO.Collection=at,HO.Feature=ht,HO.Geolocation=Vi,HO.Kinetic=Xi,HO.Map=Ja,HO.Object=et,HO.Observable=K,HO.Observable.unByKey=Z,HO.Overlay=dl,HO.PluggableMap=zs,HO.View=ks,HO.array.stableSort=function(t,e){var r,i=t.length,n=Array(t.length);for(r=0;r<i;r++)n[r]={inde
 x:r,value:t[r]};for(n.sort((function(t,r){return e(t.value,r.value)||t.index-r.index})),r=0;r<t.length;r++)t[r]=n[r].value},HO.color.asArray=tn,HO.color.asString=Ki,HO.colorlike.asColorLike=Ln,HO.control.Attribution=Ws,HO.control.Control=Us,HO.control.FullScreen=OO,HO.control.MousePosition=MO,HO.control.OverviewMap=kO,HO.control.Rotate=Xs,HO.control.ScaleLine=YO,HO.control.Zoom=Zs,HO.control.ZoomSlider=qO,HO.control.ZoomToExtent=KO,HO.control.defaults=Ks,HO.coordinate.add=Qe,HO.coordinate.createStringXY=function(t){return function(e){return ur(e,t)}},HO.coordinate.format=rr,HO.coordinate.rotate=nr,HO.coordinate.toStringHDMS=function(t,e){return t?er("NS",t[1],e)+" "+er("EW",t[0],e):""},HO.coordinate.toStringXY=ur,HO.easing.easeIn=Ps,HO.easing.easeOut=Is,HO.easing.inAndOut=Os,HO.easing.linear=Ls,HO.easing.upAndDown=function(t){return t<.5?Os(2*t):1-Os(2*(t-.5))},HO.events.condition.altKeyOnly=sa,HO.events.condition.altShiftKeysOnly=aa,HO.events.condition.always=ha,HO.events.condition
 .click=function(t){return t.type==Zo.CLICK},HO.events.condition.doubleClick=function(t){return t.type==Zo.DBLCLICK},HO.events.condition.focus=la,HO.events.condition.mouseOnly=ma,HO.events.condition.never=pa,HO.events.condition.noModifierKeys=fa,HO.events.condition.penOnly=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"pen"===e.pointerType},HO.events.condition.platformModifierKeyOnly=function(t){var e=t.originalEvent;return!e.altKey&&(kn?e.metaKey:e.ctrlKey)&&!e.shiftKey},HO.events.condition.pointerMove=function(t){return"pointermove"==t.type},HO.events.condition.primaryAction=_a,HO.events.condition.shiftKeyOnly=ga,HO.events.condition.singleClick=da,HO.events.condition.targetNotEditable=ya,HO.events.condition.touchOnly=function(t){var e=t.originalEvent;return lt(void 0!==e,56),"touch"===e.pointerType},HO.extent.applyTransform=_e,HO.extent.boundingExtent=Dt,HO.extent.buffer=Gt,HO.extent.containsCoordinate=Ut,HO.extent.containsExtent=Yt,HO.extent.containsXY=Wt,HO.extent.cr
 eateEmpty=Xt,HO.extent.equals=Jt,HO.extent.extend=$t,HO.extent.getArea=ne,HO.extent.getBottomLeft=oe,HO.extent.getBottomRight=se,HO.extent.getCenter=ae,HO.extent.getHeight=he,HO.extent.getIntersection=ce,HO.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},HO.extent.getTopLeft=pe,HO.extent.getTopRight=de,HO.extent.getWidth=fe,HO.extent.intersects=ge,HO.extent.isEmpty=ye,HO.featureloader.setWithCredentials=function(t){_l=t},HO.featureloader.xhr=xl,HO.format.EsriJSON=MS,HO.format.Feature=Df,HO.format.GML=iT,HO.format.GML2=aT,HO.format.GML3=eT,HO.format.GML32=hT,HO.format.GPX=XT,HO.format.GeoJSON=HT,HO.format.IGC=gC,HO.format.IIIFInfo=Ec,HO.format.KML=aR,HO.format.MVT=ng,HO.format.OSMXML=gR,HO.format.Polyline=SR,HO.format.Polyline.decodeDeltas=vR,HO.format.Polyline.decodeFloats=wR,HO.format.Polyline.encodeDeltas=_R,HO.format.Polyline.encodeFloats=xR,HO.format.TopoJSON=MR,HO.format.WFS=qP,HO.format.WFS.writeFilter=function(t){var e=Bl(LP,"Filter");return zP(e,t,[]),e},HO.format.WK
 T=pI,HO.format.WMSCapabilities=GI,HO.format.WMSGetFeatureInfo=BI,HO.format.WMTSCapabilities=bO,HO.format.filter.Bbox=GR,HO.format.filter.Contains=YR,HO.format.filter.During=qR,HO.format.filter.EqualTo=JR,HO.format.filter.GreaterThan=QR,HO.format.filter.GreaterThanOrEqualTo=eP,HO.format.filter.Intersects=iP,HO.format.filter.IsBetween=oP,HO.format.filter.IsLike=aP,HO.format.filter.IsNull=uP,HO.format.filter.LessThan=cP,HO.format.filter.LessThanOrEqualTo=dP,HO.format.filter.Not=gP,HO.format.filter.NotEqualTo=mP,HO.format.filter.Or=vP,HO.format.filter.Within=wP,HO.format.filter.and=bP,HO.format.filter.bbox=SP,HO.format.filter.between=function(t,e,r){return new oP(t,e,r)},HO.format.filter.contains=function(t,e,r){return new YR(t,e,r)},HO.format.filter.during=function(t,e,r){return new qR(t,e,r)},HO.format.filter.equalTo=function(t,e,r){return new JR(t,e,r)},HO.format.filter.greaterThan=function(t,e){return new QR(t,e)},HO.format.filter.greaterThanOrEqualTo=function(t,e){return new eP(t,e
 )},HO.format.filter.intersects=function(t,e,r){return new iP(t,e,r)},HO.format.filter.isNull=function(t){return new uP(t)},HO.format.filter.lessThan=function(t,e){return new cP(t,e)},HO.format.filter.lessThanOrEqualTo=function(t,e){return new dP(t,e)},HO.format.filter.like=function(t,e,r,i,n,o){return new aP(t,e,r,i,n,o)},HO.format.filter.not=function(t){return new gP(t)},HO.format.filter.notEqualTo=function(t,e,r){return new mP(t,e,r)},HO.format.filter.or=function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(vP,e))},HO.format.filter.within=function(t,e,r){return new wP(t,e,r)},HO.geom.Circle=Ob,HO.geom.Geometry=Br,HO.geom.GeometryCollection=wS,HO.geom.LineString=Tf,HO.geom.LinearRing=hi,HO.geom.MultiLineString=Uf,HO.geom.MultiPoint=Wf,HO.geom.MultiPolygon=qf,HO.geom.Point=pi,HO.geom.Polygon=Pi,HO.geom.Polygon.circular=Ii,HO.geom.Polygon.fromCircle=Li,HO.geom.Polygon.fromExtent=Oi,HO.geom.SimpleGeometry=Wr,HO.has.DEVICE_PIXEL
 _RATIO=Nn,HO.interaction.DoubleClickZoom=ea,HO.interaction.DragAndDrop=Cb,HO.interaction.DragBox=Oa,HO.interaction.DragPan=xa,HO.interaction.DragRotate=ba,HO.interaction.DragRotateAndZoom=Rb,HO.interaction.DragZoom=Ma,HO.interaction.Draw=zb,HO.interaction.Draw.createBox=function(){return function(t,e,r){var i=Dt(t.map((function(t){return Mr(t,r)}))),n=[[oe(i),se(i),de(i),pe(i),oe(i)]],o=e;o?o.setCoordinates(n):o=new Pi(n);var s=Or();return s&&o.transform(r,s),o}},HO.interaction.Draw.createRegularPolygon=function(t,e){return function(r,i,n){var o=Mr(r[0],n),s=Mr(r[1],n),a=Math.sqrt(sr(o,s)),l=i||Li(new Ob(o),t),u=e;if(!e){var h=s[0]-o[0],c=s[1]-o[1];u=Math.atan(c/h)-(h<0?Math.PI:0)}Mi(l,o,a,u);var p=Or();return p&&l.transform(n,p),l}},HO.interaction.Extent=qb,HO.interaction.Interaction=Qs,HO.interaction.KeyboardPan=Da,HO.interaction.KeyboardZoom=za,HO.interaction.Modify=iS,HO.interaction.MouseWheelZoom=Wa,HO.interaction.PinchRotate=Xa,HO.interaction.PinchZoom=Za,HO.interaction.Pointe
 r=na,HO.interaction.Select=lS,HO.interaction.Snap=pS,HO.interaction.Translate=_S,HO.interaction.defaults=Ka,HO.layer.Base=mn,HO.layer.BaseImage=ap,HO.layer.BaseTile=vp,HO.layer.BaseVector=_d,HO.layer.Graticule=Lf,HO.layer.Group=Yo,HO.layer.Heatmap=jf,HO.layer.Image=gp,HO.layer.Layer=In,HO.layer.MapboxVector=vb,HO.layer.Tile=Tp,HO.layer.Vector=Ef,HO.layer.VectorImage=wb,HO.layer.VectorTile=sg,HO.loadingstrategy.all=wl,HO.loadingstrategy.bbox=function(t,e){return[t]},HO.loadingstrategy.tile=function(t){return function(e,r){var i=t.getZForResolution(r),n=t.getTileRangeForExtentAndZ(e,i),o=[],s=[i,0,0];for(s[1]=n.minX;s[1]<=n.maxX;++s[1])for(s[2]=n.minY;s[2]<=n.maxY;++s[2])o.push(t.getTileCoordExtent(s));return o}},HO.proj.Projection=xe,HO.proj.Units.METERS_PER_UNIT=mt,HO.proj.addCoordinateTransforms=xr,HO.proj.addEquivalentProjections=mr,HO.proj.addProjection=fr,HO.proj.equivalent=wr,HO.proj.fromLonLat=function(t,e){return Tr(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},HO.proj.get=gr,HO.p
 roj.getPointResolution=yr,HO.proj.getTransform=Sr,HO.proj.proj4.register=function(t){var e,r,i=Object.keys(t.defs),n=i.length;for(e=0;e<n;++e){var o=i[e];if(!gr(o)){var s=t.defs(o);fr(new xe({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:s.units}))}}for(e=0;e<n;++e){var a=i[e],l=gr(a);for(r=0;r<n;++r){var u=i[r],h=gr(u);if(!Xe(a,u)){var c=t.defs(a),p=t.defs(u);if(c===p)mr([l,h]);else{var d=t(T({},c,{axis:void 0}),T({},p,{axis:void 0}));xr(l,h,kr(l,h,d.forward),kr(h,l,d.inverse))}}}}},HO.proj.toLonLat=function(t,e){var r=Tr(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),i=r[0];return(i<-180||i>180)&&(r[0]=Pe(i+180,360)-180),r},HO.proj.transform=Tr,HO.proj.transformExtent=Cr,HO.render.VectorContext=On,HO.render.canvas.labelCache=$n,HO.render.getRenderPixel=function(t,e){var r=e.slice(0);return St(t.inversePixelTransform.slice(),r),r},HO.render.getVectorContext=Mo,HO.render.toContext=function(t,e){var r=t.canvas,i=e||{},n=i.pixelRatio||Nn,o=i.size;o&&(r.width=o[0]*n,r.height=o[
 1]*n,r.style.width=o[0]+"px",r.style.height=o[1]+"px");var s=[0,0,r.width,r.height],a=Tt([1,0,0,1,0,0],n,n);return new go(t,n,s,a,0)},HO.renderer.Composite=zo,HO.renderer.canvas.ImageLayer=dp,HO.renderer.canvas.TileLayer=bp,HO.renderer.canvas.VectorImageLayer=df,HO.renderer.canvas.VectorLayer=cf,HO.renderer.canvas.VectorTileLayer=xf,HO.renderer.webgl.PointsLayer=Ed,HO.size.toSize=Ds,HO.source.BingMaps=Kh,HO.source.CartoDB=Qh,HO.source.Cluster=cc,HO.source.IIIF=Ic,HO.source.Image=Dc,HO.source.ImageArcGISRest=Bc,HO.source.ImageCanvas=Vc,HO.source.ImageMapGuide=qc,HO.source.ImageStatic=Kc,HO.source.ImageWMS=rp,HO.source.OSM=op,HO.source.OSM.ATTRIBUTION=np,HO.source.Raster=zp,HO.source.Source=Mh,HO.source.Stamen=Vp,HO.source.Tile=Nh,HO.source.TileArcGISRest=qp,HO.source.TileDebug=Hp,HO.source.TileImage=Xh,HO.source.TileJSON=$p,HO.source.TileWMS=td,HO.source.UTFGrid=id,HO.source.Vector=uc,HO.source.VectorTile=hd,HO.source.WMTS=gd,HO.source.WMTS.optionsFromCapabilities=function(t,e){var r
 =_(t.Contents.Layer,(function(t,r,i){return t.Identifier==e.layer}));if(null===r)return null;var i,n=t.Contents.TileMatrixSet;(i=r.TileMatrixSetLink.length>1?x(r.TileMatrixSetLink,"projection"in e?function(t,r,i){var o=_(n,(function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,s=gr(o.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||gr(o),a=gr(e.projection);return s&&a?wr(s,a):o==e.projection}:function(t,r,i){return t.TileMatrixSet==e.matrixSet}):0)<0&&(i=0);var o=r.TileMatrixSetLink[i].TileMatrixSet,s=r.TileMatrixSetLink[i].TileMatrixSetLimits,a=r.Format[0];"format"in e&&(a=e.format),(i=x(r.Style,(function(t,r,i){return"style"in e?t.Title==e.style:t.isDefault})))<0&&(i=0);var l=r.Style[i].Identifier,u={};"Dimension"in r&&r.Dimension.forEach((function(t,e,r){var i=t.Identifier,n=t.Default;void 0===n&&(n=t.Value[0]),u[i]=n}));var h,c=_(t.Contents.TileMatrixSet,(function(t,e,r){return t.Identifier==o})),p=c.SupportedCRS;if(p&&(h=gr(p.replace(/urn:ogc:def:crs:(\w+):(.*
 :)?(\w+)$/,"$1:$3"))||gr(p)),"projection"in e){var d=gr(e.projection);d&&(h&&!wr(d,h)||(h=d))}var g="ne"==h.getAxisOrientation().substr(0,2),y=c.TileMatrix[0],m={MinTileCol:0,MinTileRow:0,MaxTileCol:y.MatrixWidth-1,MaxTileRow:y.MatrixHeight-1};s&&(m=s[s.length-1],y=_(c.TileMatrix,(function(t){return t.Identifier===m.TileMatrix})));var v=28e-5*y.ScaleDenominator/h.getMetersPerUnit(),w=g?[y.TopLeftCorner[1],y.TopLeftCorner[0]]:y.TopLeftCorner,b=y.TileWidth*v,S=y.TileHeight*v,T=[w[0]+b*m.MinTileCol,w[1]-S*(1+m.MaxTileRow),w[0]+b*(1+m.MaxTileCol),w[1]-S*m.MinTileRow];null===h.getExtent()&&h.setExtent(T);var C=Mu(c,T,s),E=[],R=e.requestEncoding;if(R=void 0!==R?R:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var P=t.OperationsMetadata.GetTile.DCP.HTTP.Get,I=0,O=P.length;I<O;++I)if(P[I].Constraint){var L=_(P[I].Constraint,(function(t){return"GetEncoding"==t.name})).AllowedValues.Value;if(""===R&&(R=L[0]),R!==pd)break;f(L,pd)&&E.push(P[I].href)}else P[I].href&&(R=pd,E.pu
 sh(P[I].href));return 0===E.length&&(R=dd,r.ResourceURL.forEach((function(t){"tile"===t.resourceType&&(a=t.format,E.push(t.template))}))),{urls:E,layer:e.layer,matrixSet:o,format:a,projection:h,requestEncoding:R,tileGrid:C,style:l,dimensions:u,wrapX:!1,crossOrigin:e.crossOrigin}},HO.source.XYZ=Jh,HO.source.Zoomify=yc,HO.sphere.getArea=function t(e,r){var i=r||{},n=i.radius||6371008.8,o=i.projection||"EPSG:3857",s=e.getType();s!==gt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var a,l,u,h,c,p,d=0;switch(s){case gt.POINT:case gt.MULTI_POINT:case gt.LINE_STRING:case gt.MULTI_LINE_STRING:case gt.LINEAR_RING:break;case gt.POLYGON:for(a=e.getCoordinates(),d=Math.abs(Ke(a[0],n)),u=1,h=a.length;u<h;++u)d-=Math.abs(Ke(a[u],n));break;case gt.MULTI_POLYGON:for(u=0,h=(a=e.getCoordinates()).length;u<h;++u)for(l=a[u],d+=Math.abs(Ke(l[0],n)),c=1,p=l.length;c<p;++c)d-=Math.abs(Ke(l[c],n));break;case gt.GEOMETRY_COLLECTION:var f=e.getGeometries();for(u=0,h=f.length;u<h;++u)d+=t(f[u],r
 );break;default:throw new Error("Unsupported geometry type: "+s)}return d},HO.sphere.getDistance=qe,HO.sphere.getLength=function t(e,r){var i=r||{},n=i.radius||6371008.8,o=i.projection||"EPSG:3857",s=e.getType();s!==gt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var a,l,u,h,c,p,d=0;switch(s){case gt.POINT:case gt.MULTI_POINT:break;case gt.LINE_STRING:case gt.LINEAR_RING:d=Ze(a=e.getCoordinates(),n);break;case gt.MULTI_LINE_STRING:case gt.POLYGON:for(u=0,h=(a=e.getCoordinates()).length;u<h;++u)d+=Ze(a[u],n);break;case gt.MULTI_POLYGON:for(u=0,h=(a=e.getCoordinates()).length;u<h;++u)for(c=0,p=(l=a[u]).length;c<p;++c)d+=Ze(l[c],n);break;case gt.GEOMETRY_COLLECTION:var f=e.getGeometries();for(u=0,h=f.length;u<h;++u)d+=t(f[u],r);break;default:throw new Error("Unsupported geometry type: "+s)}return d},HO.style.Circle=ju,HO.style.Fill=Du,HO.style.Icon=th,HO.style.IconImageCache.shared=sn,HO.style.Image=Fu,HO.style.RegularShape=ku,HO.style.Stroke=eh,HO.style.Style=ah,HO.styl
 e.Text=hh,HO.tilegrid.TileGrid=Ll,HO.tilegrid.WMTS=Lu,HO.tilegrid.WMTS.createFromCapabilitiesMatrixSet=Mu,HO.tilegrid.createXYZ=Fl,HO.transform.composeCssTransform=function(t,e,r,i,n,o,s){return Rt(Ct([1,0,0,1,0,0],t,e,r,i,n,o,s))},HO.util.getUid=o,HO.webgl.ARRAY_BUFFER=34962,HO.webgl.Buffer=cu,HO.webgl.DYNAMIC_DRAW=35048,HO.webgl.ELEMENT_ARRAY_BUFFER=34963,HO.webgl.Helper=Eu,HO.webgl.Helper.computeAttributesStride=Tu,HO.webgl.PostProcessingPass=fu,HO.webgl.RenderTarget=Pu,HO.webgl.STATIC_DRAW=35044,HO.webgl.STREAM_DRAW=35040,HO.xml.getAllTextContent=Ul,HO.xml.parse=Wl,HO.xml.registerDocument=function(t){au=t},HO.xml.registerXMLSerializer=function(t){su=t};e.default=HO}]).default}));
+//# sourceMappingURL=ol.js.map
\ No newline at end of file

Added: sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js.map
===================================================================
--- sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js.map	                        (rev 0)
+++ sandbox/jng/ogc_viewer_representation/Web/src/viewerfiles/ol.js.map	2020-07-28 12:41:32 UTC (rev 9690)
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack://ol/webpack/universalModuleDefinition","webpack://ol/webpack/bootstrap","webpack://ol/./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js","webpack://ol/./node_modules/rbush/rbush.js","webpack://ol/./node_modules/pbf/index.js","webpack://ol/./node_modules/mapbox-to-css-font/index.js","webpack://ol/./node_modules/ieee754/index.js","webpack://ol/(webpack)/buildin/global.js","webpack://ol/./node_modules/webfont-matcher/lib/fonts/google.js","webpack://ol/./node_modules/buffer/index.js","webpack://ol/./node_modules/base64-js/index.js","webpack://ol/./node_modules/isarray/index.js","webpack://ol/./build/ol/util.js","webpack://ol/./build/ol/AssertionError.js","webpack://ol/./build/ol/events/Event.js","webpack://ol/./build/ol/ObjectEventType.js","webpack://ol/./build/ol/Disposable.js","webpack://ol/./build/ol/array.js","webpack://ol/./build/ol/functions.js","webpack://ol/./build/ol/obj.js","webpack://ol/./build/ol/events/Target.js","webpack://ol/./
 build/ol/events/EventType.js","webpack://ol/./build/ol/events.js","webpack://ol/./build/ol/Observable.js","webpack://ol/./build/ol/Object.js","webpack://ol/./build/ol/CollectionEventType.js","webpack://ol/./build/ol/Collection.js","webpack://ol/./build/ol/asserts.js","webpack://ol/./build/ol/Feature.js","webpack://ol/./build/ol/geom/GeometryLayout.js","webpack://ol/./build/ol/geom/GeometryType.js","webpack://ol/./build/ol/proj/Units.js","webpack://ol/./build/ol/transform.js","webpack://ol/./build/ol/extent/Corner.js","webpack://ol/./build/ol/extent/Relationship.js","webpack://ol/./build/ol/extent.js","webpack://ol/./build/ol/proj/Projection.js","webpack://ol/./build/ol/math.js","webpack://ol/./build/ol/proj/epsg3857.js","webpack://ol/./build/ol/proj/epsg4326.js","webpack://ol/./build/ol/proj/projections.js","webpack://ol/./build/ol/proj/transforms.js","webpack://ol/./build/ol/sphere.js","webpack://ol/./build/ol/string.js","webpack://ol/./build/ol/coordinate.js","webpack://ol/./build
 /ol/proj.js","webpack://ol/./build/ol/geom/flat/transform.js","webpack://ol/./build/ol/geom/Geometry.js","webpack://ol/./build/ol/geom/SimpleGeometry.js","webpack://ol/./build/ol/geom/flat/closest.js","webpack://ol/./build/ol/geom/flat/deflate.js","webpack://ol/./build/ol/geom/flat/simplify.js","webpack://ol/./build/ol/geom/flat/inflate.js","webpack://ol/./build/ol/geom/flat/area.js","webpack://ol/./build/ol/geom/LinearRing.js","webpack://ol/./build/ol/geom/Point.js","webpack://ol/./build/ol/geom/flat/contains.js","webpack://ol/./build/ol/geom/flat/interiorpoint.js","webpack://ol/./build/ol/geom/flat/segments.js","webpack://ol/./build/ol/geom/flat/intersectsextent.js","webpack://ol/./build/ol/geom/flat/reverse.js","webpack://ol/./build/ol/geom/flat/orient.js","webpack://ol/./build/ol/geom/Polygon.js","webpack://ol/./build/ol/Geolocation.js","webpack://ol/./build/ol/Kinetic.js","webpack://ol/./build/ol/color.js","webpack://ol/./build/ol/style/IconImageCache.js","webpack://ol/./build/
 ol/layer/Property.js","webpack://ol/./build/ol/layer/Base.js","webpack://ol/./build/ol/render/EventType.js","webpack://ol/./build/ol/source/State.js","webpack://ol/./build/ol/layer/Layer.js","webpack://ol/./build/ol/render/VectorContext.js","webpack://ol/./build/ol/colorlike.js","webpack://ol/./build/ol/has.js","webpack://ol/./build/ol/dom.js","webpack://ol/./build/ol/css.js","webpack://ol/./build/ol/render/canvas.js","webpack://ol/./build/ol/render/canvas/Immediate.js","webpack://ol/./build/ol/render/canvas/BuilderType.js","webpack://ol/./build/ol/ImageState.js","webpack://ol/./build/ol/renderer/vector.js","webpack://ol/./build/ol/render.js","webpack://ol/./build/ol/renderer/Map.js","webpack://ol/./build/ol/render/Event.js","webpack://ol/./build/ol/renderer/Composite.js","webpack://ol/./build/ol/layer/Group.js","webpack://ol/./build/ol/MapEvent.js","webpack://ol/./build/ol/MapBrowserEvent.js","webpack://ol/./build/ol/MapBrowserEventType.js","webpack://ol/./build/ol/pointer/EventTyp
 e.js","webpack://ol/./build/ol/MapBrowserEventHandler.js","webpack://ol/./build/ol/MapEventType.js","webpack://ol/./build/ol/MapProperty.js","webpack://ol/./build/ol/structs/PriorityQueue.js","webpack://ol/./build/ol/TileState.js","webpack://ol/./build/ol/TileQueue.js","webpack://ol/./build/ol/ViewHint.js","webpack://ol/./build/ol/ViewProperty.js","webpack://ol/./build/ol/centerconstraint.js","webpack://ol/./build/ol/resolutionconstraint.js","webpack://ol/./build/ol/rotationconstraint.js","webpack://ol/./build/ol/easing.js","webpack://ol/./build/ol/View.js","webpack://ol/./build/ol/tilegrid/common.js","webpack://ol/./build/ol/size.js","webpack://ol/./build/ol/PluggableMap.js","webpack://ol/./build/ol/control/Control.js","webpack://ol/./build/ol/control/Attribution.js","webpack://ol/./build/ol/control/Rotate.js","webpack://ol/./build/ol/control/Zoom.js","webpack://ol/./build/ol/control.js","webpack://ol/./build/ol/interaction/Property.js","webpack://ol/./build/ol/interaction/Interact
 ion.js","webpack://ol/./build/ol/interaction/DoubleClickZoom.js","webpack://ol/./build/ol/interaction/Pointer.js","webpack://ol/./build/ol/events/condition.js","webpack://ol/./build/ol/interaction/DragPan.js","webpack://ol/./build/ol/interaction/DragRotate.js","webpack://ol/./build/ol/render/Box.js","webpack://ol/./build/ol/interaction/DragBox.js","webpack://ol/./build/ol/interaction/DragZoom.js","webpack://ol/./build/ol/events/KeyCode.js","webpack://ol/./build/ol/interaction/KeyboardPan.js","webpack://ol/./build/ol/interaction/KeyboardZoom.js","webpack://ol/./build/ol/interaction/MouseWheelZoom.js","webpack://ol/./build/ol/interaction/PinchRotate.js","webpack://ol/./build/ol/interaction/PinchZoom.js","webpack://ol/./build/ol/interaction.js","webpack://ol/./build/ol/Map.js","webpack://ol/./build/ol/OverlayPositioning.js","webpack://ol/./build/ol/Overlay.js","webpack://ol/./build/ol/format/FormatType.js","webpack://ol/./build/ol/featureloader.js","webpack://ol/./build/ol/loadingstrat
 egy.js","webpack://ol/./build/ol/TileRange.js","webpack://ol/./build/ol/tilecoord.js","webpack://ol/./build/ol/tilegrid/TileGrid.js","webpack://ol/./build/ol/tilegrid.js","webpack://ol/./build/ol/webgl.js","webpack://ol/./build/ol/xml.js","webpack://ol/./build/ol/webgl/Buffer.js","webpack://ol/./build/ol/webgl/ContextEventType.js","webpack://ol/./build/ol/webgl/PostProcessingPass.js","webpack://ol/./build/ol/vec/mat4.js","webpack://ol/./build/ol/webgl/Helper.js","webpack://ol/./build/ol/webgl/RenderTarget.js","webpack://ol/./build/ol/tilegrid/WMTS.js","webpack://ol/./build/ol/style/Image.js","webpack://ol/./build/ol/style/RegularShape.js","webpack://ol/./build/ol/style/Circle.js","webpack://ol/./build/ol/style/Fill.js","webpack://ol/./build/ol/style/IconAnchorUnits.js","webpack://ol/./build/ol/style/IconOrigin.js","webpack://ol/./build/ol/ImageBase.js","webpack://ol/./build/ol/Image.js","webpack://ol/./build/ol/style/IconImage.js","webpack://ol/./build/ol/style/Icon.js","webpack://o
 l/./build/ol/style/Stroke.js","webpack://ol/./build/ol/style/Style.js","webpack://ol/./build/ol/style/TextPlacement.js","webpack://ol/./build/ol/style/Text.js","webpack://ol/./build/ol/Tile.js","webpack://ol/./build/ol/ImageTile.js","webpack://ol/./build/ol/reproj.js","webpack://ol/./build/ol/reproj/Triangulation.js","webpack://ol/./build/ol/source/common.js","webpack://ol/./build/ol/reproj/Tile.js","webpack://ol/./build/ol/reproj/common.js","webpack://ol/./build/ol/structs/LRUCache.js","webpack://ol/./build/ol/TileCache.js","webpack://ol/./build/ol/source/TileEventType.js","webpack://ol/./build/ol/source/Source.js","webpack://ol/./build/ol/source/Tile.js","webpack://ol/./build/ol/tileurlfunction.js","webpack://ol/./build/ol/source/UrlTile.js","webpack://ol/./build/ol/source/TileImage.js","webpack://ol/./build/ol/net.js","webpack://ol/./build/ol/source/BingMaps.js","webpack://ol/./build/ol/source/XYZ.js","webpack://ol/./build/ol/source/CartoDB.js","webpack://ol/./build/ol/structs/RB
 ush.js","webpack://ol/./build/ol/source/VectorEventType.js","webpack://ol/./build/ol/source/Vector.js","webpack://ol/./build/ol/source/Cluster.js","webpack://ol/./build/ol/source/Zoomify.js","webpack://ol/./build/ol/format/IIIFInfo.js","webpack://ol/./build/ol/source/IIIF.js","webpack://ol/./build/ol/reproj/Image.js","webpack://ol/./build/ol/source/Image.js","webpack://ol/./build/ol/uri.js","webpack://ol/./build/ol/source/ImageArcGISRest.js","webpack://ol/./build/ol/ImageCanvas.js","webpack://ol/./build/ol/source/ImageCanvas.js","webpack://ol/./build/ol/source/ImageMapGuide.js","webpack://ol/./build/ol/source/ImageStatic.js","webpack://ol/./build/ol/source/WMSServerType.js","webpack://ol/./build/ol/source/ImageWMS.js","webpack://ol/./build/ol/source/OSM.js","webpack://ol/./build/ol/layer/BaseImage.js","webpack://ol/./build/ol/renderer/Layer.js","webpack://ol/./build/ol/renderer/canvas/Layer.js","webpack://ol/./build/ol/renderer/canvas/ImageLayer.js","webpack://ol/./build/ol/layer/Im
 age.js","webpack://ol/./build/ol/layer/TileProperty.js","webpack://ol/./build/ol/layer/BaseTile.js","webpack://ol/./build/ol/renderer/canvas/TileLayer.js","webpack://ol/./build/ol/layer/Tile.js","webpack://ol/./build/ol/source/Raster.js","webpack://ol/./build/ol/source/Stamen.js","webpack://ol/./build/ol/source/TileArcGISRest.js","webpack://ol/./build/ol/source/TileDebug.js","webpack://ol/./build/ol/source/TileJSON.js","webpack://ol/./build/ol/source/TileWMS.js","webpack://ol/./build/ol/source/UTFGrid.js","webpack://ol/./build/ol/VectorTile.js","webpack://ol/./build/ol/VectorRenderTile.js","webpack://ol/./build/ol/source/VectorTile.js","webpack://ol/./build/ol/source/WMTSRequestEncoding.js","webpack://ol/./build/ol/source/WMTS.js","webpack://ol/./build/ol/layer/BaseVector.js","webpack://ol/./build/ol/renderer/webgl/Layer.js","webpack://ol/./build/ol/worker/webgl.js","webpack://ol/./build/ol/renderer/webgl/PointsLayer.js","webpack://ol/./build/ol/render/canvas/Instruction.js","webpac
 k://ol/./build/ol/render/canvas/Builder.js","webpack://ol/./build/ol/render/canvas/ImageBuilder.js","webpack://ol/./build/ol/render/canvas/LineStringBuilder.js","webpack://ol/./build/ol/render/canvas/PolygonBuilder.js","webpack://ol/./build/ol/geom/flat/straightchunk.js","webpack://ol/./build/ol/render/canvas/TextBuilder.js","webpack://ol/./build/ol/render/canvas/BuilderGroup.js","webpack://ol/./build/ol/geom/flat/textpath.js","webpack://ol/./build/ol/geom/flat/length.js","webpack://ol/./build/ol/render/canvas/Executor.js","webpack://ol/./build/ol/render/canvas/ExecutorGroup.js","webpack://ol/./build/ol/render/canvas/hitdetect.js","webpack://ol/./build/ol/renderer/canvas/VectorLayer.js","webpack://ol/./build/ol/renderer/canvas/VectorImageLayer.js","webpack://ol/./build/ol/layer/VectorTileRenderType.js","webpack://ol/./build/ol/renderer/canvas/VectorTileLayer.js","webpack://ol/./build/ol/geom/flat/interpolate.js","webpack://ol/./build/ol/geom/LineString.js","webpack://ol/./build/ol/l
 ayer/Vector.js","webpack://ol/./build/ol/geom/flat/geodesic.js","webpack://ol/./build/ol/layer/Graticule.js","webpack://ol/./build/ol/layer/Heatmap.js","webpack://ol/./build/ol/format/Feature.js","webpack://ol/./build/ol/geom/MultiLineString.js","webpack://ol/./build/ol/geom/MultiPoint.js","webpack://ol/./build/ol/geom/flat/center.js","webpack://ol/./build/ol/geom/MultiPolygon.js","webpack://ol/./build/ol/render/Feature.js","webpack://ol/./build/ol/format/MVT.js","webpack://ol/./build/ol/layer/VectorTile.js","webpack://ol/./src/ol/ImageState.js","webpack://ol/./src/ol/util.js","webpack://ol/./src/ol/size.js","webpack://ol/./src/ol/style/Image.js","webpack://ol/./src/ol/AssertionError.js","webpack://ol/./src/ol/asserts.js","webpack://ol/./src/ol/math.js","webpack://ol/./src/ol/color.js","webpack://ol/./src/ol/colorlike.js","webpack://ol/./src/ol/has.js","webpack://ol/./src/ol/dom.js","webpack://ol/./src/ol/events/Event.js","webpack://ol/./src/ol/ObjectEventType.js","webpack://ol/./sr
 c/ol/Disposable.js","webpack://ol/./src/ol/array.js","webpack://ol/./src/ol/functions.js","webpack://ol/./src/ol/obj.js","webpack://ol/./src/ol/events/Target.js","webpack://ol/./src/ol/events/EventType.js","webpack://ol/./src/ol/events.js","webpack://ol/./src/ol/Observable.js","webpack://ol/./src/ol/Object.js","webpack://ol/./src/ol/css.js","webpack://ol/./src/ol/transform.js","webpack://ol/./src/ol/render/canvas.js","webpack://ol/./src/ol/style/RegularShape.js","webpack://ol/./src/ol/style/Circle.js","webpack://ol/./src/ol/style/Fill.js","webpack://ol/./src/ol/geom/GeometryType.js","webpack://ol/./src/ol/style/Stroke.js","webpack://ol/./src/ol/style/Style.js","webpack://ol/./src/ol/style/IconAnchorUnits.js","webpack://ol/./src/ol/style/IconOrigin.js","webpack://ol/./src/ol/style/IconImageCache.js","webpack://ol/./src/ol/ImageBase.js","webpack://ol/./src/ol/extent/Relationship.js","webpack://ol/./src/ol/extent.js","webpack://ol/./src/ol/Image.js","webpack://ol/./src/ol/style/IconIma
 ge.js","webpack://ol/./src/ol/style/Icon.js","webpack://ol/./src/ol/style/TextPlacement.js","webpack://ol/./src/ol/style/Text.js","webpack://ol/./src/ol/geom/flat/contains.js","webpack://ol/./src/ol/geom/flat/interiorpoint.js","webpack://ol/./src/ol/proj/Units.js","webpack://ol/./src/ol/proj/Projection.js","webpack://ol/./src/ol/proj/epsg3857.js","webpack://ol/./src/ol/proj/epsg4326.js","webpack://ol/./src/ol/proj/projections.js","webpack://ol/./src/ol/proj/transforms.js","webpack://ol/./src/ol/coordinate.js","webpack://ol/./src/ol/proj.js","webpack://ol/./src/ol/geom/flat/interpolate.js","webpack://ol/./src/ol/geom/flat/center.js","webpack://ol/./src/ol/geom/flat/transform.js","webpack://ol/./src/ol/render/Feature.js","webpack://ol/./node_modules/ol-mapbox-style/dist/util.js","webpack://ol/./node_modules/ol-mapbox-style/dist/stylefunction.js","webpack://ol/./src/ol/TileRange.js","webpack://ol/./src/ol/layer/Property.js","webpack://ol/./src/ol/layer/Base.js","webpack://ol/./src/ol/r
 ender/EventType.js","webpack://ol/./src/ol/source/State.js","webpack://ol/./src/ol/layer/Layer.js","webpack://ol/./src/ol/render/VectorContext.js","webpack://ol/./src/ol/geom/Geometry.js","webpack://ol/./src/ol/geom/GeometryLayout.js","webpack://ol/./src/ol/geom/SimpleGeometry.js","webpack://ol/./src/ol/render/canvas/Immediate.js","webpack://ol/./src/ol/render/canvas/BuilderType.js","webpack://ol/./src/ol/renderer/vector.js","webpack://ol/./src/ol/render/Event.js","webpack://ol/./src/ol/structs/PriorityQueue.js","webpack://ol/./src/ol/TileState.js","webpack://ol/./src/ol/ViewHint.js","webpack://ol/./src/ol/geom/flat/closest.js","webpack://ol/./src/ol/geom/flat/deflate.js","webpack://ol/./src/ol/geom/flat/simplify.js","webpack://ol/./src/ol/geom/flat/inflate.js","webpack://ol/./src/ol/geom/flat/area.js","webpack://ol/./src/ol/geom/LinearRing.js","webpack://ol/./src/ol/geom/Point.js","webpack://ol/./src/ol/geom/flat/segments.js","webpack://ol/./src/ol/geom/flat/intersectsextent.js","w
 ebpack://ol/./src/ol/geom/flat/reverse.js","webpack://ol/./src/ol/geom/flat/orient.js","webpack://ol/./src/ol/geom/Polygon.js","webpack://ol/./src/ol/Feature.js","webpack://ol/./src/ol/geom/GeometryCollection.js","webpack://ol/./src/ol/format/Feature.js","webpack://ol/./src/ol/format/FormatType.js","webpack://ol/./src/ol/format/JSONFeature.js","webpack://ol/./src/ol/geom/flat/length.js","webpack://ol/./src/ol/geom/LineString.js","webpack://ol/./src/ol/geom/MultiLineString.js","webpack://ol/./src/ol/geom/MultiPoint.js","webpack://ol/./src/ol/geom/MultiPolygon.js","webpack://ol/./src/ol/format/GeoJSON.js","webpack://ol/./src/ol/format/MVT.js","webpack://ol/./src/ol/layer/TileProperty.js","webpack://ol/./src/ol/renderer/Layer.js","webpack://ol/./src/ol/renderer/canvas/Layer.js","webpack://ol/./src/ol/renderer/canvas/TileLayer.js","webpack://ol/./src/ol/layer/BaseVector.js","webpack://ol/./src/ol/render/canvas/Instruction.js","webpack://ol/./src/ol/render/canvas/Builder.js","webpack://o
 l/./src/ol/render/canvas/PolygonBuilder.js","webpack://ol/./src/ol/geom/flat/straightchunk.js","webpack://ol/./src/ol/render/canvas/TextBuilder.js","webpack://ol/./src/ol/render/canvas/BuilderGroup.js","webpack://ol/./src/ol/render/canvas/ImageBuilder.js","webpack://ol/./src/ol/render/canvas/LineStringBuilder.js","webpack://ol/./src/ol/geom/flat/textpath.js","webpack://ol/./src/ol/render/canvas/Executor.js","webpack://ol/./src/ol/render/canvas/ExecutorGroup.js","webpack://ol/./src/ol/render/canvas/hitdetect.js","webpack://ol/./src/ol/renderer/canvas/VectorLayer.js","webpack://ol/./src/ol/layer/Vector.js","webpack://ol/./src/ol/layer/VectorTileRenderType.js","webpack://ol/./src/ol/renderer/canvas/VectorTileLayer.js","webpack://ol/./src/ol/layer/VectorTile.js","webpack://ol/./node_modules/ol-mapbox-style/dist/index.js","webpack://ol/./build/ol/layer/MapboxVector.js","webpack://ol/./build/ol/layer/VectorImage.js","webpack://ol/./build/ol/interaction/DragAndDrop.js","webpack://ol/./buil
 d/ol/interaction/DragRotateAndZoom.js","webpack://ol/./build/ol/geom/Circle.js","webpack://ol/./build/ol/interaction/Draw.js","webpack://ol/./build/ol/interaction/Extent.js","webpack://ol/./build/ol/interaction/Modify.js","webpack://ol/./build/ol/interaction/Select.js","webpack://ol/./build/ol/interaction/Snap.js","webpack://ol/./build/ol/interaction/Translate.js","webpack://ol/./build/ol/geom/GeometryCollection.js","webpack://ol/./build/ol/format/JSONFeature.js","webpack://ol/./build/ol/format/EsriJSON.js","webpack://ol/./build/ol/format/XMLFeature.js","webpack://ol/./build/ol/format/GMLBase.js","webpack://ol/./build/ol/format/xsd.js","webpack://ol/./build/ol/format/GML3.js","webpack://ol/./build/ol/format/GML.js","webpack://ol/./build/ol/format/GML2.js","webpack://ol/./build/ol/format/GML32.js","webpack://ol/./build/ol/format/GPX.js","webpack://ol/./build/ol/format/GeoJSON.js","webpack://ol/./build/ol/format/TextFeature.js","webpack://ol/./build/ol/format/KML.js","webpack://ol/./b
 uild/ol/format/IGC.js","webpack://ol/./build/ol/format/OSMXML.js","webpack://ol/./build/ol/geom/flat/flip.js","webpack://ol/./build/ol/format/Polyline.js","webpack://ol/./build/ol/format/TopoJSON.js","webpack://ol/./build/ol/format/filter/Filter.js","webpack://ol/./build/ol/format/filter/LogicalNary.js","webpack://ol/./build/ol/format/filter/And.js","webpack://ol/./build/ol/format/filter/Bbox.js","webpack://ol/./build/ol/format/filter/Spatial.js","webpack://ol/./build/ol/format/filter/Contains.js","webpack://ol/./build/ol/format/filter/Comparison.js","webpack://ol/./build/ol/format/filter/During.js","webpack://ol/./build/ol/format/filter/ComparisonBinary.js","webpack://ol/./build/ol/format/filter/EqualTo.js","webpack://ol/./build/ol/format/filter/GreaterThan.js","webpack://ol/./build/ol/format/filter/GreaterThanOrEqualTo.js","webpack://ol/./build/ol/format/filter/Intersects.js","webpack://ol/./build/ol/format/filter/IsBetween.js","webpack://ol/./build/ol/format/filter/IsLike.js","we
 bpack://ol/./build/ol/format/filter/IsNull.js","webpack://ol/./build/ol/format/filter/LessThan.js","webpack://ol/./build/ol/format/filter/LessThanOrEqualTo.js","webpack://ol/./build/ol/format/filter/Not.js","webpack://ol/./build/ol/format/filter/NotEqualTo.js","webpack://ol/./build/ol/format/filter/Or.js","webpack://ol/./build/ol/format/filter/Within.js","webpack://ol/./build/ol/format/filter.js","webpack://ol/./build/ol/format/WFS.js","webpack://ol/./build/ol/format/WKT.js","webpack://ol/./build/ol/format/XML.js","webpack://ol/./build/ol/format/XLink.js","webpack://ol/./build/ol/format/WMSCapabilities.js","webpack://ol/./build/ol/format/WMSGetFeatureInfo.js","webpack://ol/./build/ol/format/OWS.js","webpack://ol/./build/ol/format/WMTSCapabilities.js","webpack://ol/./build/ol/control/FullScreen.js","webpack://ol/./build/ol/control/MousePosition.js","webpack://ol/./build/ol/control/OverviewMap.js","webpack://ol/./build/ol/control/ScaleLine.js","webpack://ol/./build/ol/control/ZoomSlid
 er.js","webpack://ol/./build/ol/control/ZoomToExtent.js","webpack://ol/./build/index.js","webpack://ol/./build/ol/proj/proj4.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","v8","$version","$root","version","required","type","values","doc","example","metadata","center","zoom","bearing","period","units","pitch","light","anchor","color","intensity","sources","url","sprite","glyphs","transition","duration","delay","layers","id","source","paint","source_vector","vector","tiles","bounds","length","scheme","xyz","tms","minzoom","maxzoom","attribution","promoteId","source_raster","raster","tileSize","source_raster_dem","encoding","terrarium","mapbox","source_geojson","
 geojson","data","buffer","maximum","minimum","tolerance","cluster","clusterRadius","clusterMaxZoom","clusterProperties","lineMetrics","generateId","source_video","video","urls","coordinates","source_image","image","layer","fill","js","android","ios","macos","line","symbol","circle","heatmap","hillshade","background","filter","layout","layout_background","visibility","visible","none","layout_fill","expression","interpolated","parameters","layout_circle","layout_heatmap","layout_line","butt","round","square","bevel","miter","requires","layout_symbol","point","auto","map","viewport","width","height","both","tokens","left","right","top","bottom","horizontal","vertical","uppercase","lowercase","layout_raster","layout_hillshade","filter_operator","all","any","has","within","geometry_type","Point","LineString","Polygon","stops","base","identity","exponential","interval","categorical","colorSpace","rgb","lab","hcl","function_stop","expression_name","group","literal","array","at","slice","ma
 tch","coalesce","step","interpolate","ln2","pi","e","string","number","boolean","collator","format","rgba","properties","accumulated","sqrt","log10","ln","log2","sin","cos","tan","asin","acos","atan","min","max","abs","ceil","floor","distance","upcase","downcase","concat","position","paint_fill","paint_line","paint_circle","paint_heatmap","paint_symbol","overridable","paint_raster","linear","nearest","paint_hillshade","paint_background","constant","commonjsGlobal","globalThis","global","self","createCommonjsModule","fn","punycode","freeExports","nodeType","freeModule","freeGlobal","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","Math","stringFromCharCode","String","fromCharCode","error","RangeError","result","mapDomain","parts","split","replace","join","ucs2decode","extra","output","counter","charCodeAt","push","ucs2encode","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","k","baseMinusTMin","decode","input","out","basic","j","index","oldi","
 w","baseMinusT","codePoint","inputLength","bias","lastIndexOf","splice","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","test","toLowerCase","util","arg","obj","prop","qs","sep","eq","options","regexp","maxKeys","len","kstr","vstr","v","x","idx","indexOf","substr","decodeURIComponent","Array","isArray","stringifyPrimitive","isFinite","undefined","keys","ks","encodeURIComponent","querystring","parse","stringify","Url","this","protocol","slashes","auth","host","port","hostname","hash","search","query","pathname","path","href","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","urlParse","parseQueryString","slashesDenoteHost","u","TypeError","queryIndex","splitter","uSplit","rest","trim","simplePath","exec","proto","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","
 part","newpart","validParts","notHost","bit","unshift","toASCII","h","ae","esc","escape","qm","charAt","resolve","relative","resolveObject","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","authInHost","last","hasTrailingSlash","up","isAbsolute","extend","inputs","arguments","list","ParsingError","Error","message","__proto__","constructor","Scope","parent","bindings","ref","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","itemType","N","toString","valueMemberTypes","checkSubtype","expected","isValidType","provided","allowedTypes","some","isValidNativeType","csscolorparser_1","kCSSColorTable","clamp_css_byte","clamp_css_float","f","parse_css_int","str","parseFloat","parseInt","parse_css_float","css_hue_to_rgb","m1","m2","parseCSSColor","css_str","iv","op","ep","fname","params","alpha","Color",
 "g","b","a","toArray","black","white","transparent","red","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","Intl","usage","compare","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","text","scale","fontStack","textColor","Formatted","sections","fromString","unformatted","isEmpty","section","serialize","serialized","ResolvedImage","available","validateRGBA","isValue","mixed","typeOf","toString$1","JSON","Literal","args","context","expectedType","evaluate","eachChild","outputDefined","RuntimeError","toJSON","types","Assertion","type$1","parsed","ctx","forEach","every","FormatExpression","firstArg","nextTokenMayBeObject","font","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","types$1","Coercion","Boolean","parseColor","i$1","list$1","num","Number","isNaN","child","geometryTypes","EvaluationContext","globals","feature","featureState","formattedSection","_parseColorCache","canonical","geometryTyp
 e","geometry","canonicalID","cached","CompoundExpression","_evaluate","ref$1","definition","definitions","availableOverloads","overloads","signature","signatureContext","i$3","ParsingContext","registry","scope","parsedArgs","argParseFailed","arg$1","apply","signatures","actualTypes","i$2","parsed$1","register","CollatorExpression","updateBBox","bbox","coord","boxWithinBox","bbox1","bbox2","getTileCoordinates","lat","y","PI","log","tilesAtZoom","pow","z","rayIntersect","p1","p2","pointWithinPolygon","rings","x1","y1","x2","y2","inside","ring","len2","pointWithinPolygons","polygons","twoSided","q1","q2","x3","y3","det1","det2","lineIntersectPolygon","polygon","v1","v2","vectorP","vectorQ","lineStringWithinPolygon","lineStringWithinPolygons","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","getTilePoints","pointBBox","shifts","tilePoints","getTileLines","lineBBox","tileLines","tileLine","Infinity","list$3","list$2","Within","geometries","isFeature
 Constant","isStateConstant","isGlobalPropertyConstant","features","polygonGeometry","tilePolygon","tilePolygons","tilePoints$1","pointsWithinPolygons","tileLines$1","linesWithinPolygons","Var","boundExpression","findStopLessThanOrEqualTo","nextValue","lastIndex","lowerIndex","upperIndex","currentIndex","expr","_parse","annotate","typeAnnotation","Expr","actual","isConstant","isTypeAnnotation","childrenConstant","ec","error$1","Step","labels","outputs","label","outputType","labelKey","valueKey","stopCount","unitbezier","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","d2","solve","freeze","from","to","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","forward","reverse","atan2","hclColor","colorSpaces","Interpolate","operator","interpolation","exponentialInterpolation","lowerValue","upperValue","differenc
 e","progress","interpolationFactor","lower","upper","controlPoints","outputLower","outputUpper","Coalesce","needsAnnotation","requestedImageName","argCount","Let","At","In","needle","haystack","IndexOf","fromIndex","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","this$1","groupedByOutput","outputLookup","sort","outputIndex","coerceLabel","outputIndex$1","Case","branches","Slice","beginIndex","endIndex","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","lt","rt","lt$1","rt$1","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","minFractionDigits","maxFractionDigits","style","minimumFractionDigits","maximumFractionDigits","Length","expressions","varargs","success","supportsPropertyExpression","spec","supportsZoomExpression","supportsInterpolation","getType","val","isFunction$1","identityFunction","createFunction",
 "propertySpec","innerFun","hashedStops","categoricalKeyType","isColor","zoomAndFeatureDependent","featureDependent","zoomDependent","stop","default","evaluateExponentialFunction","evaluateIntervalFunction","evaluateCategoricalFunction","evaluateIdentityFunction","featureFunctions","zoomStops","stop$1","featureFunctionStops","interpolationType","interpolationType$1","_","keyType","interp","colorspace","evaluatedLower","evaluatedUpper","heatmapDensity","lineProgress","LN2","E","LN10","binarySearch","isSupportedScript","toUpperCase","StyleExpression","_warningHistory","_evaluator","_defaultValue","_enumValues","isExpression","createExpression","parser","enum","formatted","resolvedImage","getExpectedType","evaluateWithoutErrorHandling","console","warn","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","createPropertyExpression","isFeatureConstant$1","isZoomConstant","zoomCurve","findZoomCurve","childResult","StylePropertyFunction","specification","
 _parameters","_specification","convertLiteral","convertFunction","convertIdentityFunction","convertTokenString","featureFunctionParameters","getFunctionType","getInterpolateOperator","convertPropertyFunction","appendStopPair","expression$1","z$1","output$1","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","convertZoomFunction","coalesce$1","expression$2","stop$2","expression$3","stop$3","curve","re","pos","isExpressionFilter","deserialize","filterSpec","createFilter","needGeometry","convertFilter","compiled","err","globalProperties","geometryNeeded","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","refProperties","deref","derefLayers","ValidationError","identifier","__line__","ParsingError$1","validateConstants","constants","unbundle","valueOf","deepUnbundle","unbundledValue","validateObject","elementSpecs","valueSpec","elementValidators","objectElementValidators","styleSpec","objectKey","elementSpecKey","elementSpec","validateElemen
 t","validate","elementSpecKey$1","validateArray","arraySpec","validateArrayElement","arrayElementValidator","arrayElementSpec","function","arrayIndex","validateNumber","validateFunction","stopKeyType","previousStopDomainValue","previousStopDomainZoom","functionValueSpec","functionType","stopDomainValues","isZoomFunction","isPropertyFunction","isZoomAndPropertyFunction","validateFunctionStop","validateStopDomainValue","reportValue","validateExpression","expressionContext","expressionObj","propertyKey","propertyType","validateEnum","validateFilter","validateNonExpressionFilter","validateProperty","layerSpec","layerType","transitionMatch","tokenMatch","validatePaintProperty","validateLayoutProperty","validateLayer","layerId","otherLayer","sourceType","validateString","validateSource","mapExpr","reduceExpr","validateLight","lightSpec","rootType","VALIDATORS","validateGlyphsURL","validateStyleMin","sortErrors","wrapCleanErrors","inner","paintProperty","layoutProperty","jsonlint","$V0","$
 V1","$V2","$V3","$V4","$V5","$V6","$V7","$V8","$V9","trace","yy","symbols_","terminals_","2","4","6","8","10","11","14","17","18","21","22","23","24","productions_","performAction","yytext","yyleng","yylineno","yystate","$$","_$","$0","$","first_line","table","3","5","7","9","12","13","15","16","1","19","20","25","defaultActions","parseError","recoverable","stack","vstack","lstack","TERROR","EOF","lexer","sharedState","setInput","yylloc","yyloc","ranges","lex","token","getPrototypeOf","state","action","newState","yyval","errStr","showPosition","loc","last_line","first_column","last_column","range","_input","_more","_backtrack","done","matched","conditionStack","offset","ch","unput","lines","oldLines","more","reject","backtrack_lexer","less","pastInput","past","upcomingInput","next","pre","test_match","indexed_rule","backup","matches","tempMatch","rules","_currentRules","flex","begin","condition","popState","conditions","topState","pushState","stateStackSize","yy_","$avoiding_name_co
 llisions","YY_START","Parser","readStyle","Buffer","validateStyle","normalizePropertyExpression","styleFunction","isFunction","latest","quickselect","arr","quickselectStep","exp","sd","newLeft","newRight","swap","defaultCompare","tmp","RBush","maxEntries","_maxEntries","_minEntries","clear","findItem","item","items","equalsFn","calcBBox","node","toBBox","distBBox","children","destNode","createNode","minX","minY","maxX","maxY","leaf","compareNodeMinX","compareNodeMinY","bboxArea","bboxMargin","contains","intersects","multiSelect","mid","_all","nodesToSearch","childBBox","collides","load","insert","_build","_splitRoot","tmpNode","_insert","remove","goingUp","indexes","_condense","compareMinX","compareMinY","fromJSON","M","N2","N1","right2","right3","_chooseSubtree","level","minArea","minEnlargement","targetNode","area","enlargement","isNode","insertPath","_split","_adjustParentBBoxes","_chooseSplitAxis","splitIndex","_chooseSplitIndex","newNode","minOverlap","overlap","_allDistMargin"
 ,"leftBBox","rightBBox","margin","child$1","siblings","Pbf","ieee754","buf","ArrayBuffer","isView","Uint8Array","Varint","Fixed64","Bytes","Fixed32","utf8TextDecoder","TextDecoder","readPackedEnd","pbf","readVarint","toNum","low","high","isSigned","makeRoomForExtraLength","startPos","extraLen","realloc","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","readInt32","destroy","readFields","readField","end","tag","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readFloat","read","readDouble","readVarintRemainder","readVarint64","readSVarint","readBoolean","readString","subarray","readUtf8TextDecoder","b1","b2","b3","b0","bytesPerSequence","readUtf8","readBytes","re
 adPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","set","finish","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","writeUtf8","write","writeBytes","writeRawMessage","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","fontWeights","thin","hairline","book","regular","normal","plain","roman","standard","medium","bold","heavy","fat","poster","italicRE","fontCache","fonts","size","lineHeight","cssData","weight","fontFamilies","ii","maybeWeight","fontFamily","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","Function","families","icon","title","link","getNames","getLink","normalizeName","base64","kMaxLength","TYPED_ARRAY_SUPPORT","crea
 teBuffer","that","encodingOrOffset","allocUnsafe","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","isEncoding","isBuffer","checked","copy","fromObject","assertSize","loweredCase","utf8ToBytes","base64ToBytes","slowToString","start","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","dir","arrayIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","hi","lo","utf16leToBytes","fromByteArray","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoints","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","poolSize","_augment","species","configurable","allocUnsafeSlow","_isBuffer","swap16","swap32","swap64","equals","inspect","target","thisStart","thisEnd","thisCopy","targetCopy","includes","_arr","ret",
 "toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","noAssert","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","code","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","src","dst","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","encodeChunk","lookup","uidCounter_","getUid","ol_uid","extendStatics","__extends","setPrototypeOf","__","_
 super","AssertionError","_this","stopPropagation","evt","BaseEvent","propagationStopped","preventDefault","Disposable","disposed","dispose","disposeInternal","numberSafeCompareFunction","linearFindNearest","direction","reverseSubArray","extension","find","func","arr1","arr2","len1","findIndex","el","TRUE","FALSE","VOID","assign","var_sources","getValues","Target","opt_target","eventTarget_","pendingRemovals_","dispatching_","listeners_","addEventListener","listener","listeners","listenersForType","dispatchEvent","event","Event","propagate","dispatching","pendingRemovals","handleEvent","pr","removeEventListener","getListeners","hasListener","opt_type","listen","opt_this","opt_once","originalListener_1","eventsKey","listenOnce","unlistenByKey","unByKey","Observable","revision_","changed","EventType","getRevision","on","once","ol_key","un","ObjectEvent","oldValue","BaseObject","opt_values","values_","setProperties","getKeys","getProperties","hasProperties","notify","eventType","getChan
 geEventType","ObjectEventType","opt_silent","unset","changeEventTypeCache","Property","CollectionEvent","opt_element","opt_index","element","Collection","opt_array","opt_options","unique_","unique","array_","assertUnique_","updateLength_","getLength","getArray","insertAt","elem","CollectionEventType","removeAt","prev","setAt","opt_except","assert","assertion","errorCode","Feature","opt_geometryOrProperties","id_","geometryName_","style_","styleFunction_","geometryChangeKey_","handleGeometryChanged_","setGeometry","clone","setGeometryName","getGeometryName","getGeometry","getStyle","setStyle","getId","getStyleFunction","handleGeometryChange_","opt_style","styles_1","createStyleFunction","setId","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","Units","DEGREES","FEET","METERS","PIXELS","TILE_PIXELS","USFEET","METERS_PER_UNIT","tmp_","transform","multiply","transform1","transform2","a1","c1","d1","e1","f1","a
 2","c2","e2","f2","coordinate","compose","dx1","dy1","sx","sy","angle","dx2","dy2","makeInverse","mat","det","boundingExtent","extent","createEmpty","extendCoordinate","opt_extent","closestSquaredDistanceXY","dx","dy","containsCoordinate","containsXY","containsExtent","extent1","extent2","coordinateRelationship","relationship","Relationship","createOrUpdate","createOrUpdateEmpty","createOrUpdateFromCoordinate","createOrUpdateFromFlatCoordinates","flatCoordinates","stride","extendFlatCoordinates","extendCoordinates","extendXY","forEachCorner","callback","getBottomLeft","getBottomRight","getTopRight","getTopLeft","getArea","getWidth","getHeight","getCenter","getCorner","corner","Corner","getForViewAndSize","resolution","rotation","cosRotation","sinRotation","xCos","xSin","yCos","ySin","x0","y0","getIntersection","intersection","scaleFromCenter","deltaX","deltaY","applyTransform","transformFn","opt_stops","xs","ys","_boundingExtentXYs","projection","projectionExtent","getExtent","canWr
 apX","worldWidth","Projection","code_","units_","extent_","worldExtent_","worldExtent","axisOrientation_","axisOrientation","global_","canWrapX_","getPointResolutionFunc_","getPointResolution","defaultTileGrid_","metersPerUnit_","metersPerUnit","getCode","getUnits","getMetersPerUnit","getWorldExtent","getAxisOrientation","isGlobal","setGlobal","getDefaultTileGrid","setDefaultTileGrid","tileGrid","setExtent","setWorldExtent","setGetPointResolution","getPointResolutionFunc","clamp","cosh","LOG2E","squaredSegmentDistance","toDegrees","angleInRadians","toRadians","angleInDegrees","modulo","lerp","HALF_SIZE","EXTENT","WORLD_EXTENT","EPSG3857Projection","PROJECTIONS","fromEPSG4326","opt_output","opt_dimension","dimension","halfSize","EPSG4326Projection","opt_axisOrientation","destination","sourceCode","destinationCode","getDistance","opt_radius","radius","lat1","lat2","deltaLatBy2","deltaLonBy2","getLengthInternal","getAreaInternal","lon1","dByR","padNumber","opt_precision","numberString"
 ,"toFixed","decimal","compareVersions","s1","s2","n1","n2","closestOnSegment","segment","along","degreesToStringHDMS","hemispheres","degrees","opt_fractionDigits","normalizedDegrees","dflPrecision","precision","deg","sec","template","coordinate1","coordinate2","cosAngle","sinAngle","coord1","coord2","squaredDistanceToSegment","toStringXY","worldsAway","getWorldsAway","opt_sourceExtentWidth","sourceExtentWidth","cloneTransform","identityTransform","addProjection","projectionLike","opt_units","pointResolution","toEPSG4326_1","getTransformFromProjections","vertices","addEquivalentProjections","projections","addProjections","createProjection","defaultCode","createTransformFromCoordinateTransform","coordTransform","addCoordinateTransforms","inverse","sourceProj","destProj","equivalent","projection1","projection2","equalUnits","sourceProjection","destinationProjection","transformFunc","getTransform","transformExtent","projections2","forwardTransform","inverseTransform","getUserProjection"
 ,"toUserCoordinate","fromUserCoordinate","destProjection","toUserExtent","fromUserExtent","createSafeCoordinateTransform","transformed","sourceX","sourceY","sourceExtent","transform2D","opt_dest","dest","anchorX","anchorY","tmpTransform","Geometry","lastResult","lastArgs","lastThis","called","extentRevision_","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometryRevision","simplifyTransformedInternal","revision","squaredTolerance","opt_transform","getSimplifiedGeometry","nextArgs","simplifyTransformed","closestPointXY","closestPoint","minSquaredDistance","getClosestPoint","opt_closestPoint","intersectsCoordinate","computeExtent","returnOrUpdate","rotate","opt_sy","opt_anchor","simplify","intersectsExtent","translate","inCoordinates","outCoordinates","pixelExtent","projectedExtent","getStrideForLayout","GeometryLayout","SimpleGeometry","getCoordinates","getFirstCoordinate","getFlatCoordinates","getLastCoordinate","getLayout","simplifiedGeometry","getSimplifiedGeometryInternal
 ","getStride","setFlatCoordinates","setCoordinates","opt_layout","setLayout","nesting","getLayoutForStride","assignClosest","offset1","offset2","maxSquaredDelta","squaredDelta","arrayMaxSquaredDelta","ends","assignClosestPoint","maxDelta","isRing","opt_tmpPoint","squaredDistance","tmpPoint","assignClosestArrayPoint","deflateCoordinate","deflateCoordinates","deflateCoordinatesArray","coordinatess","opt_ends","jj","douglasPeucker","simplifiedFlatCoordinates","simplifiedOffset","markers","first","maxSquaredDistance","squaredDistance_1","douglasPeuckerArray","simplifiedEnds","snap","quantize","quantizeArray","inflateCoordinates","opt_coordinates","inflateCoordinatesArray","opt_coordinatess","inflateMultiCoordinatesArray","endss","opt_coordinatesss","coordinatesss","twiceArea","LinearRing","maxDelta_","maxDeltaRevision_","GeometryType","linearRingContainsExtent","linearRingContainsXY","wn","linearRingsContainsXY","getInteriorPointOfArray","flatCenters","flatCentersOffset","intersections"
 ,"rr","pointX","maxSegmentLength","segmentLength","getInteriorPointsOfMultiArray","interiorPoints","point1","point2","intersectsLineString","coordinatesExtent","startRel","endRel","startX","startY","endX","endY","slope","intersectsSegment","intersectsLinearRingArray","intersectsLinearRing","linearRingIsClockwise","firstVertexRepeated","iMinVertex","minXAtMinY","findCornerVertex","iPreviousVertex","iNextVertex","aX","aY","bX","bY","cX","cY","linearRingsAreOriented","opt_right","isClockwise","orientLinearRings","orientLinearRingsArray","ends_","flatInteriorPointRevision_","flatInteriorPoint_","orientedRevision_","orientedFlatCoordinates_","appendLinearRing","linearRing","getOrientedFlatCoordinates","getEnds","getFlatInteriorPoint","flatCenter","getInteriorPoint","getLinearRingCount","getLinearRing","getLinearRings","linearRings","circular","opt_n","opt_sphereRadius","fromExtent","fromCircle","opt_sides","opt_angle","sides","arrayLength","makeRegular","getRadius","startAngle","Geolocat
 ionError","Geolocation","position_","transform_","watchId_","handleProjectionChanged_","handleTrackingChanged_","setProjection","trackingOptions","setTrackingOptions","setTracking","tracking","getProjection","navigator","getTracking","geolocation","watchPosition","positionChange_","positionError_","getTrackingOptions","clearWatch","coords","accuracy","altitude","altitudeAccuracy","heading","longitude","latitude","projectedPosition","speed","getAccuracy","getAccuracyGeometry","getAltitude","getAltitudeAccuracy","getHeading","getPosition","getSpeed","Kinetic","decay","minVelocity","decay_","minVelocity_","delay_","points_","angle_","initialVelocity_","update","Date","now","firstIndex","getAngle","HEX_COLOR_RE_","NAMED_COLOR_RE_","asString","fromNamed","document","createElement","body","appendChild","getComputedStyle","removeChild","cache","cacheSize","hasAlpha","normalize","fromStringInternal_","asArray","IconImageCache","cache_","cacheSize_","maxCacheSize_","canExpireCache","expire",
 "iconImage","crossOrigin","getKey","setSize","maxCacheSize","shared","Base","BaseLayer","opacity","zIndex","maxResolution","minResolution","minZoom","maxZoom","className_","className","state_","getClassName","getLayerState","opt_managed","managed","getZIndex","getOpacity","sourceState","getSourceState","getVisible","getMaxResolution","getMinResolution","getMinZoom","getMaxZoom","getLayersArray","getLayerStatesArray","opt_states","setMaxResolution","setMinResolution","setMaxZoom","setMinZoom","setOpacity","setVisible","setZIndex","zindex","inView","layerState","viewState","Layer","baseOptions","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","renderer_","render","setMap","handleSourcePropertyChange_","setSource","states","getSource","getState","handleSourceChange_","getFeatures","pixel","frameState","layerRenderer","getRenderer","prepareFrame","renderFrame","layerStatesArray","arrayLayerState","createRenderer","hasRenderer","VectorContext","drawCustom","renderer","drawGeometry"
 ,"drawCircle","circleGeometry","drawFeature","drawGeometryCollection","geometryCollectionGeometry","drawLineString","lineStringGeometry","drawMultiLineString","multiLineStringGeometry","drawMultiPoint","multiPointGeometry","drawMultiPolygon","multiPolygonGeometry","drawPoint","pointGeometry","drawPolygon","drawText","setFillStrokeStyle","fillStyle","strokeStyle","setImageStyle","imageStyle","opt_declutterGroup","setTextStyle","textStyle","opt_declutterGroups","asColorLike","ua","userAgent","FIREFOX","WEBKIT","MAC","DEVICE_PIXEL_RATIO","devicePixelRatio","WORKER_OFFSCREEN_CANVAS","WorkerGlobalScope","OffscreenCanvas","IMAGE_DECODE","Image","PASSIVE_EVENT_LISTENERS","passive","createCanvasContext2D","opt_width","opt_height","opt_canvasPool","canvas","getContext","offsetWidth","marginLeft","marginRight","offsetHeight","marginTop","marginBottom","replaceNode","oldNode","parentNode","replaceChild","removeNode","removeChildren","lastChild","fontRegEx","RegExp","fontRegExMatchIndex","getFo
 ntParameters","fontSpec","variant","family","defaultLineDash","defaultPadding","checkedFonts","labelCache","measureFont","div","heights","measureContext","textHeights","registerFont","referenceWidth","referenceFonts","isAvailable","fontStyle","fontWeight","referenceFont","measureTextWidth","check","clearInterval","setInterval","measureTextHeight","metrics","measureText","actualBoundingBoxAscent","actualBoundingBoxDescent","innerHTML","padding","rotateAtOffset","offsetX","offsetY","drawImageOrLabel","labelOrImage","originX","originY","save","globalAlpha","setTransform","contextInstructions","executeLabelInstructions","drawImage","restore","createTransformStringCanvas","createTransformString","CanvasImmediateRenderer","pixelRatio","viewRotation","opt_squaredTolerance","opt_userTransform","context_","pixelRatio_","viewRotation_","squaredTolerance_","userTransform_","contextFillState_","contextStrokeState_","contextTextState_","fillState_","strokeState_","image_","imageAnchorX_","imageA
 nchorY_","imageHeight_","imageOpacity_","imageOriginX_","imageOriginY_","imageRotateWithView_","imageRotation_","imageScale_","imageWidth_","text_","textOffsetX_","textOffsetY_","textRotateWithView_","textRotation_","textScale_","textFillState_","textStrokeState_","textState_","pixelCoordinates_","tmpLocalTransform_","drawImages_","pixelCoordinates","localTransform","centerX","centerY","drawText_","setContextFillState_","setContextStrokeState_","setContextTextState_","strokeText","fillText","moveToLineTo_","close","moveTo","lineTo","closePath","drawRings_","simpleGeometry","transformGeom2D","beginPath","arc","stroke","getFill","getStroke","getImage","getText","getGeometryFunction","getGeometriesArray","flatMidpoint","getFlatMidpoint","geometryExtent","flatMidpoints","getFlatMidpoints","flatInteriorPoint","getEndss","flatInteriorPoints","getFlatInteriorPoints","fillState","contextFillState","strokeState","contextStrokeState","lineCap","setLineDash","lineDash","lineDashOffset","lineJo
 in","lineWidth","miterLimit","textState","contextTextState","textAlign","textBaseline","fillStyleColor","getColor","strokeStyleColor","strokeStyleLineCap","getLineCap","strokeStyleLineDash","getLineDash","strokeStyleLineDashOffset","getLineDashOffset","strokeStyleLineJoin","getLineJoin","strokeStyleWidth","strokeStyleMiterLimit","getMiterLimit","imageSize","getSize","imageAnchor","getAnchor","imageImage","imageOrigin","getOrigin","imageScale","getScaleArray","getRotateWithView","getRotation","textFillStyle","textFillStyleColor","textStrokeStyle","textStrokeStyleColor","textStrokeStyleLineCap","textStrokeStyleLineDash","textStrokeStyleLineDashOffset","textStrokeStyleLineJoin","textStrokeStyleWidth","textStrokeStyleMiterLimit","textFont","getFont","textOffsetX","getOffsetX","textOffsetY","getOffsetY","textRotateWithView","textRotation","textScale","textText","textTextAlign","getTextAlign","textTextBaseline","getTextBaseline","GEOMETRY_RENDERERS","builderGroup","getImageState","ImageSt
 ate","imageReplay","getBuilder","BuilderType","addDeclutter","textReplay","lineStringReplay","polygonReplay","replayGroup","geometryRenderer","circleReplay","defaultOrder","feature1","feature2","getSquaredTolerance","getTolerance","renderFeature","loading","imageState","unlistenImageChange","listenImageChange","renderGeometry","getGeometries","renderFeatureInternal","getVectorContext","userTransform","inversePixelTransform","coordinateToPixelTransform","userProjection","renderDeclutterItems","declutterTree","declutterItems","zIndexItems","renderDeclutter","expireIconCache","MapRenderer","map_","declutterTree_","dispatchRenderEvent","calculateMatrices2D","pixelToCoordinateTransform","forEachFeatureAtCoordinate","hitTolerance","checkWrapped","thisArg","layerFilter","thisArg2","translatedCoordinate","offsets","declutteredFeatures","layerStates","numLayers","entry","tmpCoord","getWrapX","callback_1","forEachLayerAtPixel","hasFeatureAtCoordinate","getMap","scheduleExpireIconCache","postR
 enderFunctions","RenderEvent","opt_inversePixelTransform","opt_frameState","opt_context","Composite","CompositeMapRenderer","fontChangeListenerKey_","redrawText","element_","CLASS_UNSELECTABLE","container","getViewport","insertBefore","firstChild","children_","renderedVisible_","event_1","previousElement","layerIndex","oldChildren","childNodes","oldChild","newChild","replaceChildren","display","getDataAtPixel","LayerGroup","layersListenerKeys_","listenerKeys_","handleLayersChanged_","setLayers","handleLayerChange_","getLayers","handleLayersAdd_","handleLayersRemove_","layersArray","collectionEvent","ownLayerState","MapEvent","MapBrowserEvent","originalEvent","opt_dragging","pixel_","coordinate_","dragging","getEventPixel","getCoordinateFromPixel","SINGLECLICK","CLICK","DBLCLICK","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","MapBrowserEventHandler","moveTolerance","clickTimeoutId_","dragging_","dragList
 enerKeys_","moveTolerance_","down_","activePointers_","trackedTouches_","pointerdownListenerKey_","handlePointerDown_","originalPointerMoveEvent_","relayedListenerKey_","relayEvent_","boundHandleTouchMove_","handleTouchMove_","emulateClick_","pointerEvent","newEvent","MapBrowserEventType","clearTimeout","setTimeout","updateActivePointers_","pointerId","handlePointerUp_","isMouseActionButton_","button","handlePointerMove_","getRootNode","isMoving_","defaultPrevented","clientX","clientY","PriorityQueue","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","dequeue","elements","priorities","siftUp_","elementKey","enqueue","priority","siftDown_","getCount","getLeftChildIndex_","getRightChildIndex_","getParentIndex_","heapify_","isKeyQueued","isQueued","count","startIndex","lIndex","rIndex","smallerChildIndex","parentIndex","reprioritize","TileQueue","tilePriorityFunction","tileChangeCallback","boundHandleTileChange_","handleTile
 Change","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","added","getTilesLoading","tile","hifi","TileState","tileKey","loadMoreTiles","maxTotalLoading","maxNewLoads","newLoads","createExtent","onlyCenter","smooth","opt_isMoving","viewWidth","viewHeight","ratio","getViewportClampedResolution","maxExtent","viewportSize","showFullExtent","xResolution","yResolution","getSmoothClampedResolution","createMinMaxResolution","opt_smooth","opt_maxExtent","opt_showFullExtent","cappedMaxRes","disable","easeIn","easeOut","inAndOut","animationCallback","returnValue","isNoopAnimation","animation","sourceCenter","targetCenter","sourceResolution","targetResolution","sourceRotation","targetRotation","View","hints_","animations_","updateAnimationKey_","projection_","viewportSize_","targetCenter_","targetResolution_","targetRotation_","cancelAnchor_","applyOptions_","resolutionConstraintInfo","resolutionConstraint","zoomFactor","multiWorld","smoothResolutionConstraint","projExtent","constrainO
 nlyCenter","resolutions","constrainResolution","capped","createSnapToResolutions","defaultMaxResolution","defaultMinResolution","defaultMaxZoom","power","opt_minResolution","minZoomLevel","cappedZoomLevel","zoomLevel","createSnapToPower","constraint","createResolutionConstraint","maxResolution_","minResolution_","zoomFactor_","resolutions_","minZoom_","centerConstraint","smoothExtentConstraint","createCenterConstraint","rotationConstraint","enableRotation","constrainRotation","opt_tolerance","theta","createRotationConstraint","constraints_","setRotation","setCenterInternal","setResolution","setZoom","options_","getUpdatedOptions_","newOptions","getResolution","getZoom","getCenterInternal","animate","var_args","isDef","getAnimating","resolveConstraints","animateInternal","animationCount","series","complete","easing","getResolutionForZoom","setHint","ViewHint","updateAnimations_","getInteracting","cancelAnimations","cancelAnimationFrame","seriesComplete","elapsed","fraction","getViewp
 ortSize_","constrainedResolution","calculateCenterZoom","applyTargetState_","constrainedRotation","calculateCenterRotate","requestAnimationFrame","currentCenter","currentResolution","opt_rotation","setViewportSize","opt_size","ViewProperty","getConstraints","getConstrainResolution","getHints","opt_hints","calculateExtent","calculateExtentInternal","getZoomForResolution","setConstrainResolution","enabled","getResolutions","getResolutionForExtent","getResolutionForExtentInternal","getResolutionForValueFunction","opt_power","getConstrainedResolution","getValueForResolutionFunction","logPower","baseLevel","fit","geometryOrExtent","fitInternal","minRotX","minRotY","maxRotX","maxRotY","rotX","rotY","centerRotX","centerRotY","getConstrainedCenter","centerOn","centerOnInternal","adjustCenter","deltaCoordinates","setCenter","adjustCenterInternal","adjustResolution","adjustResolutionInternal","isMoving","newResolution","adjustZoom","adjustRotation","adjustRotationInternal","newRotation","hint
 ","opt_doNotCancelAnims","opt_forceMoving","newCenter","opt_duration","opt_resolutionDirection","beginInteraction","endInteraction","endInteractionInternal","opt_targetResolution","getConstrainedZoom","targetZoom","opt_direction","targetRes","toSize","PluggableMap","optionsInternal","keyboardEventTarget","getElementById","controls","interactions","overlays","layerGroup","MapProperty","view","createOptionsInternal","boundHandleBrowserEvent_","handleBrowserEvent","maxTilesLoading_","maxTilesLoading","postRenderTimeoutHandle_","animationDelayKey_","animationDelay_","renderFrame_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","overflow","overlayContainer_","pointerEvents","overlayContainerStopEvent_","mapBrowserEventHandler_","keyboardEventTarget_","keyHandlerKeys_","overlays_","overlayIdIndex_","handleResize_","postRenderFunctions
 _","tileQueue_","getTilePriority","handleTileChange_","handleLayerGroupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","control","interaction","addOverlayInternal_","addControl","getControls","addInteraction","getInteractions","addLayer","getLayerGroup","addOverlay","overlay","getOverlays","setTarget","forEachFeatureAtPixel","getCoordinateFromPixelInternal","getFeaturesAtPixel","hasFeatureAtPixel","getEventCoordinate","getEventCoordinateInternal","viewportPosition","getBoundingClientRect","eventPosition","changedTouches","getTarget","getTargetElement","getView","getOverlayById","getLoading","getPixelFromCoordinate","viewCoordinate","getPixelFromCoordinateInternal","getOverlayContainer","getOverlayContainerStopEvent","tileSourceKey","tileCenter","tileResolution","wantedTiles","browserEvent","mapBrowserEvent","handleMapBrowserEvent","rootNode","elementFromPoint","interactionsArray","getActive","handlePostRender","tileQueue","hints","viewHints","lowOnFrameBud
 get","time","targetElement","updateSize","handleViewPropertyChanged_","updateViewportSize_","isRendered","renderSync","handleFontsChanged","removeControl","removeInteraction","removeLayer","removeOverlay","previousFrameState","hasArea","usedTiles","MapEventType","setLayerGroup","setView","computedStyle","Control","target_","listenerKeys","mapEvent","Attribution","ulElement_","collapsed_","collapsed","overrideCollapsible_","collapsible","collapsible_","tipLabel","collapseLabel","collapseLabel_","textContent","label_","activeLabel","setAttribute","handleClick_","cssClasses","renderedAttributions_","collectSourceAttributions_","visibleAttributions","attributionGetter","getAttributions","attributions","getAttributionsCollapsible","setCollapsible","updateElement_","handleToggle_","classList","toggle","getCollapsible","setCollapsed","getCollapsed","Rotate","add","callResetNorth_","resetNorth","duration_","autoHide_","autoHide","rotation_","resetNorth_","Zoom","zoomInLabel","zoomOutLabel",
 "zoomInTipLabel","zoomOutTipLabel","inElement","createTextNode","outElement","zoomByDelta_","currentZoom","newZoom","defaults","zoomOptions","rotateOptions","attributionOptions","zoomByDelta","Interaction","setActive","active","DoubleClickZoom","delta_","stopEvent","shiftKey","Pointer","PointerInteraction","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","trackedPointers_","targetPointers","getPointerCount","updateTrackedPointers_","handledUp","handled","isPointerDraggingEvent","pass","altKeyOnly","altKey","metaKey","ctrlKey","altShiftKeysOnly","activeElement","focusWithTabindex","hasAttribute","always","mouseActionButton","never","singleClick","noModifierKeys","shiftKeyOnly","targetNotEditable","tagName","mouseOnly","pointerType","primaryAction","isPrimary","DragPan","kinetic_","kinetic","lastCentroid","lastPointersCount_","panning_","condition_","onFocusOnly","noKinetic_","centroid","centerpx","DragRotate","lastAngle_","Rend
 erBox","geometry_","startPixel_","endPixel_","render_","startPixel","endPixel","setPixels","createOrUpdateGeometry","DragBoxEventType","DragBoxEvent","DragBox","box_","minArea_","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","DragZoom","out_","mapExtent","boxPixelExtent","KeyboardPan","defaultCondition_","pixelDelta_","pixelDelta","keyCode","KeyCode","mapUnitsDelta","pan","KeyboardZoom","charCode","Mode","MouseWheelZoom","totalDelta_","lastDelta_","timeout_","timeout","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","deltaPerZoom_","endInteraction_","wheelEvent","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","timeLeft","handleWheelZoom_","setMouseAnchor","PinchRotate","pointerOptions","anchor_","rotating_","rotationDelta_","threshold_","threshold","rotationDelta","touch0","touch1","PinchZoom","lastDistance_","lastScaleDelta_","scaleDelta","altShiftDragRotate
 ","doubleClickZoom","zoomDelta","zoomDuration","dragPan","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","shiftDragZoom","Map","Overlay","insertFirst","autoPan","autoPanAnimation","autoPanMargin","rendered","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","positioning","OverlayPositioning","setPosition","getElement","getOffset","getPositioning","updatePixelPosition","performAutoPan","panIntoView","opt_panIntoViewOptions","mapRect","getRect","overlayRect","panIntoViewOptions","myMargin","offsetLeft","offsetRight","offsetTop","offsetBottom","centerPx","newCenterPx","panOptions","box","pageXOffset","pageYOffset","mapSize","updateRenderedPosition","posX","posY","msTransform","getOptions","withCredentials","loadFeaturesXhr","failure","xhr","XMLHttpRequest","open","FormatType","responseType","onload","status","responseText","responseXML","DOMParser",
 "parseFromString","readFeatures","featureProjection","readProjection","onerror","send","dataProjection","addFeatures","TileRange","tileCoord","containsTileRange","tileRange","opt_tileCoord","getKeyZXY","fromKey","tmpTileCoord","TileGrid","opt_strict","currentVal","origins","origin_","origin","origins_","tileSizes_","tileSizes","tileSize_","fullTileRanges_","tmpSize_","sizes","calculateTileRanges_","forEachTileCoord","getTileRangeForExtentAndZ","forEachTileCoordParentTileRange","opt_tileRange","tileCoordExtent","getTileCoordExtent","getTileCoordChildTileRange","getTileRangeExtent","getTileSize","getTileCoordForXYAndZ_","getTileCoordCenter","getTileCoordForCoordAndResolution","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","getZForResolution","adjustX","adjustY","xFromOrigin","yFromOrigin","tileCoordX","tileCoordY","getTileCoordForCoordAndZ","getTileCoordResolution","getFullTileRange","fullTileRanges","getForProjection","createForProjection","createXYZ","xyzOptions","gri
 dOptions","resolutionsFromExtent","opt_maxZoom","opt_tileSize","opt_maxResolution","opt_corner","createForExtent","extentFromProjection","half","supportedExtensions","CONTEXT_IDS","opt_attributes","XML_SCHEMA_INSTANCE_URI","createElementNS","namespaceURI","qualifiedName","getDocument","getAllTextContent","normalizeWhitespace","getAllTextContent_","accumulator","Node","CDATA_SECTION_NODE","TEXT_NODE","nodeValue","nextSibling","isDocument","xml","makeArrayExtender","valueReader","objectStack","makeArrayPusher","makeReplacer","makeObjectPropertyPusher","opt_property","localName","makeObjectPropertySetter","makeChildAppender","nodeWriter","makeArraySerializer","serializersNS","nodeFactory","serializers","makeSimpleNodeFactory","opt_nodeName","opt_namespaceURI","fixedNodeName","nodeName","OBJECT_PROPERTY_NODE_FACTORY","makeSequence","orderedKeys","sequence","makeStructureNS","namespaceURIs","structure","opt_structureNS","structureNS","parseNode","parsersNS","firstElementChild","nextEleme
 ntSibling","parsers","pushParseAndPop","opt_keys","pushSerializeAndPop","xmlSerializer_","document_","implementation","createDocument","BufferUsage","getArrayClassForType","Float32Array","Uint32Array","WebGLArrayBuffer","opt_usage","ofSize","fromArray","getUsage","WebGLPostProcessingPass","gl_","webGlContext","gl","scaleRatio_","scaleRatio","renderTargetTexture_","createTexture","renderTargetTextureSize_","frameBuffer_","createFramebuffer","vertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","fragmentShader","FRAGMENT_SHADER","renderTargetProgram_","createProgram","attachShader","linkProgram","renderTargetVerticesBuffer_","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","renderTargetAttribLocation_","getAttribLocation","renderTargetUniformLocation_","getUniformLocation","renderTargetTextureLocation_","uniforms_","uniforms","location","getGL","init","textureSize","drawingBufferWidth","drawingBufferHeight","bindFramebuffer","FRAMEBUFFER","getFrameBuffer",
 "internalFormat","RGBA","UNSIGNED_BYTE","bindTexture","TEXTURE_2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","framebufferTexture2D","COLOR_ATTACHMENT0","nextPass","activeTexture","TEXTURE0","clearColor","COLOR_BUFFER_BIT","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","useProgram","enableVertexAttribArray","vertexAttribPointer","FLOAT","uniform2f","uniform1i","applyUniforms","drawArrays","TRIANGLES","textureSlot","uniform","HTMLCanvasElement","ImageData","texture","uniform3f","uniform4f","uniform1f","fromTransform","mat4","DefaultUniform","AttributeType","UNSIGNED_SHORT","UNSIGNED_INT","computeAttributesStride","attributes","attr","getByteSizeFromType","BYTES_PER_ELEMENT","Uint16Array","WebGLHelper","boundHandleWebGLContextLost_","handleWebGLContextLost","boundHandleWebGLContextRestored_","handleWebGLContextRestored","canvas_","bufferCache_","currentProgram_","getSupportedExtensions","getExtension","Context
 EventType","offsetRotateMatrix_","offsetScaleMatrix_","tmpMat4_","uniformLocations_","attribLocations_","name_1","postProcessPasses_","postProcesses","shaderCompileErrors_","bufferKey","bufferCache","webGlBuffer","flushBufferData","deleteBuffer","bufferCacheEntry","isContextLost","prepareDraw","getCanvas","applyFrameState","prepareDrawToRenderTarget","renderTarget","opt_disableAlphaBlend","getFramebuffer","getTexture","ZERO","drawElements","elementType","numItems","offsetInBytes","finalizeDraw","offsetScaleMatrix","offsetRotateMatrix","setUniformMatrixValue","setUniformFloatValue","HTMLImageElement","prevValue","program","shader","getProgram","fragmentShaderSource","vertexShaderSource","getShaderInfoLog","getShaderCompileErrors","getAttributeLocation","makeProjectionTransform","uniformMatrix4fv","enableAttributeArray_","attribName","enableAttributes","opt_data","opt_texture","tmpArray4","WebGLRenderTarget","helper","helper_","texture_","framebuffer_","size_","data_","dataCacheDirty_
 ","updateSize_","clearCachedData","readAll","readPixels","readPixel","WMTSTileGrid","matrixIds_","matrixIds","getMatrixId","getMatrixIds","createFromCapabilitiesMatrixSet","matrixSet","opt_matrixLimits","matrixLimits","switchOriginXY","elt","elt_ml","tileWidth","tileHeight","ImageStyle","opacity_","rotateWithView_","rotateWithView","scale_","scaleArray_","displacement_","displacement","getScale","getDisplacement","getHitDetectionImage","getPixelRatio","getImageSize","getHitDetectionImageSize","setRotateWithView","setScale","RegularShape","hitDetectionCanvas_","fill_","points","radius_","radius1","radius2_","radius2","stroke_","imageSize_","hitDetectionImageSize_","getPoints","getRadius2","renderOptions","createRenderOptions","createHitDetectionCanvas_","draw_","strokeWidth","angle0","radiusC","drawHitDetectionCanvas_","CircleStyle","setRadius","Fill","color_","setColor","ImageBase","listenImage","loadHandler","errorHandler","img","promise","listening_1","then","catch","ImageWrapper"
 ,"imageLoadFunction","src_","unlisten_","imageLoadFunction_","handleImageError_","unlistenImage_","handleImageLoad_","setImage","taintedTestContext","IconImage","hitDetectionImage_","imageState_","tainted_","isTainted_","getImageData","dispatchChangeEvent_","replaceColor_","usedPixelRatio","fillRect","getSrc","globalCompositeOperation","imgData","putImageData","Icon","normalizedAnchor_","anchorOrigin_","anchorOrigin","IconOrigin","anchorXUnits_","anchorXUnits","IconAnchorUnits","anchorYUnits_","anchorYUnits","crossOrigin_","imgSize","iconImage_","offset_","offsetOrigin_","offsetOrigin","setAnchor","iconImageSize","Stroke","lineCap_","lineDash_","lineDashOffset_","lineJoin_","miterLimit_","width_","setLineCap","setLineDashOffset","setLineJoin","setMiterLimit","setWidth","Style","geometryFunction_","defaultGeometryFunction","zIndex_","setRenderer","setFill","setStroke","setText","defaultStyles","createDefaultStyle","createEditingStyle","styles","blue","Text","font_","textAlign_","text
 Baseline_","maxAngle_","maxAngle","placement_","placement","TextPlacement","overflow_","offsetX_","offsetY_","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","padding_","getPlacement","getMaxAngle","getOverflow","getBackgroundFill","getBackgroundStroke","getPadding","setOverflow","setFont","setMaxAngle","setOffsetX","setOffsetY","setPlacement","setTextAlign","setTextBaseline","setBackgroundFill","setBackgroundStroke","setPadding","Tile","interimTile","transition_","transitionStarts_","release","getInterimTile","refreshInterimChain","getTileCoord","setState","getAlpha","inTransition","endTransition","brokenDiagonalRendering_","ImageTile","tileLoadFunction","tileLoadFunction_","naturalWidth","naturalHeight","Triangulation","targetProj","targetExtent","maxSourceExtent","errorThreshold","opt_destinationResolution","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSourc
 e_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","destinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","maxSubdivision","addQuad_","leftBound_1","triangle","newTriangle","addTriangle_","aSrc","bSrc","cSrc","dSrc","sourceQuadExtent","sourceCoverageX","sourceWorldWidth","wrapsX","needsSubdivision","isNotFinite","centerSrc","bc","bcSrc","da","daSrc","ab","abSrc","cd","cdSrc","calculateSourceExtent","getTriangles","IMAGE_SMOOTHING_DISABLED","imageSmoothingEnabled","msImageSmoothingEnabled","drawTestTriangle","u1","u2","clip","verifyBrokenDiagonalRendering","calculateSourceResolution","targetMetersPerUnit","sourceMetersPerUnit","compensationFactor","triangulation","gutter","opt_renderEdges","opt_contextOptions","pixelRound","sourceDataExtent","canvasWidthInUnits","canvasHeightInUnits","stitchContext","stitchScale","xPos","yPos","srcWidth","srcHeight","targetTopLeft
 ","u0","v0","sourceNumericalShiftX","sourceNumericalShiftY","affineCoefs","maxRow","maxEl","absValue","coef","solveLinearSystem","isBrokenDiagonalRendering","ud","vd","steps","ReprojTile","sourceTileGrid","targetTileGrid","wrappedTileCoord","getTileFunction","opt_errorThreshold","renderEdges_","contextOptions_","gutter_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","maxTargetExtent","limitedTargetExtent","sourceProjExtent","calculateSourceExtentResolution","errorThresholdInPixels","triangulation_","sourceRange","srcX","srcY","reproject_","leftToLoad_1","sourceListenKey_1","unlistenSources_","LRUCache","opt_highWaterMark","highWaterMark","count_","entries_","oldest_","newest_","containsKey","value_","key_","newer","older","peekLast","peekLastKey","peekFirstKey","TileCache","expireCache","pruneExceptNewestZ","adaptAttributions","attributionLike","Source","attributions_","attributionsCollapsible_","attributionsCollapsible","wr
 apX_","wrapX","getContextOptions","refresh","setAttributions","TileSource","opaque_","opaque","tilePixelRatio_","tilePixelRatio","tileCache","tmpSize","tileOptions","zDirection","getTileCacheForProjection","forEachLoadedTile","tileCoordKey","loaded","covered","getGutterForProjection","setKey","getOpaque","getTile","getTileGrid","getTileGridForProjection","thisProj","getTilePixelRatio","getTilePixelSize","getTileCoordForTileUrlFunction","opt_projection","withinExtentAndZ","updateCacheSize","tileCount","useTile","TileSourceEvent","zRegEx","xRegEx","yRegEx","dashYRegEx","createFromTemplates","templates","tileUrlFunctions","createFromTileUrlFunctions","nullTileUrlFunction","expandUrl","startCharCode","stopCharCode","stop_1","UrlTile","generateTileUrlFunction_","tileUrlFunction","setUrls","setUrl","tileLoadingKeys_","getTileLoadFunction","getTileUrlFunction","getUrls","uid","tileState","TileEventType","setTileLoadFunction","setTileUrlFunction","defaultTileLoadFunction","imageTile","TileI
 mage","tileClass","tileCacheForProjection","tileGridForProjection","reprojectionErrorThreshold_","reprojectionErrorThreshold","imageSmoothing","renderReprojectionEdges_","usedTileCache","getGutter","projKey","createTile_","urlTileCoord","tileUrl","newTile","getTileInternal","setRenderReprojectionEdges","setTileGridForProjection","tilegrid","proj","jsonp","opt_errback","opt_callbackParam","script","cleanup","async","timer","getElementsByTagName","BingMaps","hidpi","hidpi_","culture_","culture","maxZoom_","apiKey_","imagerySet_","imagerySet","handleImageryMetadataResponse","getApiKey","getImagerySet","response","statusCode","statusDescription","authenticationResultCode","resourceSets","resources","resource","zoomMax","imageWidth","imageHeight","zoomMin","imageUrlSubdomains","subdomain","quadKeyTileCoord","imageUrl","digits","mask","quadKey","imageryProviders","transform_1","imageryProvider","intersecting","coverageAreas","coverageArea","XYZ","CartoDB","account_","account","mapId_","co
 nfig_","config","templateCache_","initializeMap_","getConfig","updateConfig","setConfig","paramHash","applyTemplate_","mapUrl","client","handleInitResponse_","handleInitError_","setRequestHeader","tilesUrl","cdn_url","https","layergroupid","opt_maxEntries","rbush_","items_","extents","getAll","getInExtent","forEach_","forEachInExtent","rbush","VectorSourceEvent","opt_feature","Vector","VectorSource","loader_","format_","overlaps_","overlaps","url_","loader","strategy_","strategy","collection","useSpatialIndex","featuresRtree_","loadedExtentsRtree_","nullGeometryFeatures_","idIndex_","uidIndex_","featureChangeKeys_","featuresCollection_","addFeaturesInternal","bindFeaturesCollection_","addFeature","addFeatureInternal","featureKey","addToIndex_","setupChangeEvents_","VectorEventType","handleFeatureChange_","valid","newFeatures","geometryFeatures","length_1","length_2","length_3","modifyingCollection","removeFeature","opt_fast","featureId","removeFeatureInternal","clearEvent","forEachF
 eature","forEachFeatureAtCoordinateDirect","forEachFeatureInExtent","forEachFeatureIntersectingExtent","getFeaturesCollection","getFeaturesAtCoordinate","getFeaturesInExtent","getClosestFeatureToCoordinate","opt_filter","closestFeature","previousMinSquaredDistance","minDistance","getFeatureById","getFeatureByUid","getFormat","getOverlaps","getUrl","sid","removeFromIdIndex_","hasFeature","loadFeatures","loadedExtentsRtree","extentsToLoad","_loop_1","extentToLoad","this_1","removeLoadedExtent","removed","setLoader","Cluster","geometryFunction","boundRefresh_","setDistance","mapDistance","clustered","neighbors","neighbor","createCluster","TierSizeCalculation","CustomTile","zoomifyImage_","Zoomify","tierSizeCalculation","tierSizeInTiles","tileSizeForTierSizeCalculation","tileCountUpToTier","tileCoordZ","tileIndex","localContext_1","ZoomifyTileClass","testTileUrl","__spreadArrays","il","jl","Versions","IIIF_PROFILE_VALUES","supports","formats","qualities","COMPLIANCE_VERSION1","COMPLIANC
 E_VERSION2","COMPLIANCE_VERSION3","versionFunctions","iiifInfo","levelProfile","getComplianceLevelSupportedFeatures","imageInfo","scale_factors","tile_width","tile_height","additionalProfile","profile","profileSupports","profileFormats","profileQualities","scaleFactors","extraFormats","preferredFormat","preferredFormats","reduce","acc","extraFeatures","extraQualities","IIIFInfo","setImageInfo","getImageApiVersion","getComplianceLevelEntryFromProfile","getComplianceLevelFromProfile","complianceLevel","getTileSourceOptions","opt_preferredOptions","imageOptions","quality","formatPercentage","percentage","toLocaleString","IIIF","baseUrl","supportsListedSizes","supportsListedTiles","isInteger","supportsArbitraryTiling","maxScaleFactor","ignoredSizesIndex","IiifTileClass","regionParam","sizeParam","tileX","tileY","regionX","regionY","regionW","regionH","sizeW","sizeH","regionWidth","regionHeight","ReprojImage","getImageFunction","sourceImage","sourcePixelRatio","targetExtent_","sourceImag
 e_","sourcePixelRatio_","sourceListenerKey_","unlistenSource_","ImageSourceEventType","ImageSourceEvent","defaultImageLoadFunction","ImageSource","reprojectedImage_","reprojectedRevision_","findNearestResolution","getImageInternal","handleImageChange","appendParams","uri","keyParams","ImageArcGISRest","params_","renderedRevision_","ratio_","getParams","halfWidth","halfHeight","imageResolution","getRequestUrl_","getImageLoadFunction","srid","modifiedUrl","setImageLoadFunction","updateParams","ImageCanvas","opt_loader","error_","getError","handleLoad_","ImageCanvasSource","canvasFunction_","canvasFunction","canvasElement","ImageMapGuide","displayDpi_","displayDpi","useOverlay_","useOverlay","dpi","mcsW","mcsH","devW","devH","mpp","baseParams","Static","imageExtent_","imageExtent","getImageExtent","targetWidth","GETFEATUREINFO_IMAGE_SIZE","ImageWMS","v13_","updateV13_","serverType_","getFeatureInfoUrl","projectionObj","sourceProjectionObj","getLegendUrl","LAYERS","mpu","viewExtent","re
 questExtent","WMSServerType","ATTRIBUTION","OSM","BaseImage","BaseImageLayer","LayerRenderer","boundHandleImageChange_","handleImageChange_","layer_","loadedTileCallback","createLoadedTileFinder","getLayer","renderIfReadyAndVisible","loadImage","CanvasLayerRenderer","renderedResolution","tempTransform","pixelTransform","containerReused","useContainer","layerClassName","transformOrigin","topLeft","topRight","bottomRight","bottomLeft","clipUnrotated","inverted","dispatchRenderEvent_","preRender","postRender","getRenderTransform","renderPixel","newCanvas","newContext","clearRect","CanvasImageLayerRenderer","imageLayer","viewResolution","imageSource","renderedExtent","imagePixelRatio","viewCenter","size_1","canvasTransform","clipped","layerExtent","dw","dh","previousAlpha","ImageLayer","BaseTile","BaseTileLayer","preload","useInterimTilesOnError","setPreload","setUseInterimTilesOnError","getPreload","TileProperty","getUseInterimTilesOnError","CanvasTileLayerRenderer","tileLayer","extent
 Changed","renderedExtent_","renderedPixelRatio","renderedProjection","renderedRevision","renderedTiles","newTiles_","tmpExtent","tmpTileRange_","isDrawableTile","tileSource","sourceRevision","canvasExtent","tilesToDrawByZ","findLoadedTiles","tmpTileRange","childTileRange","canvasScale","clips","clipZs","currentClip","zs","currentZ","currentTilePixelSize","currentScale","dx_1","dy_1","originTileCoord","originTileExtent","origin_1","tileGutter","tilesToDraw","floatX","nextX","floatY","nextY","i_1","drawTileImage","updateUsedTiles","manageTilePyramid","scheduleExpireCache","getTileImage","tileAlpha","alphaChanged","postRenderFunction","opt_tileCallback","TileLayer","hasImageData","createMinion","operation","workerHasImageData","newWorkerImageData","buffers","meta","imageOps","numBuffers","numBytes","images","Uint8ClampedArray","arrays","pixels","createWorker","onMessage","lib","blob","Blob","URL","createObjectURL","worker","Worker","Processor","threads","_imageOps","workers","_onWorker
 Message","minion","terminated","postMessage","terminate","createFauxWorker","_workers","_queue","_maxQueueLength","queue","_running","_dataLookup","_job","process","_enqueue","_dispatch","job","slices","_resolveJob","imageData","createImageData","newImageData","RasterEventType","RasterOperationType","RasterSourceEvent","RasterSource","processor_","operationType_","operationType","threads_","layers_","createLayer","createLayers","requestedFrameState_","renderedImageCanvas_","iMax","sourceOrLayer","sourceAttribution","setOperation","opt_lib","updateFrameState_","allSourcesReady_","ready","processSources_","imageDatas","onWorkerComplete_","sharedContext","layerOrSource","Raster","ATTRIBUTIONS","LayerConfig","ProviderConfig","Stamen","provider","providerConfig","layerConfig","TileArcGISRest","tmpExtent_","getKeyForParams_","tileExtent","LabeledTile","strokeRect","TileDebug","textTileCoord","TileJSON","tileJSON_","handleTileJSONResponse","handleTileJSONError","onXHRLoad_","onXHRError_","
 tileJSON","getTileJSON","epsg4326Projection","attributionExtent_1","TileWMS","preemptive","preemptive_","grid_","keys_","jsonp_","getData","xRelative","yRelative","row","forDataAtCoordinate","opt_request","loadInternal_","handleError_","json","UTFGrid","tileUrlFunction_","template_","getTemplate","forDataAtCoordinateAndResolution","grids","VectorTile","features_","onLoad","setFeatures","onError","canvasPool","VectorRenderTile","getSourceTiles","executorGroups","loadingSourceTiles","errorSourceTileKeys","hitDetectionImageData","replayState_","sourceTiles","wantedResolution","sourceZ","hasContext","getReplayState","dirty","renderedRenderOrder","renderedTileResolution","renderedTileRevision","renderedZ","renderedTileZ","defaultLoadFunction","loadingTiles_","sourceTileCache","tileGrids_","sourceTile","tileFeatures","candidate","loadedZ","previousSourceTiles","sourceTileCoord","listenChange","sourceTileKey","errorTileCount","coordKey","empty","WMTS","requestEncoding","WMTSRequestEncoding
 ","version_","dimensions_","dimensions","matrixSet_","requestEncoding_","getKeyForDimensions_","createFromWMTSTemplate","getDimensions","getMatrixSet","getRequestEncoding","getVersion","updateDimensions","BaseVector","BaseVectorLayer","renderBuffer","updateWhileAnimating","updateWhileInteracting","declutter_","declutter","renderBuffer_","updateWhileAnimating_","updateWhileInteracting_","getDeclutter","getRenderBuffer","getRenderOrder","getUpdateWhileAnimating","getUpdateWhileInteracting","setRenderOrder","renderOrder","WebGLWorkerMessageType","WebGLLayerRenderer","WebGLPointsLayerRenderer","projectionMatrixTransform","sourceRevision_","verticesBuffer_","hitVerticesBuffer_","indicesBuffer_","program_","hitDetectionEnabled_","hitFragmentShader","hitVertexShader","hitProgram_","customAttributes","attribute","hitDetectionAttributes","currentTransform_","renderTransform_","invertRenderTransform_","renderInstructions_","hitRenderInstructions_","hitRenderTarget_","worker_","received","proj
 ectionTransform","hitDetection","vertexBuffer","indexBuffer","renderInstructions","featureCache_","featureCount_","sourceListenKeys_","handleSourceFeatureAdded_","handleSourceFeatureChanged_","handleSourceFeatureDelete_","handleSourceFeatureClear_","renderCount","renderHitDetection","vectorSource","viewNotMoving","sourceChanged","rebuildBuffers_","featureCache","totalInstructionsCount","totalHitInstructionsCount","hitColor","tmpCoords","tmpColor","renderIndex","hitIndex","featureUid","radix","customAttributesCount","hitMessage","colorDecodeId","Instruction","BEGIN_GEOMETRY","BEGIN_PATH","CLOSE_PATH","CUSTOM","DRAW_CHARS","DRAW_IMAGE","END_GEOMETRY","FILL","MOVE_TO_LINE_TO","SET_FILL_STYLE","SET_STROKE_STYLE","STROKE","beginPathInstruction","closePathInstruction","CanvasBuilder","maxLineWidth","beginGeometryInstruction1_","beginGeometryInstruction2_","bufferedMaxExtent_","instructions","tmpCoordinate_","hitDetectionInstructions","applyPixelRatio","dashArray","dash","appendFlatCoordin
 ates","closed","skipFirst","myEnd","getBufferedMaxExtent","lastRel","nextRel","lastXCoord","lastYCoord","nextCoord","skipped","drawCustomCoordinates_","builderEnds","builderEnd","beginGeometry","builderEndss","builderBegin","myEnds","endGeometry","reverseHitDetectionInstructions","instruction","createFill","fillInstruction","applyStroke","createStroke","updateFillStyle","currentFillStyle","updateStrokeStyle","currentStrokeStyle","currentLineCap","currentLineDash","currentLineDashOffset","currentLineJoin","currentLineWidth","currentMiterLimit","endGeometryInstruction","CanvasImageBuilder","declutterGroups_","imagePixelRatio_","anchorX_","anchorY_","height_","originX_","originY_","drawCoordinates_","myBegin","declutterGroups","hitDetectionImage","CanvasLineStringBuilder","drawFlatCoordinates_","moveToLineToInstruction","lastStroke","CanvasPolygonBuilder","drawFlatCoordinatess_","numEnds","setFillStrokeStyles_","circleInstruction","matchingChunk","m12","m23","x12","y12","x23","y23","ch
 unkStart","chunkEnd","chunkM","TEXT_ALIGN","BATCH_CONSTRUCTORS","PolygonBuilder","Builder","ImageBuilder","LineStringBuilder","CanvasTextBuilder","labels_","fillStates","strokeStates","textStates","textKey_","fillKey_","strokeKey_","flatOffset","flatEnd","oo","declutterGroup","drawChars_","geometryWidths","saveTextStates_","p0","p3","pixelRatio_1","strokeKey","textKey","fillKey","baseline","BuilderGroup","tolerance_","maxExtent_","resolution_","buildersByZIndex_","builderInstructions","zKey","builders","builderKey","builderInstruction","builderType","zIndexKey","replays","replay","Constructor","drawTextOnPath","startM","measureAndCacheTextWidth","rotatedCoordinates","previousAngle","numChars","segmentM","angleChanged","char","charLength","charM","segmentPos","lineStringLength","p4","Executor","alignFill_","coordinateCache_","renderedTransform_","widths_","createLabel","align","numLines","widths","currentWidth","measureTextWidths","renderWidth","OffscreenCanvasRenderingContext2D","Ca
 nvasRenderingContext2D","leftRight","replayTextBackground_","strokeInstruction","setStrokeStyle_","replayImageOrLabel_","contextScale","imageOrLabel","snapToPixel","fillStroke","boxW","boxH","boxX","boxY","strokePadding","declutterArgs","repeatSize","boxes","declutterData","currentAlpha","drawLabelWithPointPlacement_","execute_","featureCallback","opt_hitExtent","dd","prevX","prevY","roundX","roundY","pendingFill","pendingStroke","lastFillInstruction","lastStrokeInstruction","coordinateCache","viewRotationFromTransform","batchSize","labelWithAnchor","widthIndex","declutterGroupIndex","measurePixelRatio","pixelRatioScale","cachedWidths","pathLength","textLength","cc","chars","execute","executeHitDetection","opt_featureCallback","ORDER","ExecutorGroup","allInstructions","opt_renderBuffer","executorsByZIndex_","hitDetectionContext_","hitDetectionTransform_","createExecutors_","flatClipCoords","getClipCoords","executors","instructionByZindex","hasExecutors","candidates","contextSize","h
 itExtent","circleArrayCache","arraySize","fillCircleArrayRowToMiddle","getCircleArray","j_1","result_1","executor","opt_builderTypes","opt_declutterReplays","builderTypes","0","replayDeclutter","declutterReplays","zz","executorData","currentExecutor","createHitDetectionImageData","transforms","featureCount","indexFactor","featuresByZIndex","featureStyleFunction","originalStyle","canvas_1","imgContext","byGeometryType","zIndexKeys","geomAndStyle","kk","hitDetect","resultFeatures","CanvasVectorLayerRenderer","vectorLayer","boundHandleStyleImageChange_","handleStyleImageChange_","animatingOrInteracting_","dirty_","hitDetectionImageData_","renderedFeatures_","renderedResolution_","renderedRotation_","renderedCenter_","renderedProjection_","renderedRenderOrder_","replayGroup_","replayGroupChanged","makeScale","world","transform_2","viewHints_1","Promise","layer_1","features_1","animating","interacting","frameStateExtent","vectorLayerRevision","vectorLayerRenderBuffer","vectorLayerRenderO
 rder","loadExtents","loadExtent","userExtent","replayGroupInstructions","executorGroup","CanvasVectorImageLayerRenderer","vectorRenderer_","layerImageRatio_","getImageRatio","coordinateToVectorPixelTransform_","renderedPixelToCoordinateTransform_","vectorPixel","vectorRenderer","imageFrameState_1","image_1","IMAGE_REPLAYS","VECTOR_REPLAYS","CanvasVectorTileLayerRenderer","renderedLayerRevision_","renderTileImageQueue_","tileListenerKeys_","tmpTransform_","prepareTile","tileUid","updateExecutorGroup_","tileImageNeedsRender_","listenerKey","getRenderMode","VectorTileRenderType","renderTileImage_","layerRevision","builderState","layerUid","tt","sourceTileExtent","sharedExtent","bufferedExtent","executorGroupInstructions","replayExtent","renderingReplayGroup","_loop_2","tileContainsCoordinate","extent_1","tilePixel","renderQueuedTileImages_","renderMode","replayTypes","worldOffset","replayState","renderPixelRatio","renderScale","pixelScale","interpolatePoint","cumulativeLengths","opt_co
 mparator","cmp","comparator","lineStringCoordinateAtM","extrapolate","m0","flatMidpoint_","flatMidpointRevision_","appendCoordinate","forEachSegment","getCoordinateAtM","opt_extrapolate","getCoordinateAt","VectorLayer","geoM","fracA","fracB","fracM","geoA","geoB","geoStack","fractionStack","fractions","maxIterations","DEFAULT_STROKE_STYLE","INTERVALS","Graticule","maxLines","targetSize","showLabels","lonLabelFormatter","latLabelFormatter","lonLabelPosition","latLabelPosition","lonLabelStyle","latLabelStyle","intervals","maxLat_","maxLon_","minLat_","minLon_","maxX_","maxY_","minX_","minY_","targetSize_","maxLines_","meridians_","parallels_","strokeStyle_","fromLonLatTransform_","toLonLatTransform_","projectionCenterLonLat_","bottomLeft_","bottomRight_","topLeft_","topRight_","meridiansLabels_","parallelsLabels_","lonLabelFormatter_","latLabelFormatter_","lonLabelPosition_","latLabelPosition_","lonLabelStyleBase_","lonLabelStyle_","latLabelStyleBase_","latLabelStyle_","drawLabels_","
 intervals_","loaderFunction","strategyFunction","featurePool_","lineStyle_","loadedExtent_","realWorldExtent","renderExtent","updateProjectionInfo_","createGraticule_","featuresColl","poolIndex","addMeridian_","lon","minLat","maxLat","lineString","getMeridian_","geom","addParallel_","minLon","maxLon","getParallel_","rotationCenter","rotationExtent","cr","sr","unrotatedWidth","unrotatedHeight","startWorld","endWorld","labelsAtStart","vectorContext","textPoint","getMeridianPoint_","getParallelPoint_","getInterval_","validCenterP","centerLonLat","cnt","centerLon","centerLat","validExtentP","validExtent","clampedLat","frac","meridian","clampedBottom","clampedTop","getMeridians","lon2","parallel","clampedLeft","clampedRight","getParallels","toLonLatTransform","split_1","lonLatCoordinates","worldExtentP","DEFAULT_GRADIENT","Heatmap","gradient","blur","gradient_","handleGradientChanged_","setGradient","setBlur","weightFunction_","getBlur","getGradient","colors","createLinearGradient","addC
 olorStop","createGradient","u_size","u_blurSlope","u_gradientTexture","FeatureFormat","defaultFeatureProjection","getReadOptions","adaptOptions","readFeature","readGeometry","writeFeature","writeFeatures","writeGeometry","transformGeometryWithOptions","decimals","power_1","transformExtentWithOptions","MultiLineString","lineStrings","appendLineString","opt_interpolate","lineStringsCoordinateAtM","getLineString","getLineStrings","midpoints","intersectsLineStringArray","MultiPoint","appendPoint","getPoint","MultiPolygon","opt_endss","endss_","flatInteriorPointsRevision_","flatInteriorPoints_","appendPolygon","newEndss","multiArrayMaxSquaredDelta","assignClosestMultiArrayPoint","linearRingssContainsXY","linearRingss","getInteriorPoints","linearRingssAreOriented","simplifiedEndss","quantizeMultiArray","getPolygon","prevEnds","getPolygons","intersectsLinearRingMultiArray","deflateMultiCoordinatesArray","lastEnds","RenderFeature","type_","flatCoordinates_","flatMidpoints_","properties_","m
 idpoint","layersPBFReader","layerPBFReader","featurePBFReader","readRawFeature","MVT","featureClass_","featureClass","geometryName","layerName_","layerName","idProperty_","idProperty","readRawGeometry_","cmd","coordsLen","currentEnd","cmdLen","createFeature_","rawFeature","getGeometryType","prevEndIndex","ctor","pbfLayers","pbfLayer","VectorTileLayer","renderMode_","super","originalListener","listening","unlisten","projections1","defaultResolutions","createCanvas","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","joinSpaceString","ll","getMeasureContext","measureCache","renderFeatureCoordinates","emptyObj","zoomObj","functionCache","getValue","layoutOrPaint","functions","value_1","isExpr","compiledExpression","rawExpression","expressionData","filterCache","colorWithOpacity","templateRegEx","fromTemplate","glStyle","spriteImage","spriteImgSize","spriteImageUrl","img_1","olLayer","mapboxSource","allLayers","layersBySourceLayer","mapboxLayers","sourceLayer",
 "source_1","textHalo","iconImageCache","patternCache","stylesLength","layerData","evaluateFilter","strokeColor","fillIcon","icon_1","spriteData","pattern","icon_cache_key","spriteImageData","createPattern","width_1","hasImage","placementAngle","iconImg","skipLabel","styleGeom","iconRotationAlignment","ii_1","iconSize","iconColor","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","textSize","fontArray","textLineHeight","getFonts","textTransform","maxTextWidth","wrappedLabel","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","line_1","prevWidth","nextWidth","line_2","lineWords","lastWord","textAnchor","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","textRotationAlignment","haloColor","halfTextSize","textPadding","opt_geometries","geometries_","changeEventsKeys_","listenGeometriesChange_","geometryCollection","setGeometries","cloneGeometries","geometriesArray","getGeometriesArrayRecursive","simplifiedGeometrie
 s","simplified","simplifiedGeometryCollection","setGeometriesArray","unlistenGeometriesChange_","clonedGeometries","getObject","readFeatureFromObject","readFeaturesFromObject","readGeometryFromObject","readProjectionFromObject","writeFeatureObject","writeFeaturesObject","writeGeometryObject","readPointGeometry","readLineStringGeometry","readPolygonGeometry","readMultiPointGeometry","readMultiLineStringGeometry","readMultiPolygonGeometry","readGeometryCollectionGeometry","geoJSON","writePointGeometry","writeLineStringGeometry","rightHanded","writePolygonGeometry","writeMultiPointGeometry","writeMultiLineStringGeometry","writeMultiPolygonGeometry","writeGeometryCollectionGeometry","extractGeometryName_","extractGeometryName","geoJSONFeature","geoJSONFeatures","crs","objects","loadedFontFamilies","fontFamilyRegEx","stripQuotesRegEx","hasFontFamily","styleSheets","styleSheet","cssRules","cssRule","cssText","processedFontFamilies","googleFamilies","fontsKey","googleFontDescriptions","goo
 gleFontDescription","fontUrl","querySelector","markup","head","spriteRegEx","withPath","toSpriteUrl","applyStyle","onChange","sizeFactor_1","spriteUrl_1","fetch","credentials","ok","statusText","spritesJson","getMapboxPath","ErrorEvent","SourceType","MapboxVector","MapboxVectorLayer","sourceId","accessToken","fetchStyle","styleUrl","mapboxPath","mapboxBaseUrl","normalizeStyleUrl","onStyleLoad","handleError","sourceIdOrLayersList","firstSource","normalizeSpriteUrl","normalizeGlyphsUrl","styleSource","VectorImage","VectorImageLayer","imageRatio","imageRatio_","DragAndDropEventType","DragAndDropEvent","file","opt_features","DragAndDrop","formatConstructors_","formatConstructors","dropListenKeys_","source_","handleResult_","tryReadFeatures_","registerListeners_","dropArea","handleDrop","handleStop","unregisterListeners_","files","dataTransfer","reader","FileReader","readAsText","dropEffect","DragRotateAndZoom","lastMagnitude_","magnitude","angleDelta","Circle","setCenterAndRadius","getR
 adiusSquared_","DrawEventType","DrawEvent","Draw","shouldHandle_","downPx_","downTimeout_","lastDragTime_","freehand_","snapTolerance_","snapTolerance","getMode","stopClick_","stopClick","minPoints_","minPoints","maxPoints_","maxPoints","finishCondition_","finishCondition","opt_geometry","squaredLength","Constructor_1","mode_1","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","freehandCondition_","freehand","freehandCondition","updateState_","getOverlay","move","addToDrawing_","startDrawing_","circleMode","finishDrawing","atFinish_","abortDrawing","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","potentiallyDone","potentiallyFinishCoordinates","sketchCoords","finishCoordinate","finishPixel","updateSketchFeatures_","sketchLineGeom","removeLastPoint","sketchFeature","abortDrawing_","appendCoordinates","ending","sketchFeatures","
 overlaySource","ExtentEventType","ExtentEvent","getDefaultPointerStyleFunction","getPointHandler","fixedPoint","getEdgeHandler","fixedP1","fixedP2","Extent","pointerHandler_","pixelTolerance_","pixelTolerance","snappedToVertex_","extentFeature_","vertexFeature_","extentOverlay_","boxStyle","vertexOverlay_","pointerStyle","snapToVertex_","pixelCoordinate","getExtentInternal","segments","getSegments","closestSegment","vertex","vertexPixel","pixel1","pixel2","squaredDist1","squaredDist2","dist","createOrUpdatePointerFeature_","createOrUpdateExtentFeature_","extentFeature","vertexFeature","getOpposingPoint","x_","y_","tempExtent","tempSegment","ModifyEventType","ModifyEvent","compareIndexes","projectedDistanceToSegmentDataSquared","pointCoordinates","segmentData","distanceToCenterSquared","distanceToCircumference","closestOnSegmentData","Modify","boundHandleFeatureChange_","defaultDeleteCondition_","deleteCondition_","deleteCondition","insertVertexCondition_","insertVertexCondition","ve
 rtexSegments_","lastPixel_","ignoreNextSingleClick_","modified_","rBush_","changingFeature_","dragSegments_","SEGMENT_WRITERS_","writePointGeometry_","writeLineStringGeometry_","writePolygonGeometry_","writeMultiPointGeometry_","writeMultiLineStringGeometry_","writeMultiPolygonGeometry_","writeCircleGeometry_","writeGeometryCollectionGeometry_","handleSourceAdd_","handleSourceRemove_","addFeature_","handleFeatureAdd_","handleFeatureRemove_","lastPointerEvent_","writer","handlePointerAtPixel_","willModifyFeatures_","removeFeature_","removeFeatureSegmentData_","rBush","nodesToRemove","nodeToRemove","depth","centerSegmentData","circumferenceSegmentData","featureSegments","geometry_1","createOrUpdateVertexFeature_","removePoint","dragSegment","setGeometryCoordinates_","insertVertices","vertexExtent","segmentDataMatches","componentSegments","segmentDataMatch","insertVertex_","opt_coordinate","nodes","vertexSegments","rTree","updateSegmentIndices_","newSegmentData","newSegmentData2","remo
 veVertex_","component","newIndex","dragSegments","segmentsByFeature","deleted","SelectEventType","SelectEvent","selected","deselected","originalFeatureStyles","Select","boundAddFeature_","boundRemoveFeature_","addCondition_","addCondition","removeCondition_","removeCondition","toggleCondition_","toggleCondition","multi_","multi","filter_","hitTolerance_","layers_1","layerFilter_","featureLayerAssociation_","addFeatureLayerAssociation_","getHitTolerance","setHitTolerance","restorePreviousStyle_","applySelectedStyle_","selectInteractions","removeFeatureLayerAssociation_","getFeatureFromEvent","Snap","vertex_","edge_","edge","featuresListenerKeys_","featureChangeListenerKeys_","indexedFeaturesExtents_","pendingFeatures_","opt_listen","feature_uid","segmentWriter","forEachFeatureAdd_","forEachFeatureRemove_","getFeatures_","snapTo","snapped","updateFeature_","featuresToUpdate","opt_unlisten","unregister","nodesToRemove_1","currentMap","closestSegmentData","projectedCoordinate","isCircle
 ","closestOnCircle","TranslateEventType","TranslateEvent","startCoordinate","Translate","lastCoordinate_","startCoordinate_","lastFeature_","handleActiveChanged_","featuresAtPixel_","newCoordinate","deltaX_1","deltaY_1","oldMap","GeometryCollection","JSONFeature","GEOMETRY_READERS","getGeometryLayout","paths","GEOMETRY_WRITERS","_a","_b","esriJSONPolygon","flatRing","outerRings","holes","hole","outerRing","convertRings","geometryReader","hasZ","hasM","getHasZM","geometryWriter","esriJSON","hasZM","multiPoint","multiLineString","EsriJSON","opt_idField","esriJSONFeature","esriJSONFeatures","objectIdFieldName","wkid","XMLFeature","XMLSerializer","readFeatureFromDocument","readFeatureFromNode","readFeaturesFromDocument","readFeaturesFromNode","ELEMENT_NODE","readGeometryFromDocument","readGeometryFromNode","readProjectionFromDocument","readProjectionFromNode","writeFeatureNode","serializeToString","writeFeaturesNode","writeGeometryNode","GMLNS","ONLY_WHITESPACE_RE","GMLBase","featureTyp
 e","featureNS","srsName","schemaLocation","FEATURE_COLLECTION_PARSERS","namespace","readFeaturesInternal","ft","featureTypes","readFeatureElement","readGeometryElement","getAttribute","GEOMETRY_PARSERS","readFeatureElementInternal","asFeature","_content_","attName","fid","getAttributeNS","readPoint","readFlatCoordinatesFromNode","readMultiPoint","MULTIPOINT_PARSERS","readMultiLineString","MULTILINESTRING_PARSERS","readMultiPolygon","MULTIPOLYGON_PARSERS","pointMemberParser","POINTMEMBER_PARSERS","lineStringMemberParser","LINESTRINGMEMBER_PARSERS","polygonMemberParser","POLYGONMEMBER_PARSERS","readLineString","readFlatLinearRing","GEOMETRY_FLAT_COORDINATES_PARSERS","readLinearRing","readPolygon","flatLinearRings","FLAT_LINEAR_RINGS_PARSERS","RING_PARSERS","readBooleanString","readDateTime","dateTime","readDecimal","readDecimalString","readNonNegativeInteger","readNonNegativeIntegerString","writeBooleanTextNode","bool","writeStringTextNode","writeDecimalTextNode","toPrecision","writeN
 onNegativeIntegerTextNode","nonNegativeInteger","MULTIGEOMETRY_TO_MEMBER_NODENAME","GML3","surface_","surface","curve_","multiCurve_","multiCurve","multiSurface_","multiSurface","readMultiCurve","MULTICURVE_PARSERS","readMultiSurface","MULTISURFACE_PARSERS","curveMemberParser","CURVEMEMBER_PARSERS","surfaceMemberParser","SURFACEMEMBER_PARSERS","readPatch","PATCHES_PARSERS","readSegment","SEGMENTS_PARSERS","readPolygonPatch","readLineStringSegment","interiorParser","flatLinearRing","exteriorParser","readSurface","SURFACE_PARSERS","readCurve","CURVE_PARSERS","readEnvelope","ENVELOPE_PARSERS","readFlatPos","containerSrs","readFlatPosList","contextDimension","dim","writePos_","srsDimension","getCoords_","opt_srsName","opt_hasZ","writePosList_","writePoint","writeEnvelope","ENVELOPE_SERIALIZERS","writeLinearRing","posList","RING_NODE_FACTORY_","exteriorWritten","writeSurfaceOrPolygon","RING_SERIALIZERS","patches","writeSurfacePatches_","writeCurveOrLineString","writeCurveSegments_","writ
 eMultiSurfaceOrPolygon","SURFACEORPOLYGONMEMBER_SERIALIZERS","MULTIGEOMETRY_MEMBER_NODE_FACTORY_","writeMultiPoint","POINTMEMBER_SERIALIZERS","writeMultiCurveOrLineString","LINESTRINGORCURVEMEMBER_SERIALIZERS","writeRing","writeSurfaceOrPolygonMember","GEOMETRY_NODE_FACTORY_","writePointMember","writeLineStringOrCurveMember","writeGeometryElement","GEOMETRY_SERIALIZERS","writeFeatureElement","writeFeatureMembers_","setAttributeNS","GML","GML2","readFlatCoordinates","coordsGroups","readBox","BOX_PARSERS_","innerBoundaryIsParser","outerBoundaryIsParser","createCoordinatesNode_","writeCoordinates_","GML32","NAMESPACE_URIS","FEATURE_READER","readRte","readTrk","readWpt","GPX_PARSERS","LINK_PARSERS","GPX_SERIALIZERS","RTE_SEQUENCE","RTE_SERIALIZERS","TRK_SEQUENCE","TRK_SERIALIZERS","writeWptType","GPX","readExtensions_","readExtensions","handleReadExtensions_","extensionsNode","featureReader","gpx","GPX_NODE_FACTORY","RTE_PARSERS","parseLink","parseExtensions","RTEPT_PARSERS","rteValues"
 ,"layoutOptions","TRK_PARSERS","TRKSEG_PARSERS","TRKPT_PARSERS","trkValues","WPT_PARSERS","LINK_SEQUENCE","LINK_SERIALIZERS","writeLink","RTEPT_TYPE_SEQUENCE","TRKSEG_SERIALIZERS","TRKSEG_NODE_FACTORY","WPT_TYPE_SEQUENCE","WPT_TYPE_SERIALIZERS","date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","GEOMETRY_TYPE_TO_NODENAME","applyLayoutOptions","GeoJSON","DEFAULT_COLOR","DEFAULT_IMAGE_STYLE_ANCHOR","DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS","DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS","DEFAULT_IMAGE_STYLE_SIZE","DEFAULT_IMAGE_STYLE_SRC","DEFAULT_IMAGE_SCALE_MULTIPLIER","TextFeature","readFeatureFromText","readFeaturesFromText","readGeometryFromText","readProjectionFromText","writeFeatureText","writeFeaturesText","writeGeometryText","IGCZ","B_RECORD_RE","H_RECORD_RE","HFDTE_RECORD_RE","NEWLINE_RE","IGC","altitudeMode_","altitudeMode","year","month","day","lastDateTime","hour","minute","second","UTC","GX_NAMESPACE_URIS","ICON_ANCHOR_UNITS_MAP","PLACEMARK_
 PARSERS","extendedDataParser","regionParser","readMultiGeometry","styleMapValue","readStyleMapValue","placemarkObject","readURI","GX_MULTITRACK_GEOMETRY_PARSERS","readGxTrack","NETWORK_LINK_PARSERS","REGION_PARSERS","LAT_LON_ALT_BOX_PARSERS","regionObject","LOD_PARSERS","lodObject","KML_SEQUENCE","KML_SERIALIZERS","DOCUMENT_SERIALIZERS","DOCUMENT_NODE_FACTORY","writePlacemark","DEFAULT_FILL_STYLE","DEFAULT_NO_IMAGE_STYLE","DEFAULT_IMAGE_STYLE","DEFAULT_TEXT_STROKE_STYLE","DEFAULT_TEXT_STYLE","DEFAULT_STYLE","TEXTAREA","DEFAULT_STYLE_ARRAY","KML","defaultStyle_","defaultStyle","extractStyles_","extractStyles","writeStyles_","writeStyles","sharedStyles_","showPointNames_","showPointNames","readDocumentOrFolder_","readPlacemark_","readSharedStyle_","readSharedStyleMap_","sharedStyles","drawName","multiGeometryPoints","featureStyle","findStyle","styleValue","nameStyle","foundStyle","createNameStyleFunction","createFeatureStyleFunction","styleUri","baseURI","fs","readName","readNameFromD
 ocument","readNameFromNode","name_2","readNetworkLinks","networkLinks","readNetworkLinksFromDocument","readNetworkLinksFromNode","readRegion","regions","readRegionFromDocument","readRegionFromNode","kml","xmlnsUri","readColor","hexColor","readScale","STYLE_MAP_PARSERS","pairObject","PAIR_PARSERS","ICON_STYLE_PARSERS","iconObject","ICON_PARSERS","xunits","yunits","LABEL_STYLE_PARSERS","LINE_STYLE_PARSERS","POLY_STYLE_PARSERS","FLAT_LINEAR_RING_PARSERS","GX_TRACK_PARSERS","whens","when","gxTrackObject","EXTRUDE_AND_ALTITUDE_MODE_PARSERS","MULTI_GEOMETRY_PARSERS","multiGeometry","homogeneous","setCommonGeometryProperties","INNER_BOUNDARY_IS_PARSERS","OUTER_BOUNDARY_IS_PARSERS","STYLE_PARSERS","styleObject","IconObject","drawIcon","hotSpot","outline","hasExtrude","hasTessellate","hasAltitudeMode","extrudes","tessellates","altitudeModes","DATA_PARSERS","EXTENDED_DATA_PARSERS","featureObject","displayName","SCHEMA_DATA_PARSERS","writeColorTextNode","abgr","hex","EXTENDEDDATA_NODE_SERIALIZ
 ERS","pair","createCDATASection","writeCDATASection","DATA_NODE_FACTORY","ICON_SEQUENCE","ICON_SERIALIZERS","GX_NODE_FACTORY","ICON_STYLE_SEQUENCE","ICON_STYLE_SERIALIZERS","vec2","writeScaleTextNode","LABEL_STYLE_SEQUENCE","LABEL_STYLE_SERIALIZERS","LINE_STYLE_SEQUENCE","LINE_STYLE_SERIALIZERS","GEOMETRY_NODE_FACTORY","POINT_NODE_FACTORY","LINE_STRING_NODE_FACTORY","LINEAR_RING_NODE_FACTORY","POLYGON_NODE_FACTORY","MULTI_GEOMETRY_SERIALIZERS","writePrimitiveGeometry","writePolygon","writeMultiGeometry","BOUNDARY_IS_SERIALIZERS","writeBoundaryIs","PLACEMARK_SERIALIZERS","namesAndValues","names","pointStyles","lineStyles","polyStyles","STYLE_SEQUENCE","STYLE_SERIALIZERS","PLACEMARK_SEQUENCE","EXTENDEDDATA_NODE_FACTORY","styleArray","PRIMITIVE_GEOMETRY_SEQUENCE","PRIMITIVE_GEOMETRY_SERIALIZERS","POLY_STYLE_SEQUENCE","POLYGON_SERIALIZERS","INNER_BOUNDARY_NODE_FACTORY","OUTER_BOUNDARY_NODE_FACTORY","POLY_STYLE_SERIALIZERS","iconProperties","WAY_PARSERS","ndrefs","readTag","PARSERS","tag
 s","NODE_PARSERS","ways","OSMXML","flipXY","opt_destOffset","destOffset","encodeDeltas","numbers","opt_factor","factor","lastNumbers","encodeFloats","decodeDeltas","encoded","decodeFloats","encodeUnsignedInteger","encodeUnsignedIntegers","encodeSignedIntegers","current","decodeUnsignedIntegers","decodeSignedIntegers","Polyline","factor_","geometryLayout_","geometryLayout","TopoJSON","topoJSONTopology","arcs","transformArc","transformArcs","topoJSONFeatures","objectName","readFeaturesFromGeometryCollection","readFeatureFromGeometry","transformVertex","concatenateArcs","polyArray","ringCoords","indices","Filter","tagName_","getTagName","LogicalNary","And","Bbox","Spatial","Contains","propertyName","During","ComparisonBinary","opt_matchCase","matchCase","EqualTo","GreaterThanOrEqualTo","Intersects","IsBetween","lowerBoundary","upperBoundary","IsLike","opt_wildCard","opt_singleChar","opt_escapeChar","wildCard","singleChar","escapeChar","IsNull","LessThanOrEqualTo","Not","NotEqualTo","Or
 ","and","TRANSACTION_SUMMARY_PARSERS","TRANSACTION_RESPONSE_PARSERS","INSERT_RESULTS_PARSERS","QUERY_SERIALIZERS","TRANSACTION_SERIALIZERS","gmlVersion","featurePrefix","typeName","getTypeName","XMLNS","writeOgcFidFilter","WFSNS","nativeElement","vendorId","safeToIgnore","OGCNS","SCHEMA_LOCATIONS","WFS","featureType_","featureNS_","gmlFormat_","gmlFormat","schemaLocation_","getFeatureType","setFeatureType","readTransactionResponse","readTransactionResponseFromDocument","readTransactionResponseFromNode","readFeatureCollectionMetadata","readFeatureCollectionMetadataFromDocument","readFeatureCollectionMetadataFromNode","writeGetFeature","handle","outputFormat","maxFeatures","resultType","viewParams","propertyNames","GETFEATURE_SERIALIZERS","writeTransaction","inserts","updates","deletes","baseObj","gmlOptions","nativeElements","OGC_FID_PARSERS","prefix","writeFilterCondition","valueReference","timePeriod","writeTimeInstant","writeLogicalFilter","writeOgcPropertyName","writeComparisonFi
 lter","writeOgcLiteral","writeOgcExpression","timeInstant","timePosition","GeometryConstructor","TokenType","WKTGeometryType","Lexer","wkt","index_","isAlpha_","isNumeric_","opt_decimal","isWhiteSpace_","nextChar_","nextToken","readNumber_","readText_","scientificNotation","substring","lexer_","token_","layout_","consume_","isTokenType","isMatch","parseGeometry_","parseGeometryLayout_","dimToken","dimInfo","parseGeometryCollectionText_","isEmptyGeometry_","formatErrorMessage_","parsePointText_","parsePoint_","parseLineStringText_","parsePointList_","parsePolygonText_","parseLineStringTextList_","parseMultiPointText_","parsePointTextList_","parseMultiLineStringText_","parseMultiPolygonText_","parsePolygonTextList_","geomType","WKT","splitCollection_","splitCollection","parse_","encodePointGeometry","encodeLineStringGeometry","encodePolygonGeometry","GeometryEncoder","components","geoms","enc","geometryEncoder","encodeGeometryLayout","XML","readFromDocument","readFromNode","readHref",
 "SERVICE_PARSERS","CAPABILITY_PARSERS","REQUEST_PARSERS","EXCEPTION_PARSERS","LAYER_PARSERS","WMSCapabilities","wmsCapabilityObject","readKeywordList","CONTACT_INFORMATION_PARSERS","CONTACT_PERSON_PARSERS","CONTACT_ADDRESS_PARSERS","geographicBoundingBox","EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS","westBoundLongitude","southBoundLatitude","eastBoundLongitude","northBoundLatitude","ATTRIBUTION_PARSERS","authorityObject","readFormatOnlineresource","metadataObject","parentLayerObject","layerObject","queryable","cascaded","noSubsets","fixedWidth","fixedHeight","childValue","parentValue","readSizedFormatOnlineresource","readOperationType","OPERATIONTYPE_PARSERS","DCPTYPE_PARSERS","HTTP_PARSERS","FORMAT_ONLINERESOURCE_PARSERS","KEYWORDLIST_PARSERS","formatOnlineresource","WMSGetFeatureInfo","readFeatures_","layerElement","layerFeatures","gmlFeatures","SERVICE_IDENTIFICATION_PARSERS","SERVICE_PROVIDER_PARSERS","OPERATIONS_METADATA_PARSERS","OWS","owsObject","ADDRESS_PARSERS","ALLOWED_VALUES_PARS
 ERS","CONSTRAINT_PARSERS","CONTACT_INFO_PARSERS","PHONE_PARSERS","DCP_PARSERS","REQUEST_METHOD_PARSERS","OPERATION_PARSERS","SERVICE_CONTACT_PARSERS","CONTENTS_PARSERS","WMTSCapabilities","owsParser_","WMTSCapabilityObject","TMS_PARSERS","isDefault","TMS_LINKS_PARSERS","DIMENSION_PARSERS","resourceType","WGS84_BBOX_READERS","legend","TMS_LIMITS_LIST_PARSERS","TMS_LIMITS_PARSERS","readCoordinates","TM_PARSERS","events","FullScreenEventType","isFullScreenSupported","requestFullscreen","fullscreenEnabled","isFullScreen","fullscreenElement","requestFullScreen","FullScreen","cssClassName_","labelNode_","labelActive","labelActiveNode_","button_","setClassName_","handleFullScreen_","exitFullscreen","requestFullScreenWithKeys","handleFullScreenChange_","fullscreen","activeClassName","inactiveClassName","nextClassName","MousePosition","coordinateFormat","setCoordinateFormat","undefinedHTML_","undefinedHTML","renderOnMouseOut_","renderedHTML_","mapProjection_","getCoordinateFormat","handleMou
 seMove","updateHTML_","handleMouseOut","html","ControlledMap","OverviewMap","boundHandleRotationChanged_","handleRotationChanged_","viewExtent_","ovmapDiv_","view_","ovmap_","ovmap","boxSizing","boxOverlay_","overlayBox","mousePosition","endMoving","oldView","unbindView_","handleMapPropertyChange_","bindView_","resetExtent_","newView","validateExtent_","ovmapSize","ovextent","topLeftPixel","bottomRightPixel","boxWidth","boxHeight","ovmapWidth","ovmapHeight","recenter_","ovview","MAX_RATIO","updateBox_","ovresolution","getOverviewMap","LEADING_DIGITS","ScaleLine","bar","innerElement_","viewState_","minWidth_","minWidth","renderedWidth_","handleUnitsChanged_","setUnits","scaleBar_","scaleBarSteps_","scaleBarText_","dpi_","setDpi","pointResolutionUnits","nominalCount","suffix","metersPerDegree","decimalCount","createScaleBar","mapScale","getScaleForResolution","scaleSteps","stepWidth","backgroundColor","createMarker","createStepText","isLast","lengthString","Direction","ZoomSlider","cu
 rrentResolution_","direction_","heightLimit_","widthLimit_","startX_","startY_","thumbSize_","sliderInitialized_","thumbElement","containerElement","handleDraggerStart_","handleDraggerDrag_","handleDraggerEnd_","handleContainerClick_","initSlider_","containerWidth","containerHeight","thumb","thumbWidth","thumbHeight","relativePosition","getRelativePosition_","getResolutionForPosition_","drag","setThumbPosition_","getPositionForResolution_","ZoomToExtent","handleZoomToExtent","ol","featureloader","loadingstrategy","proj4","webgl","sphere","stableSort","compareFnc","colorlike","createStringXY","toStringHDMS","upAndDown","click","doubleClick","focus","penOnly","pointerEvt","platformModifierKeyOnly","pointerMove","touchOnly","setWithCredentials","xhrWithCredentials","writeFilter","between","during","equalTo","greaterThan","greaterThanOrEqualTo","isNull","lessThan","lessThanOrEqualTo","like","not","notEqualTo","or","createBox","boxCoordinates","createRegularPolygon","Group","fromLonLat",
 "projCodes","defs","def","axis","to_meter","code1","proj1","code2","proj2","def1","def2","toLonLat","lonLat","getRenderPixel","toContext","PointsLayer","ImageStatic","optionsFromCapabilities","wmtsCap","tileMatrixSets","supportedCRS","matrixSetObj","projConfig","matrix","TileMatrix","selectedMatrixLimit","MinTileCol","MinTileRow","MaxTileCol","MatrixWidth","MaxTileRow","MatrixHeight","Identifier","ScaleDenominator","TopLeftCorner","tileSpanX","TileWidth","tileSpanY","TileHeight","gets","encodings","composeCssTransform","DYNAMIC_DRAW","ELEMENT_ARRAY_BUFFER","Helper","PostProcessingPass","RenderTarget","STREAM_DRAW","registerDocument","registerXMLSerializer","xmlSerializer"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAY,GAAID,IAEhBD,EAAS,GAAIC,IARf,CASGK,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACH
 E,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAenB,EAAS,aAAc,CAAEyB,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF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AGltJ,UAAUmyJ,oB5ZzXN,SAA6BpxJ,EAAKC,EAAKC,EAAIC,EAAIC,EAAOC,EAAKC,GAC9D,OAAO,GAASP,GAzKT,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAyKWC,EAAKC,EAAKC,EAAIC,EAAIC,EAAOC,EAAKC,K4ZyXpE6rJ,GAAG9hM,KAAKgrC,OAAS,EACjB82J,GAAGI,MAAM7hG,ajTpjBiB,MiTqjB1ByhG,
 GAAGI,MAAM5vK,OAAS,GAClBwvK,GAAGI,MAAM8E,ajTxhBiB,MiTyhB1BlF,GAAGI,MAAM+E,qBjT9iByB,MiT+iBlCnF,GAAGI,MAAMgF,OAAS,GAClBpF,GAAGI,MAAMgF,OAAO3iG,wBAA0B,GAC1Cu9F,GAAGI,MAAMiF,mBAAqB,GAC9BrF,GAAGI,MAAMkF,aAAe,GACxBtF,GAAGI,MAAM3hG,YjTriBgB,MiTsiBzBuhG,GAAGI,MAAMmF,YjT7iBgB,MiT8iBzBvF,GAAGpmG,IAAIV,kBAAoB,GAC3B8mG,GAAGpmG,IAAI95F,MAAQ,GACfkgM,GAAGpmG,IAAI4rG,iBhThIA,SAA0B31I,GAC7BssC,GAAYtsC,GgTgIhBmwI,GAAGpmG,IAAI6rG,sBhTrJA,SAA+BC,GAClCxpG,GAAiBwpG,GgTsJN,gB","file":"ol.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ol\"] = factory();\n\telse\n\t\troot[\"ol\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require_
 _(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true
 , get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeo
 f value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","var $version = 8;\nvar $root = {\n\tversion: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: [\n\t\t\t8\n\t\t],\n\t\t
 doc: \"Style specification version number. Must be 8.\",\n\t\texample: 8\n\t},\n\tname: {\n\t\ttype: \"string\",\n\t\tdoc: \"A human-readable name for the style.\",\n\t\texample: \"Bright\"\n\t},\n\tmetadata: {\n\t\ttype: \"*\",\n\t\tdoc: \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n\t},\n\tcenter: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tdoc: \"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: [\n\t\t\t-73.9749,\n\t\t\t40.7736\n\t\t]\n\t},\n\tzoom: {\n\t\ttype: \"number\",\n\t\tdoc: \"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 12.5\n\t},\n\tbearing: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tper
 iod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Default bearing, in degrees. The bearing is the compass direction that is \\\"up\\\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 29\n\t},\n\tpitch: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 50\n\t},\n\tlight: {\n\t\ttype: \"light\",\n\t\tdoc: \"The global light source.\",\n\t\texample: {\n\t\t\tanchor: \"viewport\",\n\t\t\tcolor: \"white\",\n\t\t\tintensity: 0.4\n\t\t}\n\t},\n\tsources: {\n\t\trequired: true,\n\t\ttype: \"sources\",\n\t\td
 oc: \"Data source specifications.\",\n\t\texample: {\n\t\t\t\"mapbox-streets\": {\n\t\t\t\ttype: \"vector\",\n\t\t\t\turl: \"mapbox://mapbox.mapbox-streets-v6\"\n\t\t\t}\n\t\t}\n\t},\n\tsprite: {\n\t\ttype: \"string\",\n\t\tdoc: \"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n\t\texample: \"mapbox://sprites/mapbox/bright-v8\"\n\t},\n\tglyphs: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be abso
 lute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n\t\texample: \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n\t},\n\ttransition: {\n\t\ttype: \"transition\",\n\t\tdoc: \"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.\",\n\t\texample: {\n\t\t\tduration: 300,\n\t\t\tdelay: 0\n\t\t}\n\t},\n\tlayers: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"layer\",\n\t\tdoc: \"Layers will be drawn in the order of this array.\",\n\t\texample: [\n\t\t\t{\n\t\t\t\tid: \"water\",\n\t\t\t\tsource: \"mapbox-streets\",\n\t\t\t\t\"source-layer\": \"water\",\n\t\t\t\ttype: \"fill\",\n\t\t\t\tpaint: {\n\t\t\t\t\t\"fill-color\": \"#00ffff\"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n};\nvar sources = {\n\t\"*\": {\n\t\
 ttype: \"source\",\n\t\tdoc: \"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided.\"\n\t}\n};\nvar source = [\n\t\"source_vector\",\n\t\"source_raster\",\n\t\"source_raster_dem\",\n\t\"source_geojson\",\n\t\"source_video\",\n\t\"source_image\"\n];\nvar source_vector = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvector: {\n\t\t\t\tdoc: \"A vector tile source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\
 ",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t\tdoc: \"Slippy map tilenames scheme.\"\n\t\t\t},\n\t\t\ttms: {\n\t\t\t\tdoc: \"OSGeo spec scheme.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\",\n\t\tdoc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum z
 oom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\",\n\t\tdoc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers.\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_raster = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\traster: {\n\t\t\t\tdoc: \"A raster tile source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protoc
 ols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at th
 e maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t\tdoc: \"Slippy map tilenames scheme.\"\n\t\t\t},\n\t\t\ttms: {\n\t\t\t\tdoc: \"OSGeo spec scheme.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\",\n\t\tdoc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_raster_dem = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\t\"raster-dem\": {\n\t\t\t\tdoc: \"A RGB-en
 coded raster DEM source\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spe
 c.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tencoding: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tterrarium: {\n\t\t\t\tdoc: \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n\t\t\t},\n\t\t\tmapbox: {\n\t\t\t\tdoc: \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"mapbox\",\n\t\tdoc: \"The en
 coding used by this source. Mapbox Terrain RGB is used by default\"\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_geojson = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tgeojson: {\n\t\t\t\tdoc: \"A GeoJSON data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the GeoJSON source.\"\n\t},\n\tdata: {\n\t\ttype: \"*\",\n\t\tdoc: \"A URL to a GeoJSON file, or inline GeoJSON.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 18,\n\t\tdoc: \"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tbuffer: {\n\t\ttype: \"number\",\n\t\t\"default\": 128,\n\t\tmaximum: 512,\n\t\tminimum: 0,\n\t\tdoc: \"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 pro
 duces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.\"\n\t},\n\ttolerance: {\n\t\ttype: \"number\",\n\t\t\"default\": 0.375,\n\t\tdoc: \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n\t},\n\tcluster: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\\n * `cluster` Is `true` if the point is a cluster \\n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\\n * `point_count` Number of original points grouped into this cluster\\n * `point_count_abbreviated` An abbreviated point count\"\n\t},\n\tclusterRadius: {\n\t\t
 type: \"number\",\n\t\t\"default\": 50,\n\t\tminimum: 0,\n\t\tdoc: \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n\t},\n\tclusterMaxZoom: {\n\t\ttype: \"number\",\n\t\tdoc: \"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered).\"\n\t},\n\tclusterProperties: {\n\t\ttype: \"*\",\n\t\tdoc: \"An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\\\"property_name\\\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\\\"+\\\"` or `\\\"max\\\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\\n\\nExample: `{\\\"sum\\\": [\\\"+\\\", [\\\"get\\\", \\\"scalerank\\\"]]}`.\\n\\nFor more advanc
 ed use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\\\"accumulated\\\"]` value, e.g.:\\n`{\\\"sum\\\": [[\\\"+\\\", [\\\"accumulated\\\"], [\\\"get\\\", \\\"sum\\\"]], [\\\"get\\\", \\\"scalerank\\\"]]}`\"\n\t},\n\tlineMetrics: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n\t},\n\tgenerateId: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values.\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\",\n\t\tdoc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`.\"\n\t}\n};\nvar source_video = {\n\ttype: {\n\t\trequired: tr
 ue,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvideo: {\n\t\t\t\tdoc: \"A video data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the video source.\"\n\t},\n\turls: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"URLs to video content in order of preferred format.\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\tdoc: \"Corners of video specified in longitude, latitude pairs.\",\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\",\n\t\t\tdoc: \"A single longitude, latitude pair.\"\n\t\t}\n\t}\n};\nvar source_image = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\timage: {\n\t\t\t\tdoc: \"An image data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the image source.\"\n\t},\n\turl: {\n\t\trequired: true,\n\t\ttype: \"string\",\n\t\tdoc: \"URL that points to an image.\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\tdoc: \"Corners of
  image specified in longitude, latitude pairs.\",\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\",\n\t\t\tdoc: \"A single longitude, latitude pair.\"\n\t\t}\n\t}\n};\nvar layer = {\n\tid: {\n\t\ttype: \"string\",\n\t\tdoc: \"Unique layer name.\",\n\t\trequired: true\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tfill: {\n\t\t\t\tdoc: \"A filled polygon with an optional stroked border.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tdoc: \"A stroked line.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tsymbol: {\n\t\t\t\tdoc:
  \"An icon or a text label.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tcircle: {\n\t\t\t\tdoc: \"A filled circle.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\theatmap: {\n\t\t\t\tdoc: \"A heatmap.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"fill-extrusion\": {\n\t\t\t\tdoc: \"An extruded (3D) polygon.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.27.0\",\n\t\t\t\t\t\tandroid: \"5.1.0\",\
 n\t\t\t\t\t\tios: \"3.6.0\",\n\t\t\t\t\t\tmacos: \"0.5.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\traster: {\n\t\t\t\tdoc: \"Raster map textures such as satellite imagery.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thillshade: {\n\t\t\t\tdoc: \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.43.0\",\n\t\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tbackground: {\n\t\t\t\tdoc: \"The background color or pattern of the map.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\t
 android: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdoc: \"Rendering type of this layer.\",\n\t\trequired: true\n\t},\n\tmetadata: {\n\t\ttype: \"*\",\n\t\tdoc: \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n\t},\n\tsource: {\n\t\ttype: \"string\",\n\t\tdoc: \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n\t},\n\t\"source-layer\": {\n\t\ttype: \"string\",\n\t\tdoc: \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24,\n\t\tdoc: \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\
 t\tminimum: 0,\n\t\tmaximum: 24,\n\t\tdoc: \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n\t},\n\tfilter: {\n\t\ttype: \"filter\",\n\t\tdoc: \"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.\"\n\t},\n\tlayout: {\n\t\ttype: \"layout\",\n\t\tdoc: \"Layout properties for the layer.\"\n\t},\n\tpaint: {\n\t\ttype: \"paint\",\n\t\tdoc: \"Default paint properties for this layer.\"\n\t}\n};\nvar layout = [\n\t\"layout_fill\",\n\t\"layout_line\",\n\t\"layout_circle\",\n\t\"layout_heatmap\",\n\t\"layout_fill-extrusion\",\n\t\"layout_symbol\",\n\t\"layout_raster\",\n\t\"layout_hillshade\",\n\t\"layout_background\"\n];\nvar layout_background = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\t
 doc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_fill = {\n\t\"fill-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinte
 rpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_circle = {\n\t\"circle-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.9.0\"
 ,\n\t\t\t\tmacos: \"0.16.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.9.0\",\n\t\t\t\tmacos: \"0.16.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_heatmap = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\
 n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_line = {\n\t\"line-cap\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbutt: {\n\t\t\t\tdoc: \"A cap with a squared-off end which is drawn to the exact endpoint of the line.\"\n\t\t\t},\n\t\t\tround: {\n\t\t\t\tdoc: \"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n\t\t\t},\n\t\t\tsquare: {\n\t\t\t\tdoc: \"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"butt\",\n\t\t
 doc: \"The display of line endings.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-join\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbevel: {\n\t\t\t\tdoc: \"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n\t\t\t},\n\t\t\tround: {\n\t\t\t\tdoc: \"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n\t\t\t},\n\t\t\tmiter: {\n\t\t\t\tdoc: \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"miter\",\
 n\t\tdoc: \"The display of lines when joining.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-miter-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tdoc: \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"miter\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tint
 erpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-round-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.05,\n\t\tdoc: \"Used to automatically convert round joins to miter joins for shallow angles.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"round\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.
 1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_symbol = {\n\t\"symbol-placement\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tpoint: {\n
 \t\t\t\tdoc: \"The label is placed at the point where the geometry is located.\"\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tdoc: \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n\t\t\t},\n\t\t\t\"line-center\": {\n\t\t\t\tdoc: \"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"point\",\n\t\tdoc: \"Label placement relative to its geometry.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`line-center` value\": {\n\t\t\t\tjs: \"0.47.0\",\n\t\t\t\tandroid: \"6.4.0\",\n\t\t\t\tios: \"4.3.0\",\n\t\t\t\tmacos: \"0.10.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t
 \t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 250,\n\t\tminimum: 1,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance between two symbol anchors.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"symbol-placement\": \"line\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-avoid-edges\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a 
 client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\
 t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.53.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.11.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.53.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.11.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"symbol-z-order\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t\tdoc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n\t\t\t},\n\t\t\t\"viewport-y\": {\n\t\t\t\tdoc: \"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon
 -ignore-placement` or `text-ignore-placement` is `false`.\"\n\t\t\t},\n\t\t\tsource: {\n\t\t\t\tdoc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.6.0\",\n\t\t\t\tios: \"4.5.0\",\n\t\t\t\tmacos: \"0.12.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the icon wil
 l be visible even if it collides with other previously drawn symbols.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, other symbols can be visible even if they collide with the icon.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}
 ,\n\t\"icon-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Produces icons whose x-axes are aligned with the x-axis of the viewport, 
 regardless of the value of `symbol-placement`.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum:
  0,\n\t\tunits: \"factor of the original icon size\",\n\t\tdoc: \"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-text-fit\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t\tdoc: \"The icon is displayed at its intrinsic aspect ratio.\"\n\t\t\t},\n\t\t\twidth: {\n
 \t\t\t\tdoc: \"The icon is scaled in the x-dimension to fit the width of the text.\"\n\t\t\t},\n\t\t\theight: {\n\t\t\t\tdoc: \"The icon is scaled in the y-dimension to fit the height of the text.\"\n\t\t\t},\n\t\t\tboth: {\n\t\t\t\tdoc: \"The icon is scaled in both x- and y-dimensions.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\tdoc: \"Scales the icon to fit around the associated text.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t},\n\t\t\t\"stretchable icons\": {\n\t\t\t\tjs: \"1.6.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-text-fit-padding\": {\n\t\ttype: \"arr
 ay\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"icon-text-fit\": [\n\t\t\t\t\t\"both\",\n\t\t\t\t\t\"width\",\n\t\t\t\t\t\"height\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-image\": {\n\t\ttype: \"resolvedImage\",\n\t\tdoc: \"Name of image in sprite to use for drawing an image background.\",\n\t\ttokens: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functio
 nality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates the icon clockwise.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression
 : {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t{\n\t\t\t\t\"icon-rotation-a
 lignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-offset\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tdoc: \"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-suppo
 rt\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the ico
 n is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the icon is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Part of the icon placed closest to the anchor.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t
 \t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The icon is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The icon is aligned to the plane of the viewport.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"Automatically matches the value of `icon-rotation-alignment`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Orientation of icon when map is pitched.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\
 t},\n\t\"text-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The text is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The text is aligned to the plane of the viewport.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"Automatically matches the value of `text-rotation-alignment`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Orientation of text when map is pitched.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotation-alignme
 nt\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\
 n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-field\": {\n\t\ttype: \"formatted\",\n\t\t\"default\": \"\",\n\t\ttokens: true,\n\t\tdoc: \"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\
 t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-font\": {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\t\"default\": [\n\t\t\t\"Open Sans Regular\",\n\t\t\t\"Arial Unicode MS Regular\"\n\t\t],\n\t\tdoc: \"Font stack to use for displaying text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 16,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Font size.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\
 t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 10,\n\t\tminimum: 0,\n\t\tunits: \"ems\",\n\t\tdoc: \"The maximum line width for text wrapping.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0
 \",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-line-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.2,\n\t\tunits: \"ems\",\n\t\tdoc: \"Text leading value for multi-line text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-letter-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"ems\",\n\t\tdoc: \"Text tracking amount.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.
 10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-justify\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t\tdoc: \"The text is aligned towards the anchor position.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The text is aligned to the left.\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The text is centered.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The text is aligned to the right.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Text justification options.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0
 .10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-radial-offset\": {\n\t\ttype: \"number\",\n\t\tunits: \"ems\",\n\t\t\"default\": 0,\n\t\tdoc: \"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t
 \tmacos: \"0.14.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"property-type\": \"data-driven\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t}\n\t},\n\t\"text-variable-anchor\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the text is placed closest to the anchor.\"\n\t\t\t},
 \n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the text is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\tdoc: \"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dim
 ensional `text-offset`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the text is pl
 aced closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the text is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Part of the text placed closest to the anchor.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-variable-anchor\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tpara
 meters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-angle\": {\n\t\ttype: \"number\",\n\t\t\"default\": 45,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Maximum angle change between adjacent characters.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-writing-mode\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\thorizontal: {\n\t\t\t\tdoc: \"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontal
 ly.\"\n\t\t\t},\n\t\t\tvertical: {\n\t\t\t\tdoc: \"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.3.0\",\n\t\t\t\tandroid: \"8.3.0\",\n\t\t\t\tios: \"5.3.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\
 n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates the text clockwise.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area around the text bounding box used for detecting
  symbol collisions.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"If true, the text may be flipped vertically to prevent it from being rendered upside-down.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"text-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpress
 ion: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-transform\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t\tdoc: \"The text is not altered.\"\n\t\t\t},\n\t\t\tuppercase: {\n\t\t\t\tdoc: \"Forces all letters to be displayed in uppercase.\"\n\t\t\t},\n\t\t\tlowercase: {\n\t\t\t\tdoc: \"Forces all letters to be displayed in lowercase.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\tdoc: \"Specifies how to capitalize text, similar to the CSS `text-transform` property.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tint
 erpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-offset\": {\n\t\ttype: \"array\",\n\t\tdoc: \"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.\",\n\t\tvalue: \"number\",\n\t\tunits: \"ems\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-radial-offset\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\
 ",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, other symbols can be visible even if they collide with the text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\
 t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\
 n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_raster = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_hillshade = {\n\tvi
 sibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar filter = {\n\ttype: \"array\",\n\tvalue: \"*\",\n\tdoc: \"A filter selects specific features from a layer.\"\n};\nvar filter_operator = {\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"==\": {\n\t\t\tdoc: \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n\t\t},\n\t\t\"!=\": {\n\t\t\tdoc: \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n\t\t},\n\t\t\">\": {\n\t\t\tdoc: \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n\t\t},\n\t\t\">=\": {\n\t\t\tdoc:
  \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n\t\t},\n\t\t\"<\": {\n\t\t\tdoc: \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n\t\t},\n\t\t\"<=\": {\n\t\t\tdoc: \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n\t\t},\n\t\t\"in\": {\n\t\t\tdoc: \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n\t\t},\n\t\t\"!in\": {\n\t\t\tdoc: \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n\t\t},\n\t\tall: {\n\t\t\tdoc: \"`[\\\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n\t\t},\n\t\tany: {\n\t\t\tdoc: \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n\t\t},\n\t\tnone: {\n\t\t\tdoc: \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n\t\t},\n\t\thas: {\n\t\t\tdoc: \"`[\\\"has\\\", key]` `feature[key]` exists\"\n\t\t},\n\t\t\"!has\": {\n\t\t\tdoc: \"`[\\\"!has\\\", key]` `feature[key]` does n
 ot exist\"\n\t\t},\n\t\twithin: {\n\t\t\tdoc: \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n\t\t}\n\t},\n\tdoc: \"The filter operator.\"\n};\nvar geometry_type = {\n\ttype: \"enum\",\n\tvalues: {\n\t\tPoint: {\n\t\t\tdoc: \"Filter to point geometries.\"\n\t\t},\n\t\tLineString: {\n\t\t\tdoc: \"Filter to line geometries.\"\n\t\t},\n\t\tPolygon: {\n\t\t\tdoc: \"Filter to polygon geometries.\"\n\t\t}\n\t},\n\tdoc: \"The geometry type for the filter to select.\"\n};\nvar function_stop = {\n\ttype: \"array\",\n\tminimum: 0,\n\tmaximum: 24,\n\tvalue: [\n\t\t\"number\",\n\t\t\"color\"\n\t],\n\tlength: 2,\n\tdoc: \"Zoom level and value pair.\"\n};\nvar expression = {\n\ttype: \"array\",\n\tvalue: \"*\",\n\tminimum: 1,\n\tdoc: \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n};\nvar expression_name = {\n\tdoc: \"\",\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"let\": {\n\t\t\tdoc: \"Binds expressions to named v
 ariables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n\t\t\tgroup: \"Variable binding\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"var\": {\n\t\t\tdoc: \"References variable bound using \\\"let\\\".\",\n\t\t\tgroup: \"Variable binding\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tliteral: {\n\t\t\tdoc: \"Provides a literal array or object value.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tarray: {\n\t\t\tdoc: \
 "Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tat: {\n\t\t\tdoc: \"Retrieves an item from an array.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"in\": {\n\t\t\tdoc: \"Determines whether an item exists in an array or a substring exists in a string.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.6.0\",\n\t\t\t\t\tandroid
 : \"9.1.0\",\n\t\t\t\t\tios: \"5.8.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"index-of\": {\n\t\t\tdoc: \"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.10.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tslice: {\n\t\t\tdoc: \"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.10.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"case\": {\n\t\t\tdoc: \"Selects the first output whose corresponding test condition evaluates to true, or the fallback v
 alue otherwise.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmatch: {\n\t\t\tdoc: \"Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be either:\\n - a single literal value; or\\n - an array of literal values, whose values must be all strings or all numbers (e.g. `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`). The input matches if any of the values in the array matches, similar to the `\\\"in\\\"` operator.\\nEach label must be unique. If the input type does not match the type of the labels, the result will be the fallback value.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n
 \t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcoalesce: {\n\t\t\tdoc: \"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstep: {\n\t\t\tdoc: \"Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\
 t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tinterpolate: {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\\n\\nInterpolation types:\\n- `[\\\"linear\\\"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\\n- `[\\\"exponential\\\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly
 .\\n- `[\\\"cubic-bezier\\\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interpolate-hcl\": {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.49.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interpolate-lab\": {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interp
 olate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.49.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tln2: {\n\t\t\tdoc: \"Returns mathematical constant ln(2).\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tpi: {\n\t\t\tdoc: \"Returns the mathematical constant pi.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\te: {\n\t\t\tdoc: \"Returns the mathematical constant e.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality
 \": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"typeof\": {\n\t\t\tdoc: \"Returns a string describing the type of the given value.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstring: {\n\t\t\tdoc: \"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tnumber: {\n\t\t\tdoc: \"Asserts that the input value is a number. I
 f multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tboolean: {\n\t\t\tdoc: \"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tobject: {\n\t\t\tdoc: \"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object
  is obtained. If none of the inputs are objects, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcollator: {\n\t\t\tdoc: \"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n
 \t\t\t}\n\t\t},\n\t\tformat: {\n\t\t\tdoc: \"Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\\n- `\\\"text-font\\\"`: Overrides the font stack specified by the root layout property.\\n- `\\\"text-color\\\"`: Overrides the color specified by the root paint property.\\n- `\\\"font-scale\\\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"text-font\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"font
 -scale\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"text-color\": {\n\t\t\t\t\tjs: \"1.3.0\",\n\t\t\t\t\tandroid: \"7.3.0\",\n\t\t\t\t\tios: \"4.10.0\",\n\t\t\t\t\tmacos: \"0.14.0\"\n\t\t\t\t},\n\t\t\t\timage: {\n\t\t\t\t\tjs: \"1.6.0\",\n\t\t\t\t\tandroid: \"8.6.0\",\n\t\t\t\t\tios: \"5.7.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\timage: {\n\t\t\tdoc: \"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t
 \t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.4.0\",\n\t\t\t\t\tandroid: \"8.6.0\",\n\t\t\t\t\tios: \"5.7.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"number-format\": {\n\t\t\tdoc: \"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.54.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-string\": {\n\t\t\tdoc: \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a boolean, the result is `\\\"true\\\"` or `\\\"false\\\"`. If the input is a numb
 er, it is converted to a string as specified by the [\\\"NumberToString\\\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\\\"rgba(r,g,b,a)\\\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-number\": {\n\t\t\tdoc: \"Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the 
 input is a string, it is converted to a number as specified by the [\\\"ToNumber Applied to the String Type\\\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-boolean\": {\n\t\t\tdoc: \"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t
 \tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-rgba\": {\n\t\t\tdoc: \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-color\": {\n\t\t\tdoc: \"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trgb: {\n\t\t\tdoc: \"Creates a color value from red, g
 reen, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trgba: {\n\t\t\tdoc: \"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tget: {\n\t\t\tdoc: \"Retrieves a property value from the current feature's properties, or from another object if a second argument is prov
 ided. Returns null if the requested property is missing.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: {\n\t\t\tdoc: \"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlength: {\n\t\t\tdoc: \"Gets the length of an array or string.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tpropert
 ies: {\n\t\t\tdoc: \"Gets the feature properties object.  Note that in some cases, it may be more efficient to use [\\\"get\\\", \\\"property_name\\\"] directly.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"feature-state\": {\n\t\t\tdoc: \"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\\\"feature-state\\\"] can only be used with paint properties that support data-driven styling.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic
  functionality\": {\n\t\t\t\t\tjs: \"0.46.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"geometry-type\": {\n\t\t\tdoc: \"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tid: {\n\t\t\tdoc: \"Gets the feature's id, if it has one.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tzoom: {\n\t\t\tdoc: \"Gets the current zoom level.  Note that in style layout and paint properties, [\\\"zoom\\\"] may only appear as the input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.\",\n\t\t\tgroup
 : \"Zoom\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"heatmap-density\": {\n\t\t\tdoc: \"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.\",\n\t\t\tgroup: \"Heatmap\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"line-progress\": {\n\t\t\tdoc: \"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios
 : \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\taccumulated: {\n\t\t\tdoc: \"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.53.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"+\": {\n\t\t\tdoc: \"Returns the sum of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"*\": {\n\t\t\tdoc: \"Returns the product of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"-\": {\n\t\t\t
 doc: \"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"/\": {\n\t\t\tdoc: \"Returns the result of floating point division of the first input by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"%\": {\n\t\t\tdoc: \"Returns the remainder after integer division of the first input by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.
 0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"^\": {\n\t\t\tdoc: \"Returns the result of raising the first input to the power specified by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsqrt: {\n\t\t\tdoc: \"Returns the square root of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlog10: {\n\t\t\tdoc: \"Returns the base-ten logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\
 t\t},\n\t\tln: {\n\t\t\tdoc: \"Returns the natural logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlog2: {\n\t\t\tdoc: \"Returns the base-two logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsin: {\n\t\t\tdoc: \"Returns the sine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcos: {\n\t\t\tdoc: \"Returns the cosine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-supp
 ort\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttan: {\n\t\t\tdoc: \"Returns the tangent of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasin: {\n\t\t\tdoc: \"Returns the arcsine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tacos: {\n\t\t\tdoc: \"Returns the arccosine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.
 0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tatan: {\n\t\t\tdoc: \"Returns the arctangent of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmin: {\n\t\t\tdoc: \"Returns the minimum value of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmax: {\n\t\t\tdoc: \"Returns the maximum value of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tround: {\n\t\t\tdoc: \"Rounds the input t
 o the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tabs: {\n\t\t\tdoc: \"Returns the absolute value of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tceil: {\n\t\t\tdoc: \"Returns the smallest integer that is greater than or equal to the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfloor: {\n\t\t\
 tdoc: \"Returns the largest integer that is less than or equal to the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdistance: {\n\t\t\tdoc: \"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\t\tios: \"5.9.0\",\n\t\t\t\t\tmacos: \"0.16.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"==\": {\n\t\t\tdoc: \"Returns `true` if the input values 
 are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"!=\": {\n\t\t\tdoc: \"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid a
 nd will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\">\": {\n\t\t\tdoc: \"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision
 \",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"<\": {\n\t\t\tdoc: \"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\"
 ,\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\">=\": {\n\t\t\tdoc: \"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2
 .0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"<=\": {\n\t\t\tdoc: \"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tall: {\n\t\t\tdoc: \"Returns `true` if all the inputs are `true`, `false` othe
 rwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tany: {\n\t\t\tdoc: \"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"!\": {\n\t\t\tdoc: \"Logical negation. Returns `
 true` if the input is `false`, and `false` if the input is `true`.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\twithin: {\n\t\t\tdoc: \"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.9.0\",\n\t\t\t\t\tandroid: \"9.1.0\",\n\t\t
 \t\t\tios: \"5.8.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"is-supported-script\": {\n\t\t\tdoc: \"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.6.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupcase: {\n\t\t\tdoc: \"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\
 tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdowncase: {\n\t\t\tdoc: \"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tconcat: {\n\t\t\tdoc: \"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"resolved-locale\": {\n\t\t\tdoc: \"Returns the IETF language tag of the locale being used 
 by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nvar light = {\n\tanchor: {\n\t\ttype: \"enum\",\n\t\t\"default\": \"viewport\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The position of the light source is aligned to the rotation of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The position of the light source is aligned to the rotation of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"Whether extruded geometries are lit relative to the map or viewport.\",\n\t\texample: 
 \"map\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tposition: {\n\t\ttype: \"array\",\n\t\t\"default\": [\n\t\t\t1.15,\n\t\t\t210,\n\t\t\t30\n\t\t],\n\t\tlength: 3,\n\t\tvalue: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of
  the light (from 0°, directly above, to 180°, directly below).\",\n\t\texample: [\n\t\t\t1.5,\n\t\t\t90,\n\t\t\t80\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tcolor: {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Color tint for lighting extruded geometries.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tintensity: {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t
 \t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t}\n};\nvar paint = [\n\t\"paint_fill\",\n\t\"paint_line\",\n\t\"paint_circle\",\n\t\"paint_heatmap\",\n\t\"paint_fill-extrusion\",\n\t\"paint_symbol\",\n\t\"paint_raster\",\n\t\"paint_hillshade\",\n\t\"paint_background\"\n];\nvar paint_fill = {\n\t\"fill-antialias\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"Whether or not the fill should be antialiased.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom
 \"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The color of the filled
  part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.19.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-outline-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t
 \t\t\t\"!\": \"fill-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"fill-antialias\": true\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.19.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\"
 ,\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The fill is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The fill is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `fill-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-pat
 tern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t}\n};\nvar paint_line = {\n\t\"line-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the line will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmax
 imum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The color with which the line will be drawn.\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": 
 {\n\t\t\t\tjs: \"0.23.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-translate-anchor\": {\n\t\ttype: \"enum\",\n\t
 \tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The line is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The line is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `line-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"line-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Stroke thickness.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0
 .1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-gap-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tdoc: \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\
 tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-offset\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.\",\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.12.1\",\n\t\t\t\tandroid: \"3.0.0\",\n\t\t\t\tios: \"3.1.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-sta
 te\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Blur applied to the line, in pixels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-dasharray\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tdoc: \"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To con
 vert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"line widths\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded\"\n\t},\n\t\"line-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of t
 wo (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"line-gradient\": {\n\t\ttype: \"color\",\n\t\tdoc: \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-dasharray\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tsource: \"ge
 ojson\",\n\t\t\t\thas: {\n\t\t\t\t\tlineMetrics: true\n\t\t\t\t}\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.45.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tios: \"4.4.0\",\n\t\t\t\tmacos: \"0.11.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"line-progress\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t}\n};\nvar paint_circle = {\n\t\"circle-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 5,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Circle radius.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.18.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {
 \n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The fill color of the circle.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.18.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Amount to blur the circle. 1 blurs the circle such that only the cen
 terpoint is full opacity.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.20.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the circle will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.20.0\"
 ,\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tma
 p: {\n\t\t\t\tdoc: \"The circle is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The circle is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `circle-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"circle-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-scale\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"Circles are scaled according to their apparent distance to the camera.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Circles are not scaled.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\tdoc: \"Controls the scaling behavior of the
  circle when the map is pitched.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The circle is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The circle is aligned to the plane of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\tdoc: \"Orientation of circle when map is pitched.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n
 \t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-stroke-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The stroke color of the circle.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\
 n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity of the circle's stroke.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\
 "\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t}\n};\nvar paint_heatmap = {\n\t\"heatmap-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 30,\n\t\tminimum: 1,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\
 t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-weight\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tdoc: \"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-intensity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransi
 tion: true,\n\t\tdoc: \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"heatmap-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": [\n\t\t\t\"interpolate\",\n\t\t\t[\n\t\t\t\t\"linear\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"heatmap-density\"\n\t\t\t],\n\t\t\t0,\n\t\t\t\"rgba(0, 0, 255, 0)\",\n\t\t\t0.1,\n\t\t\t\"royalblue\",\n\t\t\t0.3,\n\t\t\t\"cyan\",\n\t\t\t0.5,\n\t\t\t\"lime\",\n\t\t\t0.7,\n\t\t\t\"yellow\",\n\t\t\t1,\n\t\t\t\"red\"\n\t\t],\n\t\tdoc: \"Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `[\\
 \"heatmap-density\\\"]` as input.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"heatmap-density\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t},\n\t\"heatmap-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The global opacity at which the heatmap layer will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_symbol 
 = {\n\t\"icon-opacity\": {\n\t\tdoc: \"The opacity at which the icon will be drawn.\",\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the icon. This can only be used with sdf icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-supp
 ort\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the icon's halo. Icon halos can only be used with SDF icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\
 t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance of halo to the icon outline.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n
 \t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Fade out the halo towards the outside.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\
 t\tdoc: \"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"Icons are translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Icons are translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `icon-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"icon-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t
 \t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the text will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\
 n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The color with which the text will be drawn.\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\toverridable: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the text's halo, which helps it stand out f
 rom backgrounds.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios
 : \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The halo's fadeout distance towards the outside.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\
 t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\td
 oc: \"The text is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The text is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `text-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"text-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_raster = {\n\t\"raster-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the image will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t
 \tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-hue-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\ttransition: true,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates hues around the color wheel.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-min\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"
 basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-max\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-saturation\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the saturation of the image.\",\n\t\t\"default\": 0,\n\
 t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-contrast\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the contrast of the image.\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-resampling\": {\n\t\ttype: \"enum\",\n\t\tdoc: \"The resampling/interpolation me
 thod to use for overscaling, also known as texture magnification filter\",\n\t\tvalues: {\n\t\t\tlinear: {\n\t\t\t\tdoc: \"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled\"\n\t\t\t},\n\t\t\tnearest: {\n\t\t\t\tdoc: \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"linear\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.47.0\",\n\t\t\t\tandroid: \"6.3.0\",\n\t\t\t\tios: \"4.2.0\",\n\t\t\t\tmacos: \"0.9.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-fade-duration\": {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tunits: \"mill
 iseconds\",\n\t\tdoc: \"Fade duration when a new tile is added.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_hillshade = {\n\t\"hillshade-illumination-direction\": {\n\t\ttype: \"number\",\n\t\t\"default\": 335,\n\t\tminimum: 0,\n\t\tmaximum: 359,\n\t\tdoc: \"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t
 expression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-illumination-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The hillshade illumination is relative to the north direction.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The hillshade illumination is relative to the top of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\tdoc: \"Direction of light source when map is rotated.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-exaggeration\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Intensity of the hillshade\",\n\t\t\"default\": 0.5,\n\t\
 tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-shadow-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The shading color of areas that face away from the light source.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-highlight-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#FFFFFF\",\n\t\td
 oc: \"The shading color of areas that faces towards the light source.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-accent-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_background = {\n\t\"b
 ackground-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The color with which the background will be drawn.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"background-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"background-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t
 \t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded\"\n\t},\n\t\"background-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity at which the background will be drawn.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar transition = {\n\tduration: {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Time allotted for transitions to complete
 .\"\n\t},\n\tdelay: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Length of time before a transition begins.\"\n\t}\n};\nvar promoteId = {\n\t\"*\": {\n\t\ttype: \"string\",\n\t\tdoc: \"A name of a feature property to use as ID for feature state.\"\n\t}\n};\nvar v8 = {\n\t$version: $version,\n\t$root: $root,\n\tsources: sources,\n\tsource: source,\n\tsource_vector: source_vector,\n\tsource_raster: source_raster,\n\tsource_raster_dem: source_raster_dem,\n\tsource_geojson: source_geojson,\n\tsource_video: source_video,\n\tsource_image: source_image,\n\tlayer: layer,\n\tlayout: layout,\n\tlayout_background: layout_background,\n\tlayout_fill: layout_fill,\n\tlayout_circle: layout_circle,\n\tlayout_heatmap: layout_heatmap,\n\t\"layout_fill-extrusion\": {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\
 t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n},\n\tlayout_line: layout_line,\n\tlayout_symbol: layout_symbol,\n\tlayout_raster: layout_raster,\n\tlayout_hillshade: layout_hillshade,\n\tfilter: filter,\n\tfilter_operator: filter_operator,\n\tgeometry_type: geometry_type,\n\t\"function\": {\n\texpression: {\n\t\ttype: \"expression\",\n\t\tdoc: \"An expression.\"\n\t},\n\tstops: {\n\t\ttype: \"array\",\n\t\tdoc: \"An array of stops.\",\n\t\tvalue: \"function_stop\"\n\t},\n\tbase: {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tdoc: \"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of
  the range. With `1` the stops are interpolated linearly.\"\n\t},\n\tproperty: {\n\t\ttype: \"string\",\n\t\tdoc: \"The name of a feature property to use as the function input.\",\n\t\t\"default\": \"$zoom\"\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tidentity: {\n\t\t\t\tdoc: \"Return the input value as the output value.\"\n\t\t\t},\n\t\t\texponential: {\n\t\t\t\tdoc: \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n\t\t\t},\n\t\t\tinterval: {\n\t\t\t\tdoc: \"Return the output value of the stop just less than the function input.\"\n\t\t\t},\n\t\t\tcategorical: {\n\t\t\t\tdoc: \"Return the output value of the stop equal to the function input.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The interpolation strategy to use in function evaluation.\",\n\t\t\"default\": \"exponential\"\n\t},\n\tcolorSpace: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\trgb: {\n\t\t\t\tdoc: \"Use the RGB color space to interpolate color values\
 "\n\t\t\t},\n\t\t\tlab: {\n\t\t\t\tdoc: \"Use the LAB color space to interpolate color values.\"\n\t\t\t},\n\t\t\thcl: {\n\t\t\t\tdoc: \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.\",\n\t\t\"default\": \"rgb\"\n\t},\n\t\"default\": {\n\t\ttype: \"*\",\n\t\trequired: false,\n\t\tdoc: \"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified proper
 ty.\\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\nIf no default is provided, the style property's default is used in these circumstances.\"\n\t}\n},\n\tfunction_stop: function_stop,\n\texpression: expression,\n\texpression_name: expression_name,\n\tlight: light,\n\tpaint: paint,\n\tpaint_fill: paint_fill,\n\t\"paint_fill-extrusion\": {\n\t\"fill-extrusion-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t
 \tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-extrusion-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs
 : \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-translate-anchor\":
  {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The fill extrusion is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The fill extrusion is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `fill-extrusion-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-extrusion-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ...,
  512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"fill-extrusion-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\tdoc: \"The height with which to extrude this layer.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-dri
 ven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-base\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\tdoc: \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"fill-extrusion-height\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texp
 ression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-vertical-gradient\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.50.0\",\n\t\t\t\tios: \"4.7.0\",\n\t\t\t\tmacos: \"0.13.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n},\n\tpaint_line: paint_line,\n\tpaint_circle: paint_circle,\n\tpaint_heatmap: paint_heatmap,\n\tpaint_symbol: paint_symbol,\n\tpaint_raster: paint_raster,\n\tpaint_hillshade: paint_hillshade,\n\tpaint_background: paint_background,\n\ttr
 ansition: transition,\n\t\"property-type\": {\n\t\"data-driven\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is interpolable and can be represented using a property expression.\"\n\t},\n\t\"cross-faded\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms.\"\n\t},\n\t\"cross-faded-data-driven\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression.\"\n\t},\n\t\"color-ramp\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n\t},\n\t\"data-constant\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is interpolable but cannot be represented using a property expression.\"\n\t},\n\tconstant: {\n
 \t\ttype: \"property-type\",\n\t\tdoc: \"Property is constant across all zoom levels and property values.\"\n\t}\n},\n\tpromoteId: promoteId\n};\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nvar stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nvar jsonStringifyPrettyCompact = function stringify(passedObj, options) {\n  var indent, maxLength, replacer;\n\n  options = options || {};\n  indent = JSON.stringify(\n    [1],\n    undefined,\n    options.indent === undefined ? 2 : options.indent\n  ).slice(2, -3);\n  maxLength =\n    indent === \"\"\n      ? Infinity\n      : options.maxLength === undefined\n      ? 80\n      : options.maxLength;\n  replacer = options.replacer;\n\n  return (function _stringify(obj, currentIndent, rese
 rved) {\n    // prettier-ignore\n    var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;\n\n    if (obj && typeof obj.toJSON === \"function\") {\n      obj = obj.toJSON();\n    }\n\n    string = JSON.stringify(obj, replacer);\n\n    if (string === undefined) {\n      return string;\n    }\n\n    length = maxLength - currentIndent.length - reserved;\n\n    if (string.length <= length) {\n      prettified = string.replace(stringOrChar, function(match, stringLiteral) {\n        return stringLiteral || match + \" \";\n      });\n      if (prettified.length <= length) {\n        return prettified;\n      }\n    }\n\n    if (replacer != null) {\n      obj = JSON.parse(string);\n      replacer = undefined;\n    }\n\n    if (typeof obj === \"object\" && obj !== null) {\n      nextIndent = currentIndent + indent;\n      items = [];\n      index = 0;\n\n      if (Array.isArray(obj)) {\n        start = \"[\";\n        end = \"]\";\n        length = 
 obj.length;\n        for (; index < length; index++) {\n          items.push(\n            _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n              \"null\"\n          );\n        }\n      } else {\n        start = \"{\";\n        end = \"}\";\n        keys = Object.keys(obj);\n        length = keys.length;\n        for (; index < length; index++) {\n          key = keys[index];\n          keyPart = JSON.stringify(key) + \": \";\n          value = _stringify(\n            obj[key],\n            nextIndent,\n            keyPart.length + (index === length - 1 ? 0 : 1)\n          );\n          if (value !== undefined) {\n            items.push(keyPart + value);\n          }\n        }\n      }\n\n      if (items.length > 0) {\n        return [start, indent + items.join(\",\\n\" + nextIndent), end].join(\n          \"\\n\" + currentIndent\n        );\n      }\n    }\n\n    return string;\n  })(passedObj, \"\", 0);\n};\n\nfunction sortKeysBy(obj, reference) {\n 
    var result = {};\n    for (var key in reference) {\n        if (obj[key] !== undefined) {\n            result[key] = obj[key];\n        }\n    }\n    for (var key$1 in obj) {\n        if (result[key$1] === undefined) {\n            result[key$1] = obj[key$1];\n        }\n    }\n    return result;\n}\nfunction format(style, space) {\n    if (space === void 0)\n        space = 2;\n    style = sortKeysBy(style, v8.$root);\n    if (style.layers) {\n        style.layers = style.layers.map(function (layer) {\n            return sortKeysBy(layer, v8.layer);\n        });\n    }\n    return jsonStringifyPrettyCompact(style, { indent: space });\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');\n}\n\nfunction createComm
 onjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar punycode = createCommonjsModule(function (module, exports) {\n(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports =  exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule =  module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/**
  Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility f
 unction.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be p
 unycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(strin
 g) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} cod
 ePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\tre
 turn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction a
 dapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;
 \n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, t
 hen subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\
 t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);
 \n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n &
 & currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\
 t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, fu
 nction(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the cu
 rrent Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key
 ] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(commonjsGlobal));\n});\n\nvar util = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar decode = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n
   var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean
 ':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nvar encode = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) { return ''; }\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar querystring = createCommonjsModule(function (module, exports) {\n\nexports.decode = exports.parse = decode;\nexports.encode = ex
 ports.stringify = encode;\n});\nvar querystring_1 = querystring.decode;\nvar querystring_2 = querystring.parse;\nvar querystring_3 = querystring.encode;\nvar querystring_4 = querystring.stringify;\n\nvar parse = urlParse;\nvar resolve = urlResolve;\nvar resolveObject = urlResolveObject;\nvar format$1 = urlFormat;\n\nvar Url_1 = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters r
 eserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // prot
 ocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    };\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) { return url; }\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: http
 s://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (pars
 eQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user at server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If th
 ere is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a at b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        { hostEnd = hec; }\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n 
    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c at d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        { hostEnd = hec; }\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      { hostEnd = rest.length; }\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n  
   // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) { continue; }\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];
 \n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-
 ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        { continue; }\n    
   var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) { this.pathname = rest; }\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n   
  var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) { obj = urlParse(obj); }\n  if (!(obj instanceof Url)) { return Url.prototype.format.call(obj); }\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.
 hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') { protocol += ':'; }\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') { pathname = '/' + pathname; }\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') { hash = '#' + hash; }\n  if (search && search.charAt(0) !== '?') { search = '?' + search; }\n\n  pathname =
  pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) { return relative; }\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\
 " will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        { result[rkey] = relative[rkey]; }\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the
  protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift())){ }\n      if (!relative.host) { relative.host = ''; }\n      if (!relative.hostname) { relative.hostname = ''; }\n      if (relPath[0] !== '') { relPath.unshift(''); }\n     
  if (relPath.length < 2) { relPath.unshift(''); }\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && re
 lative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') { srcPath[0] = result.host; }\n      else { srcPath.unshift(result.host); }\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') { relPath[0] = relative.host; }\n        else { relPath.unshift(relative.ho
 st); }\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) { srcPath = []; }\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after
  the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1 at domain1', 'local2 at domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at al
 l.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    }
  else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1 at domain1', 'local2 at domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n        
              result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !=
 = ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) { this.hostname = host; }\n};\n\nvar url = {\n\tparse: parse,\n\tresolve: resolve,\n\tresolveObject: resolveObject,\n\tformat: format$1,\n\tUrl: Url_1\n};\n\nfunction getPropertyReference(propertyName) {\n    for (var i = 0; i < v8.layout.length; i++) {\n        for (var key in v8[v8.layout[i]]) {\n            if (key === propertyName) {\n                return v8[v8.layout[i]][key];\n            }\n        }\n    }\n    for (var i$1 = 0; i$1 < v8.paint.length; i$1++) {\n        for (var key$1 in v8[v8.paint[i$1]]) {\n            if (key$1 === propertyName) {\n                return v8[v8.paint[i$1]][key$1];\n            }\n        }\n    }\n    return null;\n}\nfunction eachSource(style, callback) {\n    for (var k in style.sources) {\n        callback(style.sources[k]);\n    }\n}\nfunction eachLayer(style, callback) {\n    for (var i = 0, list = style.layers;
  i < list.length; i += 1) {\n        var layer = list[i];\n        callback(layer);\n    }\n}\nfunction eachProperty(style, options, callback) {\n    function inner(layer, propertyType) {\n        var properties = layer[propertyType];\n        if (!properties) {\n            return;\n        }\n        Object.keys(properties).forEach(function (key) {\n            callback({\n                path: [\n                    layer.id,\n                    propertyType,\n                    key\n                ],\n                key: key,\n                value: properties[key],\n                reference: getPropertyReference(key),\n                set: function set(x) {\n                    properties[key] = x;\n                }\n            });\n        });\n    }\n    eachLayer(style, function (layer) {\n        if (options.paint) {\n            inner(layer, 'paint');\n        }\n        if (options.layout) {\n            inner(layer, 'layout');\n        }\n    });\n}\n\nfunction ea
 chLayout(layer, callback) {\n    for (var k in layer) {\n        if (k.indexOf('layout') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\nfunction eachPaint(layer, callback) {\n    for (var k in layer) {\n        if (k.indexOf('paint') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\nfunction resolveConstant(style, value) {\n    if (typeof value === 'string' && value[0] === '@') {\n        return resolveConstant(style, style.constants[value]);\n    } else {\n        return value;\n    }\n}\nfunction isFunction(value) {\n    return Array.isArray(value.stops);\n}\nfunction renameProperty(obj, from, to) {\n    obj[to] = obj[from];\n    delete obj[from];\n}\nfunction migrateToV8 (style) {\n    style.version = 8;\n    eachSource(style, function (source) {\n        if (source.type === 'video' && source.url !== undefined) {\n            renameProperty(source, 'url', 'urls');\n        }\n        if (source.type === 'video') {\n            source.coordinat
 es.forEach(function (coord) {\n                return coord.reverse();\n            });\n        }\n    });\n    eachLayer(style, function (layer) {\n        eachLayout(layer, function (layout) {\n            if (layout['symbol-min-distance'] !== undefined) {\n                renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n            }\n        });\n        eachPaint(layer, function (paint) {\n            if (paint['background-image'] !== undefined) {\n                renameProperty(paint, 'background-image', 'background-pattern');\n            }\n            if (paint['line-image'] !== undefined) {\n                renameProperty(paint, 'line-image', 'line-pattern');\n            }\n            if (paint['fill-image'] !== undefined) {\n                renameProperty(paint, 'fill-image', 'fill-pattern');\n            }\n        });\n    });\n    eachProperty(style, {\n        paint: true,\n        layout: true\n    }, function (property) {\n        var value = res
 olveConstant(style, property.value);\n        if (isFunction(value)) {\n            value.stops.forEach(function (stop) {\n                stop[1] = resolveConstant(style, stop[1]);\n            });\n        }\n        property.set(value);\n    });\n    delete style.constants;\n    eachLayer(style, function (layer) {\n        eachLayout(layer, function (layout) {\n            delete layout['text-max-size'];\n            delete layout['icon-max-size'];\n        });\n        eachPaint(layer, function (paint) {\n            if (paint['text-size']) {\n                if (!layer.layout) {\n                    layer.layout = {};\n                }\n                layer.layout['text-size'] = paint['text-size'];\n                delete paint['text-size'];\n            }\n            if (paint['icon-size']) {\n                if (!layer.layout) {\n                    layer.layout = {};\n                }\n                layer.layout['icon-size'] = paint['icon-size'];\n                delet
 e paint['icon-size'];\n            }\n        });\n    });\n    function migrateFontstackURL(input) {\n        var inputParsed = url.parse(input);\n        var inputPathnameParts = inputParsed.pathname.split('/');\n        if (inputParsed.protocol !== 'mapbox:') {\n            return input;\n        } else if (inputParsed.hostname === 'fontstack') {\n            return 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf';\n        } else if (inputParsed.hostname === 'fonts') {\n            return 'mapbox://fonts/' + inputPathnameParts[2] + '/{fontstack}/{range}.pbf';\n        }\n    }\n    if (style.glyphs) {\n        style.glyphs = migrateFontstackURL(style.glyphs);\n    }\n    function migrateFontStack(font) {\n        function splitAndTrim(string) {\n            return string.split(',').map(function (s) {\n                return s.trim();\n            });\n        }\n        if (Array.isArray(font)) {\n            return font;\n        } else if (typeof font === 'string') {\n         
    return splitAndTrim(font);\n        } else if (typeof font === 'object') {\n            font.stops.forEach(function (stop) {\n                stop[1] = splitAndTrim(stop[1]);\n            });\n            return font;\n        } else {\n            throw new Error('unexpected font value');\n        }\n    }\n    eachLayer(style, function (layer) {\n        eachLayout(layer, function (layout) {\n            if (layout['text-font']) {\n                layout['text-font'] = migrateFontStack(layout['text-font']);\n            }\n        });\n    });\n    var firstSymbolLayer = 0;\n    for (var i = style.layers.length - 1; i >= 0; i--) {\n        var layer = style.layers[i];\n        if (layer.type !== 'symbol') {\n            firstSymbolLayer = i + 1;\n            break;\n        }\n    }\n    var symbolLayers = style.layers.splice(firstSymbolLayer);\n    symbolLayers.reverse();\n    style.layers = style.layers.concat(symbolLayers);\n    return style;\n}\n\nfunction extend (output) {
 \n    var inputs = [], len = arguments.length - 1;\n    while (len-- > 0)\n        inputs[len] = arguments[len + 1];\n    for (var i = 0, list = inputs; i < list.length; i += 1) {\n        var input = list[i];\n        for (var k in input) {\n            output[k] = input[k];\n        }\n    }\n    return output;\n}\n\nvar ParsingError = function (Error) {\n    function ParsingError(key, message) {\n        Error.call(this, message);\n        this.message = message;\n        this.key = key;\n    }\n    if (Error)\n        ParsingError.__proto__ = Error;\n    ParsingError.prototype = Object.create(Error && Error.prototype);\n    ParsingError.prototype.constructor = ParsingError;\n    return ParsingError;\n}(Error);\n\nvar Scope = function Scope(parent, bindings) {\n    if (bindings === void 0)\n        bindings = [];\n    this.parent = parent;\n    this.bindings = {};\n    for (var i = 0, list = bindings; i < list.length; i += 1) {\n        var ref = list[i];\n        var name = ref[
 0];\n        var expression = ref[1];\n        this.bindings[name] = expression;\n    }\n};\nScope.prototype.concat = function concat(bindings) {\n    return new Scope(this, bindings);\n};\nScope.prototype.get = function get(name) {\n    if (this.bindings[name]) {\n        return this.bindings[name];\n    }\n    if (this.parent) {\n        return this.parent.get(name);\n    }\n    throw new Error(name + ' not found in scope.');\n};\nScope.prototype.has = function has(name) {\n    if (this.bindings[name]) {\n        return true;\n    }\n    return this.parent ? this.parent.has(name) : false;\n};\n\nvar NullType = { kind: 'null' };\nvar NumberType = { kind: 'number' };\nvar StringType = { kind: 'string' };\nvar BooleanType = { kind: 'boolean' };\nvar ColorType = { kind: 'color' };\nvar ObjectType = { kind: 'object' };\nvar ValueType = { kind: 'value' };\nvar ErrorType = { kind: 'error' };\nvar CollatorType = { kind: 'collator' };\nvar FormattedType = { kind: 'formatted' };\nvar Resolv
 edImageType = { kind: 'resolvedImage' };\nfunction array(itemType, N) {\n    return {\n        kind: 'array',\n        itemType: itemType,\n        N: N\n    };\n}\nfunction toString(type) {\n    if (type.kind === 'array') {\n        var itemType = toString(type.itemType);\n        return typeof type.N === 'number' ? 'array<' + itemType + ', ' + type.N + '>' : type.itemType.kind === 'value' ? 'array' : 'array<' + itemType + '>';\n    } else {\n        return type.kind;\n    }\n}\nvar valueMemberTypes = [\n    NullType,\n    NumberType,\n    StringType,\n    BooleanType,\n    ColorType,\n    FormattedType,\n    ObjectType,\n    array(ValueType),\n    ResolvedImageType\n];\nfunction checkSubtype(expected, t) {\n    if (t.kind === 'error') {\n        return null;\n    } else if (expected.kind === 'array') {\n        if (t.kind === 'array' && (t.N === 0 && t.itemType.kind === 'value' || !checkSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== 'number' || expected.N === t.
 N)) {\n            return null;\n        }\n    } else if (expected.kind === t.kind) {\n        return null;\n    } else if (expected.kind === 'value') {\n        for (var i = 0, list = valueMemberTypes; i < list.length; i += 1) {\n            var memberType = list[i];\n            if (!checkSubtype(memberType, t)) {\n                return null;\n            }\n        }\n    }\n    return 'Expected ' + toString(expected) + ' but found ' + toString(t) + ' instead.';\n}\nfunction isValidType(provided, allowedTypes) {\n    return allowedTypes.some(function (t) {\n        return t.kind === provided.kind;\n    });\n}\nfunction isValidNativeType(provided, allowedTypes) {\n    return allowedTypes.some(function (t) {\n        if (t === 'null') {\n            return provided === null;\n        } else if (t === 'array') {\n            return Array.isArray(provided);\n        } else if (t === 'object') {\n            return provided && !Array.isArray(provided) && typeof provided === 'object'
 ;\n        } else {\n            return t === typeof provided;\n        }\n    });\n}\n\nvar csscolorparser = createCommonjsModule(function (module, exports) {\n// (c) Dean McNamee <dean at gmail.com>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRAN
 TIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n  \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n  \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n  \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n  \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n  \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n  \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n  \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n  \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n  \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n  \"cornflowerblue
 \": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n  \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n  \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n  \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n  \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n  \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n  \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n  \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n  \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n  \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n  \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n  \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n  \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n  \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n  \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n  \"forestgreen\": [34,139,34
 ,1], \"fuchsia\": [255,0,255,1],\n  \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n  \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n  \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n  \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n  \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n  \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n  \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n  \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n  \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n  \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n  \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n  \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n  \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n  \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n  \"lightskyblue\": [135,206,250,1], \"lightsl
 ategray\": [119,136,153,1],\n  \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n  \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n  \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n  \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n  \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n  \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n  \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n  \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n  \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n  \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n  \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n  \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n  \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n  \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n  \"orchid\": [218,112,214,1], \"
 palegoldenrod\": [238,232,170,1],\n  \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n  \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n  \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n  \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n  \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n  \"rebeccapurple\": [102,51,153,1],\n  \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n  \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n  \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n  \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n  \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n  \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n  \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n  \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n  \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n  \"teal\": [0,128,128,1], \"thistle\"
 : [216,191,216,1],\n  \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n  \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n  \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n  \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]};\n\nfunction clamp_css_byte(i) {  // Clamp to integer 0 .. 255.\n  i = Math.round(i);  // Seems to be what Chrome does (vs truncation).\n  return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) {  // Clamp to float 0.0 .. 1.0.\n  return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) {  // int or percentage.\n  if (str[str.length - 1] === '%')\n    { return clamp_css_byte(parseFloat(str) / 100 * 255); }\n  return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) {  // float or percentage.\n  if (str[str.length - 1] === '%')\n    { return clamp_css_float(parseFloat(str) / 100); }\n  return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n  if (h <
  0) { h += 1; }\n  else if (h > 1) { h -= 1; }\n\n  if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; }\n  if (h * 2 < 1) { return m2; }\n  if (h * 3 < 2) { return m1 + (m2 - m1) * (2/3 - h) * 6; }\n  return m1;\n}\n\nfunction parseCSSColor(css_str) {\n  // Remove all whitespace, not compliant, but should just be more accepting.\n  var str = css_str.replace(/ /g, '').toLowerCase();\n\n  // Color keywords (and transparent) lookup.\n  if (str in kCSSColorTable) { return kCSSColorTable[str].slice(); }  // dup.\n\n  // #abc and #abc123 syntax.\n  if (str[0] === '#') {\n    if (str.length === 4) {\n      var iv = parseInt(str.substr(1), 16);  // TODO(deanm): Stricter parsing.\n      if (!(iv >= 0 && iv <= 0xfff)) { return null; }  // Covers NaN.\n      return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n              (iv & 0xf0) | ((iv & 0xf0) >> 4),\n              (iv & 0xf) | ((iv & 0xf) << 4),\n              1];\n    } else if (str.length === 7) {\n      var iv = parseInt(str.substr(1),
  16);  // TODO(deanm): Stricter parsing.\n      if (!(iv >= 0 && iv <= 0xffffff)) { return null; }  // Covers NaN.\n      return [(iv & 0xff0000) >> 16,\n              (iv & 0xff00) >> 8,\n              iv & 0xff,\n              1];\n    }\n\n    return null;\n  }\n\n  var op = str.indexOf('('), ep = str.indexOf(')');\n  if (op !== -1 && ep + 1 === str.length) {\n    var fname = str.substr(0, op);\n    var params = str.substr(op+1, ep-(op+1)).split(',');\n    var alpha = 1;  // To allow case fallthrough.\n    switch (fname) {\n      case 'rgba':\n        if (params.length !== 4) { return null; }\n        alpha = parse_css_float(params.pop());\n        // Fall through.\n      case 'rgb':\n        if (params.length !== 3) { return null; }\n        return [parse_css_int(params[0]),\n                parse_css_int(params[1]),\n                parse_css_int(params[2]),\n                alpha];\n      case 'hsla':\n        if (params.length !== 4) { return null; }\n        alpha = parse_cs
 s_float(params.pop());\n        // Fall through.\n      case 'hsl':\n        if (params.length !== 3) { return null; }\n        var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360;  // 0 .. 1\n        // NOTE(deanm): According to the CSS spec s/l should only be\n        // percentages, but we don't bother and let float or percentage.\n        var s = parse_css_float(params[1]);\n        var l = parse_css_float(params[2]);\n        var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n        var m1 = l * 2 - m2;\n        return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n                clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n                clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n                alpha];\n      default:\n        return null;\n    }\n  }\n\n  return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor; } catch(e) { }\n});\nvar csscolorparser_1 = csscolorparser.parseCSSColor;\n\nvar Color = function Color(r, g, b, a) {\n    if
  (a === void 0)\n        a = 1;\n    this.r = r;\n    this.g = g;\n    this.b = b;\n    this.a = a;\n};\nColor.parse = function parse(input) {\n    if (!input) {\n        return undefined;\n    }\n    if (input instanceof Color) {\n        return input;\n    }\n    if (typeof input !== 'string') {\n        return undefined;\n    }\n    var rgba = csscolorparser_1(input);\n    if (!rgba) {\n        return undefined;\n    }\n    return new Color(rgba[0] / 255 * rgba[3], rgba[1] / 255 * rgba[3], rgba[2] / 255 * rgba[3], rgba[3]);\n};\nColor.prototype.toString = function toString() {\n    var ref = this.toArray();\n    var r = ref[0];\n    var g = ref[1];\n    var b = ref[2];\n    var a = ref[3];\n    return 'rgba(' + Math.round(r) + ',' + Math.round(g) + ',' + Math.round(b) + ',' + a + ')';\n};\nColor.prototype.toArray = function toArray() {\n    var ref = this;\n    var r = ref.r;\n    var g = ref.g;\n    var b = ref.b;\n    var a = ref.a;\n    return a === 0 ? [\n        0,\n        
 0,\n        0,\n        0\n    ] : [\n        r * 255 / a,\n        g * 255 / a,\n        b * 255 / a,\n        a\n    ];\n};\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\n\nvar Collator = function Collator(caseSensitive, diacriticSensitive, locale) {\n    if (caseSensitive) {\n        this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n    } else {\n        this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n    }\n    this.locale = locale;\n    this.collator = new Intl.Collator(this.locale ? this.locale : [], {\n        sensitivity: this.sensitivity,\n        usage: 'search'\n    });\n};\nCollator.prototype.compare = function compare(lhs, rhs) {\n    return this.collator.compare(lhs, rhs);\n};\nCollator.prototype.resolvedLocale = function resolvedLocale() {\n    return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;\n};\n\nvar 
 FormattedSection = function FormattedSection(text, image, scale, fontStack, textColor) {\n    this.text = text;\n    this.image = image;\n    this.scale = scale;\n    this.fontStack = fontStack;\n    this.textColor = textColor;\n};\nvar Formatted = function Formatted(sections) {\n    this.sections = sections;\n};\nFormatted.fromString = function fromString(unformatted) {\n    return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n};\nFormatted.prototype.isEmpty = function isEmpty() {\n    if (this.sections.length === 0) {\n        return true;\n    }\n    return !this.sections.some(function (section) {\n        return section.text.length !== 0 || section.image && section.image.name.length !== 0;\n    });\n};\nFormatted.factory = function factory(text) {\n    if (text instanceof Formatted) {\n        return text;\n    } else {\n        return Formatted.fromString(text);\n    }\n};\nFormatted.prototype.toString = function toString() {\n    if (this.section
 s.length === 0) {\n        return '';\n    }\n    return this.sections.map(function (section) {\n        return section.text;\n    }).join('');\n};\nFormatted.prototype.serialize = function serialize() {\n    var serialized = ['format'];\n    for (var i = 0, list = this.sections; i < list.length; i += 1) {\n        var section = list[i];\n        if (section.image) {\n            serialized.push([\n                'image',\n                section.image.name\n            ]);\n            continue;\n        }\n        serialized.push(section.text);\n        var options = {};\n        if (section.fontStack) {\n            options['text-font'] = [\n                'literal',\n                section.fontStack.split(',')\n            ];\n        }\n        if (section.scale) {\n            options['font-scale'] = section.scale;\n        }\n        if (section.textColor) {\n            options['text-color'] = ['rgba'].concat(section.textColor.toArray());\n        }\n        serialized.pu
 sh(options);\n    }\n    return serialized;\n};\n\nvar ResolvedImage = function ResolvedImage(options) {\n    this.name = options.name;\n    this.available = options.available;\n};\nResolvedImage.prototype.toString = function toString() {\n    return this.name;\n};\nResolvedImage.fromString = function fromString(name) {\n    if (!name) {\n        return null;\n    }\n    return new ResolvedImage({\n        name: name,\n        available: false\n    });\n};\nResolvedImage.prototype.serialize = function serialize() {\n    return [\n        'image',\n        this.name\n    ];\n};\n\nfunction validateRGBA(r, g, b, a) {\n    if (!(typeof r === 'number' && r >= 0 && r <= 255 && typeof g === 'number' && g >= 0 && g <= 255 && typeof b === 'number' && b >= 0 && b <= 255)) {\n        var value = typeof a === 'number' ? [\n            r,\n            g,\n            b,\n            a\n        ] : [\n            r,\n            g,\n            b\n        ];\n        return 'Invalid rgba value [
 ' + value.join(', ') + ']: \\'r\\', \\'g\\', and \\'b\\' must be between 0 and 255.';\n    }\n    if (!(typeof a === 'undefined' || typeof a === 'number' && a >= 0 && a <= 1)) {\n        return 'Invalid rgba value [' + [\n            r,\n            g,\n            b,\n            a\n        ].join(', ') + ']: \\'a\\' must be between 0 and 1.';\n    }\n    return null;\n}\nfunction isValue(mixed) {\n    if (mixed === null) {\n        return true;\n    } else if (typeof mixed === 'string') {\n        return true;\n    } else if (typeof mixed === 'boolean') {\n        return true;\n    } else if (typeof mixed === 'number') {\n        return true;\n    } else if (mixed instanceof Color) {\n        return true;\n    } else if (mixed instanceof Collator) {\n        return true;\n    } else if (mixed instanceof Formatted) {\n        return true;\n    } else if (mixed instanceof ResolvedImage) {\n        return true;\n    } else if (Array.isArray(mixed)) {\n        for (var i = 0, list = m
 ixed; i < list.length; i += 1) {\n            var item = list[i];\n            if (!isValue(item)) {\n                return false;\n            }\n        }\n        return true;\n    } else if (typeof mixed === 'object') {\n        for (var key in mixed) {\n            if (!isValue(mixed[key])) {\n                return false;\n            }\n        }\n        return true;\n    } else {\n        return false;\n    }\n}\nfunction typeOf(value) {\n    if (value === null) {\n        return NullType;\n    } else if (typeof value === 'string') {\n        return StringType;\n    } else if (typeof value === 'boolean') {\n        return BooleanType;\n    } else if (typeof value === 'number') {\n        return NumberType;\n    } else if (value instanceof Color) {\n        return ColorType;\n    } else if (value instanceof Collator) {\n        return CollatorType;\n    } else if (value instanceof Formatted) {\n        return FormattedType;\n    } else if (value instanceof ResolvedImage) {\
 n        return ResolvedImageType;\n    } else if (Array.isArray(value)) {\n        var length = value.length;\n        var itemType;\n        for (var i = 0, list = value; i < list.length; i += 1) {\n            var item = list[i];\n            var t = typeOf(item);\n            if (!itemType) {\n                itemType = t;\n            } else if (itemType === t) {\n                continue;\n            } else {\n                itemType = ValueType;\n                break;\n            }\n        }\n        return array(itemType || ValueType, length);\n    } else {\n        return ObjectType;\n    }\n}\nfunction toString$1(value) {\n    var type = typeof value;\n    if (value === null) {\n        return '';\n    } else if (type === 'string' || type === 'number' || type === 'boolean') {\n        return String(value);\n    } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {\n        return value.toString();\n    } else {\n        r
 eturn JSON.stringify(value);\n    }\n}\n\nvar Literal = function Literal(type, value) {\n    this.type = type;\n    this.value = value;\n};\nLiteral.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('\\'literal\\' expression requires exactly one argument, but found ' + (args.length - 1) + ' instead.');\n    }\n    if (!isValue(args[1])) {\n        return context.error('invalid value');\n    }\n    var value = args[1];\n    var type = typeOf(value);\n    var expected = context.expectedType;\n    if (type.kind === 'array' && type.N === 0 && expected && expected.kind === 'array' && (typeof expected.N !== 'number' || expected.N === 0)) {\n        type = expected;\n    }\n    return new Literal(type, value);\n};\nLiteral.prototype.evaluate = function evaluate() {\n    return this.value;\n};\nLiteral.prototype.eachChild = function eachChild() {\n};\nLiteral.prototype.outputDefined = function outputDefined() {\n    return true;\n};\nLiteral
 .prototype.serialize = function serialize() {\n    if (this.type.kind === 'array' || this.type.kind === 'object') {\n        return [\n            'literal',\n            this.value\n        ];\n    } else if (this.value instanceof Color) {\n        return ['rgba'].concat(this.value.toArray());\n    } else if (this.value instanceof Formatted) {\n        return this.value.serialize();\n    } else {\n        return this.value;\n    }\n};\n\nvar RuntimeError = function RuntimeError(message) {\n    this.name = 'ExpressionEvaluationError';\n    this.message = message;\n};\nRuntimeError.prototype.toJSON = function toJSON() {\n    return this.message;\n};\n\nvar types = {\n    string: StringType,\n    number: NumberType,\n    boolean: BooleanType,\n    object: ObjectType\n};\nvar Assertion = function Assertion(type, args) {\n    this.type = type;\n    this.args = args;\n};\nAssertion.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expected
  at least one argument.');\n    }\n    var i = 1;\n    var type;\n    var name = args[0];\n    if (name === 'array') {\n        var itemType;\n        if (args.length > 2) {\n            var type$1 = args[1];\n            if (typeof type$1 !== 'string' || !(type$1 in types) || type$1 === 'object') {\n                return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n            }\n            itemType = types[type$1];\n            i++;\n        } else {\n            itemType = ValueType;\n        }\n        var N;\n        if (args.length > 3) {\n            if (args[2] !== null && (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) {\n                return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n            }\n            N = args[2];\n            i++;\n        }\n        type = array(itemType, N);\n    } else {\n        type = types[name];\n    }\n  
   var parsed = [];\n    for (; i < args.length; i++) {\n        var input = context.parse(args[i], i, ValueType);\n        if (!input) {\n            return null;\n        }\n        parsed.push(input);\n    }\n    return new Assertion(type, parsed);\n};\nAssertion.prototype.evaluate = function evaluate(ctx) {\n    for (var i = 0; i < this.args.length; i++) {\n        var value = this.args[i].evaluate(ctx);\n        var error = checkSubtype(this.type, typeOf(value));\n        if (!error) {\n            return value;\n        } else if (i === this.args.length - 1) {\n            throw new RuntimeError('Expected value to be of type ' + toString(this.type) + ', but found ' + toString(typeOf(value)) + ' instead.');\n        }\n    }\n    return null;\n};\nAssertion.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nAssertion.prototype.outputDefined = function outputDefined() {\n    return this.args.every(function (arg) {\n        return arg.outputDefined();\
 n    });\n};\nAssertion.prototype.serialize = function serialize() {\n    var type = this.type;\n    var serialized = [type.kind];\n    if (type.kind === 'array') {\n        var itemType = type.itemType;\n        if (itemType.kind === 'string' || itemType.kind === 'number' || itemType.kind === 'boolean') {\n            serialized.push(itemType.kind);\n            var N = type.N;\n            if (typeof N === 'number' || this.args.length > 1) {\n                serialized.push(N);\n            }\n        }\n    }\n    return serialized.concat(this.args.map(function (arg) {\n        return arg.serialize();\n    }));\n};\n\nvar FormatExpression = function FormatExpression(sections) {\n    this.type = FormattedType;\n    this.sections = sections;\n};\nFormatExpression.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expected at least one argument.');\n    }\n    var firstArg = args[1];\n    if (!Array.isArray(firstArg) && typeof firstArg
  === 'object') {\n        return context.error('First argument must be an image or text section.');\n    }\n    var sections = [];\n    var nextTokenMayBeObject = false;\n    for (var i = 1; i <= args.length - 1; ++i) {\n        var arg = args[i];\n        if (nextTokenMayBeObject && typeof arg === 'object' && !Array.isArray(arg)) {\n            nextTokenMayBeObject = false;\n            var scale = null;\n            if (arg['font-scale']) {\n                scale = context.parse(arg['font-scale'], 1, NumberType);\n                if (!scale) {\n                    return null;\n                }\n            }\n            var font = null;\n            if (arg['text-font']) {\n                font = context.parse(arg['text-font'], 1, array(StringType));\n                if (!font) {\n                    return null;\n                }\n            }\n            var textColor = null;\n            if (arg['text-color']) {\n                textColor = context.parse(arg['text-color']
 , 1, ColorType);\n                if (!textColor) {\n                    return null;\n                }\n            }\n            var lastExpression = sections[sections.length - 1];\n            lastExpression.scale = scale;\n            lastExpression.font = font;\n            lastExpression.textColor = textColor;\n        } else {\n            var content = context.parse(args[i], 1, ValueType);\n            if (!content) {\n                return null;\n            }\n            var kind = content.type.kind;\n            if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage') {\n                return context.error('Formatted text type must be \\'string\\', \\'value\\', \\'image\\' or \\'null\\'.');\n            }\n            nextTokenMayBeObject = true;\n            sections.push({\n                content: content,\n                scale: null,\n                font: null,\n                textColor: null\n            });\n        }\n    }\
 n    return new FormatExpression(sections);\n};\nFormatExpression.prototype.evaluate = function evaluate(ctx) {\n    var evaluateSection = function (section) {\n        var evaluatedContent = section.content.evaluate(ctx);\n        if (typeOf(evaluatedContent) === ResolvedImageType) {\n            return new FormattedSection('', evaluatedContent, null, null, null);\n        }\n        return new FormattedSection(toString$1(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null);\n    };\n    return new Formatted(this.sections.map(evaluateSection));\n};\nFormatExpression.prototype.eachChild = function eachChild(fn) {\n    for (var i = 0, list = this.sections; i < list.length; i += 1) {\n        var section = list[i];\n        fn(section.content);\n        if (section.scale) {\n            fn(section.scale);\n        }\n        if (section.font) 
 {\n            fn(section.font);\n        }\n        if (section.textColor) {\n            fn(section.textColor);\n        }\n    }\n};\nFormatExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nFormatExpression.prototype.serialize = function serialize() {\n    var serialized = ['format'];\n    for (var i = 0, list = this.sections; i < list.length; i += 1) {\n        var section = list[i];\n        serialized.push(section.content.serialize());\n        var options = {};\n        if (section.scale) {\n            options['font-scale'] = section.scale.serialize();\n        }\n        if (section.font) {\n            options['text-font'] = section.font.serialize();\n        }\n        if (section.textColor) {\n            options['text-color'] = section.textColor.serialize();\n        }\n        serialized.push(options);\n    }\n    return serialized;\n};\n\nvar ImageExpression = function ImageExpression(input) {\n    this.type = ResolvedImageType;\n
     this.input = input;\n};\nImageExpression.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('Expected two arguments.');\n    }\n    var name = context.parse(args[1], 1, StringType);\n    if (!name) {\n        return context.error('No image name provided.');\n    }\n    return new ImageExpression(name);\n};\nImageExpression.prototype.evaluate = function evaluate(ctx) {\n    var evaluatedImageName = this.input.evaluate(ctx);\n    var value = ResolvedImage.fromString(evaluatedImageName);\n    if (value && ctx.availableImages) {\n        value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n    }\n    return value;\n};\nImageExpression.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n};\nImageExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nImageExpression.prototype.serialize = function serialize() {\n    return [\n        'image',\n        this.input.serial
 ize()\n    ];\n};\n\nvar types$1 = {\n    'to-boolean': BooleanType,\n    'to-color': ColorType,\n    'to-number': NumberType,\n    'to-string': StringType\n};\nvar Coercion = function Coercion(type, args) {\n    this.type = type;\n    this.args = args;\n};\nCoercion.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expected at least one argument.');\n    }\n    var name = args[0];\n    if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2) {\n        return context.error('Expected one argument.');\n    }\n    var type = types$1[name];\n    var parsed = [];\n    for (var i = 1; i < args.length; i++) {\n        var input = context.parse(args[i], i, ValueType);\n        if (!input) {\n            return null;\n        }\n        parsed.push(input);\n    }\n    return new Coercion(type, parsed);\n};\nCoercion.prototype.evaluate = function evaluate(ctx) {\n    if (this.type.kind === 'boolean') {\n        return Boolean(
 this.args[0].evaluate(ctx));\n    } else if (this.type.kind === 'color') {\n        var input;\n        var error;\n        for (var i = 0, list = this.args; i < list.length; i += 1) {\n            var arg = list[i];\n            input = arg.evaluate(ctx);\n            error = null;\n            if (input instanceof Color) {\n                return input;\n            } else if (typeof input === 'string') {\n                var c = ctx.parseColor(input);\n                if (c) {\n                    return c;\n                }\n            } else if (Array.isArray(input)) {\n                if (input.length < 3 || input.length > 4) {\n                    error = 'Invalid rbga value ' + JSON.stringify(input) + ': expected an array containing either three or four numeric values.';\n                } else {\n                    error = validateRGBA(input[0], input[1], input[2], input[3]);\n                }\n                if (!error) {\n                    return new Color(input[0]
  / 255, input[1] / 255, input[2] / 255, input[3]);\n                }\n            }\n        }\n        throw new RuntimeError(error || 'Could not parse color from value \\'' + (typeof input === 'string' ? input : String(JSON.stringify(input))) + '\\'');\n    } else if (this.type.kind === 'number') {\n        var value = null;\n        for (var i$1 = 0, list$1 = this.args; i$1 < list$1.length; i$1 += 1) {\n            var arg$1 = list$1[i$1];\n            value = arg$1.evaluate(ctx);\n            if (value === null) {\n                return 0;\n            }\n            var num = Number(value);\n            if (isNaN(num)) {\n                continue;\n            }\n            return num;\n        }\n        throw new RuntimeError('Could not convert ' + JSON.stringify(value) + ' to number.');\n    } else if (this.type.kind === 'formatted') {\n        return Formatted.fromString(toString$1(this.args[0].evaluate(ctx)));\n    } else if (this.type.kind === 'resolvedImage') {\n     
    return ResolvedImage.fromString(toString$1(this.args[0].evaluate(ctx)));\n    } else {\n        return toString$1(this.args[0].evaluate(ctx));\n    }\n};\nCoercion.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nCoercion.prototype.outputDefined = function outputDefined() {\n    return this.args.every(function (arg) {\n        return arg.outputDefined();\n    });\n};\nCoercion.prototype.serialize = function serialize() {\n    if (this.type.kind === 'formatted') {\n        return new FormatExpression([{\n                content: this.args[0],\n                scale: null,\n                font: null,\n                textColor: null\n            }]).serialize();\n    }\n    if (this.type.kind === 'resolvedImage') {\n        return new ImageExpression(this.args[0]).serialize();\n    }\n    var serialized = ['to-' + this.type.kind];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\
 n\nvar geometryTypes = [\n    'Unknown',\n    'Point',\n    'LineString',\n    'Polygon'\n];\nvar EvaluationContext = function EvaluationContext() {\n    this.globals = null;\n    this.feature = null;\n    this.featureState = null;\n    this.formattedSection = null;\n    this._parseColorCache = {};\n    this.availableImages = null;\n    this.canonical = null;\n};\nEvaluationContext.prototype.id = function id() {\n    return this.feature && 'id' in this.feature ? this.feature.id : null;\n};\nEvaluationContext.prototype.geometryType = function geometryType() {\n    return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n};\nEvaluationContext.prototype.geometry = function geometry() {\n    return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n};\nEvaluationContext.prototype.canonicalID = function canonicalID() {\n    return this.canonical;\n};\nEvaluationContext.prototype.properties = funct
 ion properties() {\n    return this.feature && this.feature.properties || {};\n};\nEvaluationContext.prototype.parseColor = function parseColor(input) {\n    var cached = this._parseColorCache[input];\n    if (!cached) {\n        cached = this._parseColorCache[input] = Color.parse(input);\n    }\n    return cached;\n};\n\nvar CompoundExpression = function CompoundExpression(name, type, evaluate, args) {\n    this.name = name;\n    this.type = type;\n    this._evaluate = evaluate;\n    this.args = args;\n};\nCompoundExpression.prototype.evaluate = function evaluate(ctx) {\n    return this._evaluate(ctx, this.args);\n};\nCompoundExpression.prototype.eachChild = function eachChild(fn) {\n    this.args.forEach(fn);\n};\nCompoundExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nCompoundExpression.prototype.serialize = function serialize() {\n    return [this.name].concat(this.args.map(function (arg) {\n        return arg.serialize();\n    }));\n};\nC
 ompoundExpression.parse = function parse(args, context) {\n    var ref$1;\n    var op = args[0];\n    var definition = CompoundExpression.definitions[op];\n    if (!definition) {\n        return context.error('Unknown expression \"' + op + '\". If you wanted a literal array, use [\"literal\", [...]].', 0);\n    }\n    var type = Array.isArray(definition) ? definition[0] : definition.type;\n    var availableOverloads = Array.isArray(definition) ? [[\n            definition[1],\n            definition[2]\n        ]] : definition.overloads;\n    var overloads = availableOverloads.filter(function (ref) {\n        var signature = ref[0];\n        return !Array.isArray(signature) || signature.length === args.length - 1;\n    });\n    var signatureContext = null;\n    for (var i$3 = 0, list = overloads; i$3 < list.length; i$3 += 1) {\n        var ref = list[i$3];\n        var params = ref[0];\n        var evaluate = ref[1];\n        signatureContext = new ParsingContext(context.registry, c
 ontext.path, null, context.scope);\n        var parsedArgs = [];\n        var argParseFailed = false;\n        for (var i = 1; i < args.length; i++) {\n            var arg = args[i];\n            var expectedType = Array.isArray(params) ? params[i - 1] : params.type;\n            var parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n            if (!parsed) {\n                argParseFailed = true;\n                break;\n            }\n            parsedArgs.push(parsed);\n        }\n        if (argParseFailed) {\n            continue;\n        }\n        if (Array.isArray(params)) {\n            if (params.length !== parsedArgs.length) {\n                signatureContext.error('Expected ' + params.length + ' arguments, but found ' + parsedArgs.length + ' instead.');\n                continue;\n            }\n        }\n        for (var i$1 = 0; i$1 < parsedArgs.length; i$1++) {\n            var expected = Array.isArray(params) ? params[i$1] : params.type
 ;\n            var arg$1 = parsedArgs[i$1];\n            signatureContext.concat(i$1 + 1).checkSubtype(expected, arg$1.type);\n        }\n        if (signatureContext.errors.length === 0) {\n            return new CompoundExpression(op, type, evaluate, parsedArgs);\n        }\n    }\n    if (overloads.length === 1) {\n        (ref$1 = context.errors).push.apply(ref$1, signatureContext.errors);\n    } else {\n        var expected$1 = overloads.length ? overloads : availableOverloads;\n        var signatures = expected$1.map(function (ref) {\n            var params = ref[0];\n            return stringifySignature(params);\n        }).join(' | ');\n        var actualTypes = [];\n        for (var i$2 = 1; i$2 < args.length; i$2++) {\n            var parsed$1 = context.parse(args[i$2], 1 + actualTypes.length);\n            if (!parsed$1) {\n                return null;\n            }\n            actualTypes.push(toString(parsed$1.type));\n        }\n        context.error('Expected argum
 ents of type ' + signatures + ', but found (' + actualTypes.join(', ') + ') instead.');\n    }\n    return null;\n};\nCompoundExpression.register = function register(registry, definitions) {\n    CompoundExpression.definitions = definitions;\n    for (var name in definitions) {\n        registry[name] = CompoundExpression;\n    }\n};\nfunction stringifySignature(signature) {\n    if (Array.isArray(signature)) {\n        return '(' + signature.map(toString).join(', ') + ')';\n    } else {\n        return '(' + toString(signature.type) + '...)';\n    }\n}\n\nvar CollatorExpression = function CollatorExpression(caseSensitive, diacriticSensitive, locale) {\n    this.type = CollatorType;\n    this.locale = locale;\n    this.caseSensitive = caseSensitive;\n    this.diacriticSensitive = diacriticSensitive;\n};\nCollatorExpression.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('Expected one argument.');\n    }\n    var options = args[1];\
 n    if (typeof options !== 'object' || Array.isArray(options)) {\n        return context.error('Collator options argument must be an object.');\n    }\n    var caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n    if (!caseSensitive) {\n        return null;\n    }\n    var diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n    if (!diacriticSensitive) {\n        return null;\n    }\n    var locale = null;\n    if (options['locale']) {\n        locale = context.parse(options['locale'], 1, StringType);\n        if (!locale) {\n            return null;\n        }\n    }\n    return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n};\nCollatorExpression.prototype.evaluate = function evaluate(ctx) {\n    return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale
  ? this.locale.evaluate(ctx) : null);\n};\nCollatorExpression.prototype.eachChild = function eachChild(fn) {\n    fn(this.caseSensitive);\n    fn(this.diacriticSensitive);\n    if (this.locale) {\n        fn(this.locale);\n    }\n};\nCollatorExpression.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nCollatorExpression.prototype.serialize = function serialize() {\n    var options = {};\n    options['case-sensitive'] = this.caseSensitive.serialize();\n    options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n    if (this.locale) {\n        options['locale'] = this.locale.serialize();\n    }\n    return [\n        'collator',\n        options\n    ];\n};\n\nvar EXTENT = 8192;\nfunction updateBBox(bbox, coord) {\n    bbox[0] = Math.min(bbox[0], coord[0]);\n    bbox[1] = Math.min(bbox[1], coord[1]);\n    bbox[2] = Math.max(bbox[2], coord[0]);\n    bbox[3] = Math.max(bbox[3], coord[1]);\n}\nfunction mercatorXfromLng(lng) {\n    return (180 + l
 ng) / 360;\n}\nfunction mercatorYfromLat(lat) {\n    return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360;\n}\nfunction boxWithinBox(bbox1, bbox2) {\n    if (bbox1[0] <= bbox2[0]) {\n        return false;\n    }\n    if (bbox1[2] >= bbox2[2]) {\n        return false;\n    }\n    if (bbox1[1] <= bbox2[1]) {\n        return false;\n    }\n    if (bbox1[3] >= bbox2[3]) {\n        return false;\n    }\n    return true;\n}\nfunction getTileCoordinates(p, canonical) {\n    var x = mercatorXfromLng(p[0]);\n    var y = mercatorYfromLat(p[1]);\n    var tilesAtZoom = Math.pow(2, canonical.z);\n    return [\n        Math.round(x * tilesAtZoom * EXTENT),\n        Math.round(y * tilesAtZoom * EXTENT)\n    ];\n}\nfunction onBoundary(p, p1, p2) {\n    var x1 = p[0] - p1[0];\n    var y1 = p[1] - p1[1];\n    var x2 = p[0] - p2[0];\n    var y2 = p[1] - p2[1];\n    return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0;\n}\nfunction rayIntersect(p, p1, p2)
  {\n    return p1[1] > p[1] !== p2[1] > p[1] && p[0] < (p2[0] - p1[0]) * (p[1] - p1[1]) / (p2[1] - p1[1]) + p1[0];\n}\nfunction pointWithinPolygon(point, rings) {\n    var inside = false;\n    for (var i = 0, len = rings.length; i < len; i++) {\n        var ring = rings[i];\n        for (var j = 0, len2 = ring.length; j < len2 - 1; j++) {\n            if (onBoundary(point, ring[j], ring[j + 1])) {\n                return false;\n            }\n            if (rayIntersect(point, ring[j], ring[j + 1])) {\n                inside = !inside;\n            }\n        }\n    }\n    return inside;\n}\nfunction pointWithinPolygons(point, polygons) {\n    for (var i = 0; i < polygons.length; i++) {\n        if (pointWithinPolygon(point, polygons[i])) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction perp(v1, v2) {\n    return v1[0] * v2[1] - v1[1] * v2[0];\n}\nfunction twoSided(p1, p2, q1, q2) {\n    var x1 = p1[0] - q1[0];\n    var y1 = p1[1] - q1[1];\n    var x2 
 = p2[0] - q1[0];\n    var y2 = p2[1] - q1[1];\n    var x3 = q2[0] - q1[0];\n    var y3 = q2[1] - q1[1];\n    var det1 = x1 * y3 - x3 * y1;\n    var det2 = x2 * y3 - x3 * y2;\n    if (det1 > 0 && det2 < 0 || det1 < 0 && det2 > 0) {\n        return true;\n    }\n    return false;\n}\nfunction lineIntersectLine(a, b, c, d) {\n    var vectorP = [\n        b[0] - a[0],\n        b[1] - a[1]\n    ];\n    var vectorQ = [\n        d[0] - c[0],\n        d[1] - c[1]\n    ];\n    if (perp(vectorQ, vectorP) === 0) {\n        return false;\n    }\n    if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) {\n        return true;\n    }\n    return false;\n}\nfunction lineIntersectPolygon(p1, p2, polygon) {\n    for (var i = 0, list = polygon; i < list.length; i += 1) {\n        var ring = list[i];\n        for (var j = 0; j < ring.length - 1; ++j) {\n            if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n
 function lineStringWithinPolygon(line, polygon) {\n    for (var i = 0; i < line.length; ++i) {\n        if (!pointWithinPolygon(line[i], polygon)) {\n            return false;\n        }\n    }\n    for (var i$1 = 0; i$1 < line.length - 1; ++i$1) {\n        if (lineIntersectPolygon(line[i$1], line[i$1 + 1], polygon)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction lineStringWithinPolygons(line, polygons) {\n    for (var i = 0; i < polygons.length; i++) {\n        if (lineStringWithinPolygon(line, polygons[i])) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction getTilePolygon(coordinates, bbox, canonical) {\n    var polygon = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        var ring = [];\n        for (var j = 0; j < coordinates[i].length; j++) {\n            var coord = getTileCoordinates(coordinates[i][j], canonical);\n            updateBBox(bbox, coord);\n            ring.push(coord);\n        }\n        poly
 gon.push(ring);\n    }\n    return polygon;\n}\nfunction getTilePolygons(coordinates, bbox, canonical) {\n    var polygons = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        var polygon = getTilePolygon(coordinates[i], bbox, canonical);\n        polygons.push(polygon);\n    }\n    return polygons;\n}\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n    if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n        var halfWorldSize = worldSize * 0.5;\n        var shift = p[0] - polyBBox[0] > halfWorldSize ? -worldSize : polyBBox[0] - p[0] > halfWorldSize ? worldSize : 0;\n        if (shift === 0) {\n            shift = p[0] - polyBBox[2] > halfWorldSize ? -worldSize : polyBBox[2] - p[0] > halfWorldSize ? worldSize : 0;\n        }\n        p[0] += shift;\n    }\n    updateBBox(bbox, p);\n}\nfunction resetBBox(bbox) {\n    bbox[0] = bbox[1] = Infinity;\n    bbox[2] = bbox[3] = -Infinity;\n}\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n    var wo
 rldSize = Math.pow(2, canonical.z) * EXTENT;\n    var shifts = [\n        canonical.x * EXTENT,\n        canonical.y * EXTENT\n    ];\n    var tilePoints = [];\n    for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) {\n        var points = list$1[i$1];\n        for (var i = 0, list = points; i < list.length; i += 1) {\n            var point = list[i];\n            var p = [\n                point.x + shifts[0],\n                point.y + shifts[1]\n            ];\n            updatePoint(p, pointBBox, polyBBox, worldSize);\n            tilePoints.push(p);\n        }\n    }\n    return tilePoints;\n}\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n    var worldSize = Math.pow(2, canonical.z) * EXTENT;\n    var shifts = [\n        canonical.x * EXTENT,\n        canonical.y * EXTENT\n    ];\n    var tileLines = [];\n    for (var i$1 = 0, list$1 = geometry; i$1 < list$1.length; i$1 += 1) {\n        var line = list$1[i$1];\n        var tileLine = [];\n
         for (var i = 0, list = line; i < list.length; i += 1) {\n            var point = list[i];\n            var p = [\n                point.x + shifts[0],\n                point.y + shifts[1]\n            ];\n            updateBBox(lineBBox, p);\n            tileLine.push(p);\n        }\n        tileLines.push(tileLine);\n    }\n    if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n        resetBBox(lineBBox);\n        for (var i$3 = 0, list$3 = tileLines; i$3 < list$3.length; i$3 += 1) {\n            var line$1 = list$3[i$3];\n            for (var i$2 = 0, list$2 = line$1; i$2 < list$2.length; i$2 += 1) {\n                var p$1 = list$2[i$2];\n                updatePoint(p$1, lineBBox, polyBBox, worldSize);\n            }\n        }\n    }\n    return tileLines;\n}\nfunction pointsWithinPolygons(ctx, polygonGeometry) {\n    var pointBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var polyBBox = [\n        Infinity,\n        
 Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var canonical = ctx.canonicalID();\n    if (polygonGeometry.type === 'Polygon') {\n        var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        var tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox)) {\n            return false;\n        }\n        for (var i = 0, list = tilePoints; i < list.length; i += 1) {\n            var point = list[i];\n            if (!pointWithinPolygon(point, tilePolygon)) {\n                return false;\n            }\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        var tilePoints$1 = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox)) {\n            return false;\n        }\n        for (var i$1 = 0,
  list$1 = tilePoints$1; i$1 < list$1.length; i$1 += 1) {\n            var point$1 = list$1[i$1];\n            if (!pointWithinPolygons(point$1, tilePolygons)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\nfunction linesWithinPolygons(ctx, polygonGeometry) {\n    var lineBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var polyBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    var canonical = ctx.canonicalID();\n    if (polygonGeometry.type === 'Polygon') {\n        var tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        var tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox)) {\n            return false;\n        }\n        for (var i = 0, list = tileLines; i < list.length; i += 1) {\n            var line = list[i];\n            if (!lineStri
 ngWithinPolygon(line, tilePolygon)) {\n                return false;\n            }\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        var tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        var tileLines$1 = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox)) {\n            return false;\n        }\n        for (var i$1 = 0, list$1 = tileLines$1; i$1 < list$1.length; i$1 += 1) {\n            var line$1 = list$1[i$1];\n            if (!lineStringWithinPolygons(line$1, tilePolygons)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\nvar Within = function Within(geojson, geometries) {\n    this.type = BooleanType;\n    this.geojson = geojson;\n    this.geometries = geometries;\n};\nWithin.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('\\'within\\' expression requires exact
 ly one argument, but found ' + (args.length - 1) + ' instead.');\n    }\n    if (isValue(args[1])) {\n        var geojson = args[1];\n        if (geojson.type === 'FeatureCollection') {\n            for (var i = 0; i < geojson.features.length; ++i) {\n                var type = geojson.features[i].geometry.type;\n                if (type === 'Polygon' || type === 'MultiPolygon') {\n                    return new Within(geojson, geojson.features[i].geometry);\n                }\n            }\n        } else if (geojson.type === 'Feature') {\n            var type$1 = geojson.geometry.type;\n            if (type$1 === 'Polygon' || type$1 === 'MultiPolygon') {\n                return new Within(geojson, geojson.geometry);\n            }\n        } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n            return new Within(geojson, geojson);\n        }\n    }\n    return context.error('\\'within\\' expression requires valid geojson object that contains polyg
 on geometry type.');\n};\nWithin.prototype.evaluate = function evaluate(ctx) {\n    if (ctx.geometry() != null && ctx.canonicalID() != null) {\n        if (ctx.geometryType() === 'Point') {\n            return pointsWithinPolygons(ctx, this.geometries);\n        } else if (ctx.geometryType() === 'LineString') {\n            return linesWithinPolygons(ctx, this.geometries);\n        }\n    }\n    return false;\n};\nWithin.prototype.eachChild = function eachChild() {\n};\nWithin.prototype.outputDefined = function outputDefined() {\n    return true;\n};\nWithin.prototype.serialize = function serialize() {\n    return [\n        'within',\n        this.geojson\n    ];\n};\n\nfunction isFeatureConstant(e) {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'get' && e.args.length === 1) {\n            return false;\n        } else if (e.name === 'feature-state') {\n            return false;\n        } else if (e.name === 'has' && e.args.length === 1) {\n            retur
 n false;\n        } else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') {\n            return false;\n        } else if (/^filter-/.test(e.name)) {\n            return false;\n        }\n    }\n    if (e instanceof Within) {\n        return false;\n    }\n    var result = true;\n    e.eachChild(function (arg) {\n        if (result && !isFeatureConstant(arg)) {\n            result = false;\n        }\n    });\n    return result;\n}\nfunction isStateConstant(e) {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'feature-state') {\n            return false;\n        }\n    }\n    var result = true;\n    e.eachChild(function (arg) {\n        if (result && !isStateConstant(arg)) {\n            result = false;\n        }\n    });\n    return result;\n}\nfunction isGlobalPropertyConstant(e, properties) {\n    if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {\n        return false;\n    }\n    var result = true;\n    
 e.eachChild(function (arg) {\n        if (result && !isGlobalPropertyConstant(arg, properties)) {\n            result = false;\n        }\n    });\n    return result;\n}\n\nvar Var = function Var(name, boundExpression) {\n    this.type = boundExpression.type;\n    this.name = name;\n    this.boundExpression = boundExpression;\n};\nVar.parse = function parse(args, context) {\n    if (args.length !== 2 || typeof args[1] !== 'string') {\n        return context.error('\\'var\\' expression requires exactly one string literal argument.');\n    }\n    var name = args[1];\n    if (!context.scope.has(name)) {\n        return context.error('Unknown variable \"' + name + '\". Make sure \"' + name + '\" has been bound in an enclosing \"let\" expression before using it.', 1);\n    }\n    return new Var(name, context.scope.get(name));\n};\nVar.prototype.evaluate = function evaluate(ctx) {\n    return this.boundExpression.evaluate(ctx);\n};\nVar.prototype.eachChild = function eachChild() {\n};\nVa
 r.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nVar.prototype.serialize = function serialize() {\n    return [\n        'var',\n        this.name\n    ];\n};\n\nvar ParsingContext = function ParsingContext(registry, path, expectedType, scope, errors) {\n    if (path === void 0)\n        path = [];\n    if (scope === void 0)\n        scope = new Scope();\n    if (errors === void 0)\n        errors = [];\n    this.registry = registry;\n    this.path = path;\n    this.key = path.map(function (part) {\n        return '[' + part + ']';\n    }).join('');\n    this.scope = scope;\n    this.errors = errors;\n    this.expectedType = expectedType;\n};\nParsingContext.prototype.parse = function parse(expr, index, expectedType, bindings, options) {\n    if (options === void 0)\n        options = {};\n    if (index) {\n        return this.concat(index, expectedType, bindings)._parse(expr, options);\n    }\n    return this._parse(expr, options);\n};\nParsingContext.
 prototype._parse = function _parse(expr, options) {\n    if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n        expr = [\n            'literal',\n            expr\n        ];\n    }\n    function annotate(parsed, type, typeAnnotation) {\n        if (typeAnnotation === 'assert') {\n            return new Assertion(type, [parsed]);\n        } else if (typeAnnotation === 'coerce') {\n            return new Coercion(type, [parsed]);\n        } else {\n            return parsed;\n        }\n    }\n    if (Array.isArray(expr)) {\n        if (expr.length === 0) {\n            return this.error('Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].');\n        }\n        var op = expr[0];\n        if (typeof op !== 'string') {\n            this.error('Expression name must be a string, but found ' + typeof op + ' instead. If you wanted a literal array, use [\"literal\", [...]].', 0);\n   
          return null;\n        }\n        var Expr = this.registry[op];\n        if (Expr) {\n            var parsed = Expr.parse(expr, this);\n            if (!parsed) {\n                return null;\n            }\n            if (this.expectedType) {\n                var expected = this.expectedType;\n                var actual = parsed.type;\n                if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') {\n                    parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n                } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {\n                    parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n                } else if (this.checkSubtype(expected, actual)) {\n       
              return null;\n                }\n            }\n            if (!(parsed instanceof Literal) && parsed.type.kind !== 'resolvedImage' && isConstant(parsed)) {\n                var ec = new EvaluationContext();\n                try {\n                    parsed = new Literal(parsed.type, parsed.evaluate(ec));\n                } catch (e) {\n                    this.error(e.message);\n                    return null;\n                }\n            }\n            return parsed;\n        }\n        return this.error('Unknown expression \"' + op + '\". If you wanted a literal array, use [\"literal\", [...]].', 0);\n    } else if (typeof expr === 'undefined') {\n        return this.error('\\'undefined\\' value invalid. Use null instead.');\n    } else if (typeof expr === 'object') {\n        return this.error('Bare objects invalid. Use [\"literal\", {...}] instead.');\n    } else {\n        return this.error('Expected an array, but found ' + typeof expr + ' instead.');\n    }
 \n};\nParsingContext.prototype.concat = function concat(index, expectedType, bindings) {\n    var path = typeof index === 'number' ? this.path.concat(index) : this.path;\n    var scope = bindings ? this.scope.concat(bindings) : this.scope;\n    return new ParsingContext(this.registry, path, expectedType || null, scope, this.errors);\n};\nParsingContext.prototype.error = function error(error$1) {\n    var keys = [], len = arguments.length - 1;\n    while (len-- > 0)\n        keys[len] = arguments[len + 1];\n    var key = '' + this.key + keys.map(function (k) {\n        return '[' + k + ']';\n    }).join('');\n    this.errors.push(new ParsingError(key, error$1));\n};\nParsingContext.prototype.checkSubtype = function checkSubtype$1(expected, t) {\n    var error = checkSubtype(expected, t);\n    if (error) {\n        this.error(error);\n    }\n    return error;\n};\nfunction isConstant(expression) {\n    if (expression instanceof Var) {\n        return isConstant(expression.boundExpress
 ion);\n    } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n        return false;\n    } else if (expression instanceof CollatorExpression) {\n        return false;\n    } else if (expression instanceof Within) {\n        return false;\n    }\n    var isTypeAnnotation = expression instanceof Coercion || expression instanceof Assertion;\n    var childrenConstant = true;\n    expression.eachChild(function (child) {\n        if (isTypeAnnotation) {\n            childrenConstant = childrenConstant && isConstant(child);\n        } else {\n            childrenConstant = childrenConstant && child instanceof Literal;\n        }\n    });\n    if (!childrenConstant) {\n        return false;\n    }\n    return isFeatureConstant(expression) && isGlobalPropertyConstant(expression, [\n        'zoom',\n        'heatmap-density',\n        'line-progress',\n        'accumulated',\n        'is-supported-script'\n    ]);\n}\n\nfunction findStopLessThanOrEqualTo(st
 ops, input) {\n    var lastIndex = stops.length - 1;\n    var lowerIndex = 0;\n    var upperIndex = lastIndex;\n    var currentIndex = 0;\n    var currentValue, nextValue;\n    while (lowerIndex <= upperIndex) {\n        currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n        currentValue = stops[currentIndex];\n        nextValue = stops[currentIndex + 1];\n        if (currentValue <= input) {\n            if (currentIndex === lastIndex || input < nextValue) {\n                return currentIndex;\n            }\n            lowerIndex = currentIndex + 1;\n        } else if (currentValue > input) {\n            upperIndex = currentIndex - 1;\n        } else {\n            throw new RuntimeError('Input is not a number.');\n        }\n    }\n    return 0;\n}\n\nvar Step = function Step(type, input, stops) {\n    this.type = type;\n    this.input = input;\n    this.labels = [];\n    this.outputs = [];\n    for (var i = 0, list = stops; i < list.length; i += 1) {\n        var
  ref = list[i];\n        var label = ref[0];\n        var expression = ref[1];\n        this.labels.push(label);\n        this.outputs.push(expression);\n    }\n};\nStep.parse = function parse(args, context) {\n    if (args.length - 1 < 4) {\n        return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if ((args.length - 1) % 2 !== 0) {\n        return context.error('Expected an even number of arguments.');\n    }\n    var input = context.parse(args[1], 1, NumberType);\n    if (!input) {\n        return null;\n    }\n    var stops = [];\n    var outputType = null;\n    if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    for (var i = 1; i < args.length; i += 2) {\n        var label = i === 1 ? -Infinity : args[i];\n        var value = args[i + 1];\n        var labelKey = i;\n        var valueKey = i + 1;\n        if (typeof label !== 'number') {\n         
    return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n        }\n        if (stops.length && stops[stops.length - 1][0] >= label) {\n            return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n        }\n        var parsed = context.parse(value, valueKey, outputType);\n        if (!parsed) {\n            return null;\n        }\n        outputType = outputType || parsed.type;\n        stops.push([\n            label,\n            parsed\n        ]);\n    }\n    return new Step(outputType, input, stops);\n};\nStep.prototype.evaluate = function evaluate(ctx) {\n    var labels = this.labels;\n    var outputs = this.outputs;\n    if (labels.length === 1) {\n        return outputs[0].evaluate(ctx);\n    }\n    var value = this.input.evaluate(ctx);\n    if (value <= labels[
 0]) {\n        return outputs[0].evaluate(ctx);\n    }\n    var stopCount = labels.length;\n    if (value >= labels[stopCount - 1]) {\n        return outputs[stopCount - 1].evaluate(ctx);\n    }\n    var index = findStopLessThanOrEqualTo(labels, value);\n    return outputs[index].evaluate(ctx);\n};\nStep.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    for (var i = 0, list = this.outputs; i < list.length; i += 1) {\n        var expression = list[i];\n        fn(expression);\n    }\n};\nStep.prototype.outputDefined = function outputDefined() {\n    return this.outputs.every(function (out) {\n        return out.outputDefined();\n    });\n};\nStep.prototype.serialize = function serialize() {\n    var serialized = [\n        'step',\n        this.input.serialize()\n    ];\n    for (var i = 0; i < this.labels.length; i++) {\n        if (i > 0) {\n            serialized.push(this.labels[i]);\n        }\n        serialized.push(this.outputs[i].serialize());\n    }\n
     return serialized;\n};\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCL
 UDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\n\nvar unitbezier = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n    // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n    this.cx = 3.0 * p1x;\n    this.bx = 3.0 * (p2x - p1x) - this.cx;\n    this.ax = 1.0 - this.cx - this.bx;\n\n    this.cy = 3.0 * p1y;\n    this.by = 3.0 * (p2y - p1y) - this.cy;\n    this.ay = 1.0 - this.cy - this.by;\n\n    this.p1x = p1x;\n    this.p1y = p2y;\n    this.p2x = p2x;\n    this.p2y = 
 p2y;\n}\n\nUnitBezier.prototype.sampleCurveX = function(t) {\n    // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n    return ((this.ax * t + this.bx) * t + this.cx) * t;\n};\n\nUnitBezier.prototype.sampleCurveY = function(t) {\n    return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function(t) {\n    return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function(x, epsilon) {\n    if (typeof epsilon === 'undefined') { epsilon = 1e-6; }\n\n    var t0, t1, t2, x2, i;\n\n    // First try a few iterations of Newton's method -- normally very fast.\n    for (t2 = x, i = 0; i < 8; i++) {\n\n        x2 = this.sampleCurveX(t2) - x;\n        if (Math.abs(x2) < epsilon) { return t2; }\n\n        var d2 = this.sampleCurveDerivativeX(t2);\n        if (Math.abs(d2) < 1e-6) { break; }\n\n        t2 = t2 - x2 / d2;\n    }\n\n    // Fall back to the bisection method for reliability.\n    t0
  = 0.0;\n    t1 = 1.0;\n    t2 = x;\n\n    if (t2 < t0) { return t0; }\n    if (t2 > t1) { return t1; }\n\n    while (t0 < t1) {\n\n        x2 = this.sampleCurveX(t2);\n        if (Math.abs(x2 - x) < epsilon) { return t2; }\n\n        if (x > x2) {\n            t0 = t2;\n        } else {\n            t1 = t2;\n        }\n\n        t2 = (t1 - t0) * 0.5 + t0;\n    }\n\n    // Failure.\n    return t2;\n};\n\nUnitBezier.prototype.solve = function(x, epsilon) {\n    return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n\nfunction number(a, b, t) {\n    return a * (1 - t) + b * t;\n}\nfunction color(from, to, t) {\n    return new Color(number(from.r, to.r, t), number(from.g, to.g, t), number(from.b, to.b, t), number(from.a, to.a, t));\n}\nfunction array$1(from, to, t) {\n    return from.map(function (d, i) {\n        return number(d, to[i], t);\n    });\n}\n\nvar interpolate = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  number: number,\n  color: color,\n  array: array$1\n})
 ;\n\nvar Xn = 0.95047, Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI;\nfunction xyz2lab(t) {\n    return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\nfunction lab2xyz(t) {\n    return t > t1 ? t * t * t : t2 * (t - t0);\n}\nfunction xyz2rgb(x) {\n    return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\nfunction rgb2xyz(x) {\n    x /= 255;\n    return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\nfunction rgbToLab(rgbColor) {\n    var b = rgb2xyz(rgbColor.r), a = rgb2xyz(rgbColor.g), l = rgb2xyz(rgbColor.b), x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.072175 * l) / Yn), z = xyz2lab((0.0193339 * b + 0.119192 * a + 0.9503041 * l) / Zn);\n    return {\n        l: 116 * y - 16,\n        a: 500 * (x - y),\n        b: 200 * (y - z),\n        alpha: rgbColor.a\n    };\n}\nfunction
  labToRgb(labColor) {\n    var y = (labColor.l + 16) / 116, x = isNaN(labColor.a) ? y : y + labColor.a / 500, z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n    return new Color(xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z), xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z), labColor.alpha);\n}\nfunction interpolateLab(from, to, t) {\n    return {\n        l: number(from.l, to.l, t),\n        a: number(from.a, to.a, t),\n        b: number(from.b, to.b, t),\n        alpha: number(from.alpha, to.alpha, t)\n    };\n}\nfunction rgbToHcl(rgbColor) {\n    var ref = rgbToLab(rgbColor);\n    var l = ref.l;\n    var a = ref.a;\n    var b = ref.b;\n    var h = Math.atan2(b, a) * rad2deg;\n    return {\n        h: h < 0 ? h + 360 : h,\n        c: Math.sqrt(a * a + b * b),\n        l: l,\n        alpha: rgbColor.a\n    };\n}\nfunction hclToRgb(hc
 lColor) {\n    var h = hclColor.h * deg2rad, c = hclColor.c, l = hclColor.l;\n    return labToRgb({\n        l: l,\n        a: Math.cos(h) * c,\n        b: Math.sin(h) * c,\n        alpha: hclColor.alpha\n    });\n}\nfunction interpolateHue(a, b, t) {\n    var d = b - a;\n    return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\nfunction interpolateHcl(from, to, t) {\n    return {\n        h: interpolateHue(from.h, to.h, t),\n        c: number(from.c, to.c, t),\n        l: number(from.l, to.l, t),\n        alpha: number(from.alpha, to.alpha, t)\n    };\n}\nvar lab = {\n    forward: rgbToLab,\n    reverse: labToRgb,\n    interpolate: interpolateLab\n};\nvar hcl = {\n    forward: rgbToHcl,\n    reverse: hclToRgb,\n    interpolate: interpolateHcl\n};\n\nvar colorSpaces = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  lab: lab,\n  hcl: hcl\n});\n\nvar Interpolate = function Interpolate(type, operator, interpolation, input, stops) {\n    this.type = type;\n  
   this.operator = operator;\n    this.interpolation = interpolation;\n    this.input = input;\n    this.labels = [];\n    this.outputs = [];\n    for (var i = 0, list = stops; i < list.length; i += 1) {\n        var ref = list[i];\n        var label = ref[0];\n        var expression = ref[1];\n        this.labels.push(label);\n        this.outputs.push(expression);\n    }\n};\nInterpolate.interpolationFactor = function interpolationFactor(interpolation, input, lower, upper) {\n    var t = 0;\n    if (interpolation.name === 'exponential') {\n        t = exponentialInterpolation(input, interpolation.base, lower, upper);\n    } else if (interpolation.name === 'linear') {\n        t = exponentialInterpolation(input, 1, lower, upper);\n    } else if (interpolation.name === 'cubic-bezier') {\n        var c = interpolation.controlPoints;\n        var ub = new unitbezier(c[0], c[1], c[2], c[3]);\n        t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n    }\n    return t;\n
 };\nInterpolate.parse = function parse(args, context) {\n    var operator = args[0];\n    var interpolation = args[1];\n    var input = args[2];\n    var rest = args.slice(3);\n    if (!Array.isArray(interpolation) || interpolation.length === 0) {\n        return context.error('Expected an interpolation type expression.', 1);\n    }\n    if (interpolation[0] === 'linear') {\n        interpolation = { name: 'linear' };\n    } else if (interpolation[0] === 'exponential') {\n        var base = interpolation[1];\n        if (typeof base !== 'number') {\n            return context.error('Exponential interpolation requires a numeric base.', 1, 1);\n        }\n        interpolation = {\n            name: 'exponential',\n            base: base\n        };\n    } else if (interpolation[0] === 'cubic-bezier') {\n        var controlPoints = interpolation.slice(1);\n        if (controlPoints.length !== 4 || controlPoints.some(function (t) {\n                return typeof t !== 'number' || t < 0
  || t > 1;\n            })) {\n            return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n        }\n        interpolation = {\n            name: 'cubic-bezier',\n            controlPoints: controlPoints\n        };\n    } else {\n        return context.error('Unknown interpolation type ' + String(interpolation[0]), 1, 0);\n    }\n    if (args.length - 1 < 4) {\n        return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if ((args.length - 1) % 2 !== 0) {\n        return context.error('Expected an even number of arguments.');\n    }\n    input = context.parse(input, 2, NumberType);\n    if (!input) {\n        return null;\n    }\n    var stops = [];\n    var outputType = null;\n    if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n        outputType = ColorType;\n    } else if (context.expectedType && context.expectedType.kind !== 'va
 lue') {\n        outputType = context.expectedType;\n    }\n    for (var i = 0; i < rest.length; i += 2) {\n        var label = rest[i];\n        var value = rest[i + 1];\n        var labelKey = i + 3;\n        var valueKey = i + 4;\n        if (typeof label !== 'number') {\n            return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n        }\n        if (stops.length && stops[stops.length - 1][0] >= label) {\n            return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n        }\n        var parsed = context.parse(value, valueKey, outputType);\n        if (!parsed) {\n            return null;\n        }\n        outputType = outputType || parsed.type;\n        stops.push([\n            label,\n            parsed\n        ]);\n    }\n    if (outputTyp
 e.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {\n        return context.error('Type ' + toString(outputType) + ' is not interpolatable.');\n    }\n    return new Interpolate(outputType, operator, interpolation, input, stops);\n};\nInterpolate.prototype.evaluate = function evaluate(ctx) {\n    var labels = this.labels;\n    var outputs = this.outputs;\n    if (labels.length === 1) {\n        return outputs[0].evaluate(ctx);\n    }\n    var value = this.input.evaluate(ctx);\n    if (value <= labels[0]) {\n        return outputs[0].evaluate(ctx);\n    }\n    var stopCount = labels.length;\n    if (value >= labels[stopCount - 1]) {\n        return outputs[stopCount - 1].evaluate(ctx);\n    }\n    var index = findStopLessThanOrEqualTo(labels, value);\n    var lower = labels[index];\n    var upper = labels[index + 1];\n    var t = Interpolate.interpolationFactor(this.interp
 olation, value, lower, upper);\n    var outputLower = outputs[index].evaluate(ctx);\n    var outputUpper = outputs[index + 1].evaluate(ctx);\n    if (this.operator === 'interpolate') {\n        return interpolate[this.type.kind.toLowerCase()](outputLower, outputUpper, t);\n    } else if (this.operator === 'interpolate-hcl') {\n        return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t));\n    } else {\n        return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t));\n    }\n};\nInterpolate.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    for (var i = 0, list = this.outputs; i < list.length; i += 1) {\n        var expression = list[i];\n        fn(expression);\n    }\n};\nInterpolate.prototype.outputDefined = function outputDefined() {\n    return this.outputs.every(function (out) {\n        return out.outputDefined();\n    });\n};\nInterpolate.prototype.serialize = function serialize() {
 \n    var interpolation;\n    if (this.interpolation.name === 'linear') {\n        interpolation = ['linear'];\n    } else if (this.interpolation.name === 'exponential') {\n        if (this.interpolation.base === 1) {\n            interpolation = ['linear'];\n        } else {\n            interpolation = [\n                'exponential',\n                this.interpolation.base\n            ];\n        }\n    } else {\n        interpolation = ['cubic-bezier'].concat(this.interpolation.controlPoints);\n    }\n    var serialized = [\n        this.operator,\n        interpolation,\n        this.input.serialize()\n    ];\n    for (var i = 0; i < this.labels.length; i++) {\n        serialized.push(this.labels[i], this.outputs[i].serialize());\n    }\n    return serialized;\n};\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n    var difference = upperValue - lowerValue;\n    var progress = input - lowerValue;\n    if (difference === 0) {\n        return 0;\n    
 } else if (base === 1) {\n        return progress / difference;\n    } else {\n        return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n    }\n}\n\nvar Coalesce = function Coalesce(type, args) {\n    this.type = type;\n    this.args = args;\n};\nCoalesce.parse = function parse(args, context) {\n    if (args.length < 2) {\n        return context.error('Expectected at least one argument.');\n    }\n    var outputType = null;\n    var expectedType = context.expectedType;\n    if (expectedType && expectedType.kind !== 'value') {\n        outputType = expectedType;\n    }\n    var parsedArgs = [];\n    for (var i = 0, list = args.slice(1); i < list.length; i += 1) {\n        var arg = list[i];\n        var parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, { typeAnnotation: 'omit' });\n        if (!parsed) {\n            return null;\n        }\n        outputType = outputType || parsed.type;\n        parsedArgs.push(parsed);\n    }\n    v
 ar needsAnnotation = expectedType && parsedArgs.some(function (arg) {\n        return checkSubtype(expectedType, arg.type);\n    });\n    return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs);\n};\nCoalesce.prototype.evaluate = function evaluate(ctx) {\n    var result = null;\n    var argCount = 0;\n    var requestedImageName;\n    for (var i = 0, list = this.args; i < list.length; i += 1) {\n        var arg = list[i];\n        argCount++;\n        result = arg.evaluate(ctx);\n        if (result && result instanceof ResolvedImage && !result.available) {\n            if (!requestedImageName) {\n                requestedImageName = result.name;\n            }\n            result = null;\n            if (argCount === this.args.length) {\n                result = requestedImageName;\n            }\n        }\n        if (result !== null) {\n            break;\n        }\n    }\n    return result;\n};\nCoalesce.prototype.eachChild = function 
 eachChild(fn) {\n    this.args.forEach(fn);\n};\nCoalesce.prototype.outputDefined = function outputDefined() {\n    return this.args.every(function (arg) {\n        return arg.outputDefined();\n    });\n};\nCoalesce.prototype.serialize = function serialize() {\n    var serialized = ['coalesce'];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar Let = function Let(bindings, result) {\n    this.type = result.type;\n    this.bindings = [].concat(bindings);\n    this.result = result;\n};\nLet.prototype.evaluate = function evaluate(ctx) {\n    return this.result.evaluate(ctx);\n};\nLet.prototype.eachChild = function eachChild(fn) {\n    for (var i = 0, list = this.bindings; i < list.length; i += 1) {\n        var binding = list[i];\n        fn(binding[1]);\n    }\n    fn(this.result);\n};\nLet.parse = function parse(args, context) {\n    if (args.length < 4) {\n        return context.error('Expected at least 3 
 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var bindings = [];\n    for (var i = 1; i < args.length - 1; i += 2) {\n        var name = args[i];\n        if (typeof name !== 'string') {\n            return context.error('Expected string, but found ' + typeof name + ' instead.', i);\n        }\n        if (/[^a-zA-Z0-9_]/.test(name)) {\n            return context.error('Variable names must contain only alphanumeric characters or \\'_\\'.', i);\n        }\n        var value = context.parse(args[i + 1], i + 1);\n        if (!value) {\n            return null;\n        }\n        bindings.push([\n            name,\n            value\n        ]);\n    }\n    var result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n    if (!result) {\n        return null;\n    }\n    return new Let(bindings, result);\n};\nLet.prototype.outputDefined = function outputDefined() {\n    return this.result.outputDefined();\n};\nLet.prototype
 .serialize = function serialize() {\n    var serialized = ['let'];\n    for (var i = 0, list = this.bindings; i < list.length; i += 1) {\n        var ref = list[i];\n        var name = ref[0];\n        var expr = ref[1];\n        serialized.push(name, expr.serialize());\n    }\n    serialized.push(this.result.serialize());\n    return serialized;\n};\n\nvar At = function At(type, index, input) {\n    this.type = type;\n    this.index = index;\n    this.input = input;\n};\nAt.parse = function parse(args, context) {\n    if (args.length !== 3) {\n        return context.error('Expected 2 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var index = context.parse(args[1], 1, NumberType);\n    var input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n    if (!index || !input) {\n        return null;\n    }\n    var t = input.type;\n    return new At(t.itemType, index, input);\n};\nAt.prototype.evaluate = function evaluate(ctx) {\n    var index
  = this.index.evaluate(ctx);\n    var array = this.input.evaluate(ctx);\n    if (index < 0) {\n        throw new RuntimeError('Array index out of bounds: ' + index + ' < 0.');\n    }\n    if (index >= array.length) {\n        throw new RuntimeError('Array index out of bounds: ' + index + ' > ' + (array.length - 1) + '.');\n    }\n    if (index !== Math.floor(index)) {\n        throw new RuntimeError('Array index must be an integer, but found ' + index + ' instead.');\n    }\n    return array[index];\n};\nAt.prototype.eachChild = function eachChild(fn) {\n    fn(this.index);\n    fn(this.input);\n};\nAt.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nAt.prototype.serialize = function serialize() {\n    return [\n        'at',\n        this.index.serialize(),\n        this.input.serialize()\n    ];\n};\n\nvar In = function In(needle, haystack) {\n    this.type = BooleanType;\n    this.needle = needle;\n    this.haystack = haystack;\n};\nIn.parse = function
  parse(args, context) {\n    if (args.length !== 3) {\n        return context.error('Expected 2 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var needle = context.parse(args[1], 1, ValueType);\n    var haystack = context.parse(args[2], 2, ValueType);\n    if (!needle || !haystack) {\n        return null;\n    }\n    if (!isValidType(needle.type, [\n            BooleanType,\n            StringType,\n            NumberType,\n            NullType,\n            ValueType\n        ])) {\n        return context.error('Expected first argument to be of type boolean, string, number or null, but found ' + toString(needle.type) + ' instead');\n    }\n    return new In(needle, haystack);\n};\nIn.prototype.evaluate = function evaluate(ctx) {\n    var needle = this.needle.evaluate(ctx);\n    var haystack = this.haystack.evaluate(ctx);\n    if (!haystack) {\n        return false;\n    }\n    if (!isValidNativeType(needle, [\n            'boolean',\n            'string',\n 
            'number',\n            'null'\n        ])) {\n        throw new RuntimeError('Expected first argument to be of type boolean, string, number or null, but found ' + toString(typeOf(needle)) + ' instead.');\n    }\n    if (!isValidNativeType(haystack, [\n            'string',\n            'array'\n        ])) {\n        throw new RuntimeError('Expected second argument to be of type array or string, but found ' + toString(typeOf(haystack)) + ' instead.');\n    }\n    return haystack.indexOf(needle) >= 0;\n};\nIn.prototype.eachChild = function eachChild(fn) {\n    fn(this.needle);\n    fn(this.haystack);\n};\nIn.prototype.outputDefined = function outputDefined() {\n    return true;\n};\nIn.prototype.serialize = function serialize() {\n    return [\n        'in',\n        this.needle.serialize(),\n        this.haystack.serialize()\n    ];\n};\n\nvar IndexOf = function IndexOf(needle, haystack, fromIndex) {\n    this.type = NumberType;\n    this.needle = needle;\n    this.haysta
 ck = haystack;\n    this.fromIndex = fromIndex;\n};\nIndexOf.parse = function parse(args, context) {\n    if (args.length <= 2 || args.length >= 5) {\n        return context.error('Expected 3 or 4 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var needle = context.parse(args[1], 1, ValueType);\n    var haystack = context.parse(args[2], 2, ValueType);\n    if (!needle || !haystack) {\n        return null;\n    }\n    if (!isValidType(needle.type, [\n            BooleanType,\n            StringType,\n            NumberType,\n            NullType,\n            ValueType\n        ])) {\n        return context.error('Expected first argument to be of type boolean, string, number or null, but found ' + toString(needle.type) + ' instead');\n    }\n    if (args.length === 4) {\n        var fromIndex = context.parse(args[3], 3, NumberType);\n        if (!fromIndex) {\n            return null;\n        }\n        return new IndexOf(needle, haystack, fromIndex);\n    } e
 lse {\n        return new IndexOf(needle, haystack);\n    }\n};\nIndexOf.prototype.evaluate = function evaluate(ctx) {\n    var needle = this.needle.evaluate(ctx);\n    var haystack = this.haystack.evaluate(ctx);\n    if (!isValidNativeType(needle, [\n            'boolean',\n            'string',\n            'number',\n            'null'\n        ])) {\n        throw new RuntimeError('Expected first argument to be of type boolean, string, number or null, but found ' + toString(typeOf(needle)) + ' instead.');\n    }\n    if (!isValidNativeType(haystack, [\n            'string',\n            'array'\n        ])) {\n        throw new RuntimeError('Expected second argument to be of type array or string, but found ' + toString(typeOf(haystack)) + ' instead.');\n    }\n    if (this.fromIndex) {\n        var fromIndex = this.fromIndex.evaluate(ctx);\n        return haystack.indexOf(needle, fromIndex);\n    }\n    return haystack.indexOf(needle);\n};\nIndexOf.prototype.eachChild = function
  eachChild(fn) {\n    fn(this.needle);\n    fn(this.haystack);\n    if (this.fromIndex) {\n        fn(this.fromIndex);\n    }\n};\nIndexOf.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nIndexOf.prototype.serialize = function serialize() {\n    if (this.fromIndex != null && this.fromIndex !== undefined) {\n        var fromIndex = this.fromIndex.serialize();\n        return [\n            'index-of',\n            this.needle.serialize(),\n            this.haystack.serialize(),\n            fromIndex\n        ];\n    }\n    return [\n        'index-of',\n        this.needle.serialize(),\n        this.haystack.serialize()\n    ];\n};\n\nvar Match = function Match(inputType, outputType, input, cases, outputs, otherwise) {\n    this.inputType = inputType;\n    this.type = outputType;\n    this.input = input;\n    this.cases = cases;\n    this.outputs = outputs;\n    this.otherwise = otherwise;\n};\nMatch.parse = function parse(args, context) {\n    if (args.l
 ength < 5) {\n        return context.error('Expected at least 4 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if (args.length % 2 !== 1) {\n        return context.error('Expected an even number of arguments.');\n    }\n    var inputType;\n    var outputType;\n    if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    var cases = {};\n    var outputs = [];\n    for (var i = 2; i < args.length - 1; i += 2) {\n        var labels = args[i];\n        var value = args[i + 1];\n        if (!Array.isArray(labels)) {\n            labels = [labels];\n        }\n        var labelContext = context.concat(i);\n        if (labels.length === 0) {\n            return labelContext.error('Expected at least one branch label.');\n        }\n        for (var i$1 = 0, list = labels; i$1 < list.length; i$1 += 1) {\n            var label = list[i$1];\n            if (typeof label !== 'number' && typeof label !== 'st
 ring') {\n                return labelContext.error('Branch labels must be numbers or strings.');\n            } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n                return labelContext.error('Branch labels must be integers no larger than ' + Number.MAX_SAFE_INTEGER + '.');\n            } else if (typeof label === 'number' && Math.floor(label) !== label) {\n                return labelContext.error('Numeric branch labels must be integer values.');\n            } else if (!inputType) {\n                inputType = typeOf(label);\n            } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n                return null;\n            }\n            if (typeof cases[String(label)] !== 'undefined') {\n                return labelContext.error('Branch labels must be unique.');\n            }\n            cases[String(label)] = outputs.length;\n        }\n        var result = context.parse(value, i, outputType);\n        if (!
 result) {\n            return null;\n        }\n        outputType = outputType || result.type;\n        outputs.push(result);\n    }\n    var input = context.parse(args[1], 1, ValueType);\n    if (!input) {\n        return null;\n    }\n    var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n    if (!otherwise) {\n        return null;\n    }\n    if (input.type.kind !== 'value' && context.concat(1).checkSubtype(inputType, input.type)) {\n        return null;\n    }\n    return new Match(inputType, outputType, input, cases, outputs, otherwise);\n};\nMatch.prototype.evaluate = function evaluate(ctx) {\n    var input = this.input.evaluate(ctx);\n    var output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise;\n    return output.evaluate(ctx);\n};\nMatch.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    this.outputs.forEach(fn);\n    fn(this.otherwise);\n};\nMatch.prototype.outputDefined = fun
 ction outputDefined() {\n    return this.outputs.every(function (out) {\n        return out.outputDefined();\n    }) && this.otherwise.outputDefined();\n};\nMatch.prototype.serialize = function serialize() {\n    var this$1 = this;\n    var serialized = [\n        'match',\n        this.input.serialize()\n    ];\n    var sortedLabels = Object.keys(this.cases).sort();\n    var groupedByOutput = [];\n    var outputLookup = {};\n    for (var i = 0, list = sortedLabels; i < list.length; i += 1) {\n        var label = list[i];\n        var outputIndex = outputLookup[this.cases[label]];\n        if (outputIndex === undefined) {\n            outputLookup[this.cases[label]] = groupedByOutput.length;\n            groupedByOutput.push([\n                this.cases[label],\n                [label]\n            ]);\n        } else {\n            groupedByOutput[outputIndex][1].push(label);\n        }\n    }\n    var coerceLabel = function (label) {\n        return this$1.inputType.kind === 'num
 ber' ? Number(label) : label;\n    };\n    for (var i$1 = 0, list$1 = groupedByOutput; i$1 < list$1.length; i$1 += 1) {\n        var ref = list$1[i$1];\n        var outputIndex = ref[0];\n        var labels = ref[1];\n        if (labels.length === 1) {\n            serialized.push(coerceLabel(labels[0]));\n        } else {\n            serialized.push(labels.map(coerceLabel));\n        }\n        serialized.push(this.outputs[outputIndex$1].serialize());\n    }\n    serialized.push(this.otherwise.serialize());\n    return serialized;\n};\n\nvar Case = function Case(type, branches, otherwise) {\n    this.type = type;\n    this.branches = branches;\n    this.otherwise = otherwise;\n};\nCase.parse = function parse(args, context) {\n    if (args.length < 4) {\n        return context.error('Expected at least 3 arguments, but found only ' + (args.length - 1) + '.');\n    }\n    if (args.length % 2 !== 0) {\n        return context.error('Expected an odd number of arguments.');\n    }\n    v
 ar outputType;\n    if (context.expectedType && context.expectedType.kind !== 'value') {\n        outputType = context.expectedType;\n    }\n    var branches = [];\n    for (var i = 1; i < args.length - 1; i += 2) {\n        var test = context.parse(args[i], i, BooleanType);\n        if (!test) {\n            return null;\n        }\n        var result = context.parse(args[i + 1], i + 1, outputType);\n        if (!result) {\n            return null;\n        }\n        branches.push([\n            test,\n            result\n        ]);\n        outputType = outputType || result.type;\n    }\n    var otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n    if (!otherwise) {\n        return null;\n    }\n    return new Case(outputType, branches, otherwise);\n};\nCase.prototype.evaluate = function evaluate(ctx) {\n    for (var i = 0, list = this.branches; i < list.length; i += 1) {\n        var ref = list[i];\n        var test = ref[0];\n        var expressio
 n = ref[1];\n        if (test.evaluate(ctx)) {\n            return expression.evaluate(ctx);\n        }\n    }\n    return this.otherwise.evaluate(ctx);\n};\nCase.prototype.eachChild = function eachChild(fn) {\n    for (var i = 0, list = this.branches; i < list.length; i += 1) {\n        var ref = list[i];\n        var test = ref[0];\n        var expression = ref[1];\n        fn(test);\n        fn(expression);\n    }\n    fn(this.otherwise);\n};\nCase.prototype.outputDefined = function outputDefined() {\n    return this.branches.every(function (ref) {\n        var _ = ref[0];\n        var out = ref[1];\n        return out.outputDefined();\n    }) && this.otherwise.outputDefined();\n};\nCase.prototype.serialize = function serialize() {\n    var serialized = ['case'];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar Slice = function Slice(type, input, beginIndex, endIndex) {\n    this.type = type;\n    this
 .input = input;\n    this.beginIndex = beginIndex;\n    this.endIndex = endIndex;\n};\nSlice.parse = function parse(args, context) {\n    if (args.length <= 2 || args.length >= 5) {\n        return context.error('Expected 3 or 4 arguments, but found ' + (args.length - 1) + ' instead.');\n    }\n    var input = context.parse(args[1], 1, ValueType);\n    var beginIndex = context.parse(args[2], 2, NumberType);\n    if (!input || !beginIndex) {\n        return null;\n    }\n    if (!isValidType(input.type, [\n            array(ValueType),\n            StringType,\n            ValueType\n        ])) {\n        return context.error('Expected first argument to be of type array or string, but found ' + toString(input.type) + ' instead');\n    }\n    if (args.length === 4) {\n        var endIndex = context.parse(args[3], 3, NumberType);\n        if (!endIndex) {\n            return null;\n        }\n        return new Slice(input.type, input, beginIndex, endIndex);\n    } else {\n        ret
 urn new Slice(input.type, input, beginIndex);\n    }\n};\nSlice.prototype.evaluate = function evaluate(ctx) {\n    var input = this.input.evaluate(ctx);\n    var beginIndex = this.beginIndex.evaluate(ctx);\n    if (!isValidNativeType(input, [\n            'string',\n            'array'\n        ])) {\n        throw new RuntimeError('Expected first argument to be of type array or string, but found ' + toString(typeOf(input)) + ' instead.');\n    }\n    if (this.endIndex) {\n        var endIndex = this.endIndex.evaluate(ctx);\n        return input.slice(beginIndex, endIndex);\n    }\n    return input.slice(beginIndex);\n};\nSlice.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n    fn(this.beginIndex);\n    if (this.endIndex) {\n        fn(this.endIndex);\n    }\n};\nSlice.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nSlice.prototype.serialize = function serialize() {\n    if (this.endIndex != null && this.endIndex !== undefined) {\n 
        var endIndex = this.endIndex.serialize();\n        return [\n            'slice',\n            this.input.serialize(),\n            this.beginIndex.serialize(),\n            endIndex\n        ];\n    }\n    return [\n        'slice',\n        this.input.serialize(),\n        this.beginIndex.serialize()\n    ];\n};\n\nfunction isComparableType(op, type) {\n    if (op === '==' || op === '!=') {\n        return type.kind === 'boolean' || type.kind === 'string' || type.kind === 'number' || type.kind === 'null' || type.kind === 'value';\n    } else {\n        return type.kind === 'string' || type.kind === 'number' || type.kind === 'value';\n    }\n}\nfunction eq(ctx, a, b) {\n    return a === b;\n}\nfunction neq(ctx, a, b) {\n    return a !== b;\n}\nfunction lt(ctx, a, b) {\n    return a < b;\n}\nfunction gt(ctx, a, b) {\n    return a > b;\n}\nfunction lteq(ctx, a, b) {\n    return a <= b;\n}\nfunction gteq(ctx, a, b) {\n    return a >= b;\n}\nfunction eqCollate(ctx, a, b, c) {\n 
    return c.compare(a, b) === 0;\n}\nfunction neqCollate(ctx, a, b, c) {\n    return !eqCollate(ctx, a, b, c);\n}\nfunction ltCollate(ctx, a, b, c) {\n    return c.compare(a, b) < 0;\n}\nfunction gtCollate(ctx, a, b, c) {\n    return c.compare(a, b) > 0;\n}\nfunction lteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) <= 0;\n}\nfunction gteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) >= 0;\n}\nfunction makeComparison(op, compareBasic, compareWithCollator) {\n    var isOrderComparison = op !== '==' && op !== '!=';\n    return function () {\n        function Comparison(lhs, rhs, collator) {\n            this.type = BooleanType;\n            this.lhs = lhs;\n            this.rhs = rhs;\n            this.collator = collator;\n            this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n        }\n        Comparison.parse = function parse(args, context) {\n            if (args.length !== 3 && args.length !== 4) {\n                return conte
 xt.error('Expected two or three arguments.');\n            }\n            var op = args[0];\n            var lhs = context.parse(args[1], 1, ValueType);\n            if (!lhs) {\n                return null;\n            }\n            if (!isComparableType(op, lhs.type)) {\n                return context.concat(1).error('\"' + op + '\" comparisons are not supported for type \\'' + toString(lhs.type) + '\\'.');\n            }\n            var rhs = context.parse(args[2], 2, ValueType);\n            if (!rhs) {\n                return null;\n            }\n            if (!isComparableType(op, rhs.type)) {\n                return context.concat(2).error('\"' + op + '\" comparisons are not supported for type \\'' + toString(rhs.type) + '\\'.');\n            }\n            if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n                return context.error('Cannot compare types \\'' + toString(lhs.type) + '\\' and \\'' + toString(rhs.ty
 pe) + '\\'.');\n            }\n            if (isOrderComparison) {\n                if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n                    lhs = new Assertion(rhs.type, [lhs]);\n                } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n                    rhs = new Assertion(lhs.type, [rhs]);\n                }\n            }\n            var collator = null;\n            if (args.length === 4) {\n                if (lhs.type.kind !== 'string' && rhs.type.kind !== 'string' && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n                    return context.error('Cannot use collator to compare non-string types.');\n                }\n                collator = context.parse(args[3], 3, CollatorType);\n                if (!collator) {\n                    return null;\n                }\n            }\n            return new Comparison(lhs, rhs, collator);\n        };\n        Comparison.prototype.evaluate = functio
 n evaluate(ctx) {\n            var lhs = this.lhs.evaluate(ctx);\n            var rhs = this.rhs.evaluate(ctx);\n            if (isOrderComparison && this.hasUntypedArgument) {\n                var lt = typeOf(lhs);\n                var rt = typeOf(rhs);\n                if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n                    throw new RuntimeError('Expected arguments for \"' + op + '\" to be (string, string) or (number, number), but found (' + lt.kind + ', ' + rt.kind + ') instead.');\n                }\n            }\n            if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n                var lt$1 = typeOf(lhs);\n                var rt$1 = typeOf(rhs);\n                if (lt$1.kind !== 'string' || rt$1.kind !== 'string') {\n                    return compareBasic(ctx, lhs, rhs);\n                }\n            }\n            return this.collator ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) 
 : compareBasic(ctx, lhs, rhs);\n        };\n        Comparison.prototype.eachChild = function eachChild(fn) {\n            fn(this.lhs);\n            fn(this.rhs);\n            if (this.collator) {\n                fn(this.collator);\n            }\n        };\n        Comparison.prototype.outputDefined = function outputDefined() {\n            return true;\n        };\n        Comparison.prototype.serialize = function serialize() {\n            var serialized = [op];\n            this.eachChild(function (child) {\n                serialized.push(child.serialize());\n            });\n            return serialized;\n        };\n        return Comparison;\n    }();\n}\nvar Equals = makeComparison('==', eq, eqCollate);\nvar NotEquals = makeComparison('!=', neq, neqCollate);\nvar LessThan = makeComparison('<', lt, ltCollate);\nvar GreaterThan = makeComparison('>', gt, gtCollate);\nvar LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nvar GreaterThanOrEqual = makeComparison('>=
 ', gteq, gteqCollate);\n\nvar NumberFormat = function NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits) {\n    this.type = StringType;\n    this.number = number;\n    this.locale = locale;\n    this.currency = currency;\n    this.minFractionDigits = minFractionDigits;\n    this.maxFractionDigits = maxFractionDigits;\n};\nNumberFormat.parse = function parse(args, context) {\n    if (args.length !== 3) {\n        return context.error('Expected two arguments.');\n    }\n    var number = context.parse(args[1], 1, NumberType);\n    if (!number) {\n        return null;\n    }\n    var options = args[2];\n    if (typeof options !== 'object' || Array.isArray(options)) {\n        return context.error('NumberFormat options argument must be an object.');\n    }\n    var locale = null;\n    if (options['locale']) {\n        locale = context.parse(options['locale'], 1, StringType);\n        if (!locale) {\n            return null;\n        }\n    }\n    var currency = 
 null;\n    if (options['currency']) {\n        currency = context.parse(options['currency'], 1, StringType);\n        if (!currency) {\n            return null;\n        }\n    }\n    var minFractionDigits = null;\n    if (options['min-fraction-digits']) {\n        minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n        if (!minFractionDigits) {\n            return null;\n        }\n    }\n    var maxFractionDigits = null;\n    if (options['max-fraction-digits']) {\n        maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n        if (!maxFractionDigits) {\n            return null;\n        }\n    }\n    return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n};\nNumberFormat.prototype.evaluate = function evaluate(ctx) {\n    return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {\n        style: this.currency ? 'currency' : 'decimal',\n        currency: this.cu
 rrency ? this.currency.evaluate(ctx) : undefined,\n        minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,\n        maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined\n    }).format(this.number.evaluate(ctx));\n};\nNumberFormat.prototype.eachChild = function eachChild(fn) {\n    fn(this.number);\n    if (this.locale) {\n        fn(this.locale);\n    }\n    if (this.currency) {\n        fn(this.currency);\n    }\n    if (this.minFractionDigits) {\n        fn(this.minFractionDigits);\n    }\n    if (this.maxFractionDigits) {\n        fn(this.maxFractionDigits);\n    }\n};\nNumberFormat.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nNumberFormat.prototype.serialize = function serialize() {\n    var options = {};\n    if (this.locale) {\n        options['locale'] = this.locale.serialize();\n    }\n    if (this.currency) {\n        options['currency'] = this.curre
 ncy.serialize();\n    }\n    if (this.minFractionDigits) {\n        options['min-fraction-digits'] = this.minFractionDigits.serialize();\n    }\n    if (this.maxFractionDigits) {\n        options['max-fraction-digits'] = this.maxFractionDigits.serialize();\n    }\n    return [\n        'number-format',\n        this.number.serialize(),\n        options\n    ];\n};\n\nvar Length = function Length(input) {\n    this.type = NumberType;\n    this.input = input;\n};\nLength.parse = function parse(args, context) {\n    if (args.length !== 2) {\n        return context.error('Expected 1 argument, but found ' + (args.length - 1) + ' instead.');\n    }\n    var input = context.parse(args[1], 1);\n    if (!input) {\n        return null;\n    }\n    if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value') {\n        return context.error('Expected argument of type string or array, but found ' + toString(input.type) + ' instead.');\n    }\n    return new Len
 gth(input);\n};\nLength.prototype.evaluate = function evaluate(ctx) {\n    var input = this.input.evaluate(ctx);\n    if (typeof input === 'string') {\n        return input.length;\n    } else if (Array.isArray(input)) {\n        return input.length;\n    } else {\n        throw new RuntimeError('Expected value to be of type string or array, but found ' + toString(typeOf(input)) + ' instead.');\n    }\n};\nLength.prototype.eachChild = function eachChild(fn) {\n    fn(this.input);\n};\nLength.prototype.outputDefined = function outputDefined() {\n    return false;\n};\nLength.prototype.serialize = function serialize() {\n    var serialized = ['length'];\n    this.eachChild(function (child) {\n        serialized.push(child.serialize());\n    });\n    return serialized;\n};\n\nvar expressions = {\n    '==': Equals,\n    '!=': NotEquals,\n    '>': GreaterThan,\n    '<': LessThan,\n    '>=': GreaterThanOrEqual,\n    '<=': LessThanOrEqual,\n    'array': Assertion,\n    'at': At,\n    'bool
 ean': Assertion,\n    'case': Case,\n    'coalesce': Coalesce,\n    'collator': CollatorExpression,\n    'format': FormatExpression,\n    'image': ImageExpression,\n    'in': In,\n    'index-of': IndexOf,\n    'interpolate': Interpolate,\n    'interpolate-hcl': Interpolate,\n    'interpolate-lab': Interpolate,\n    'length': Length,\n    'let': Let,\n    'literal': Literal,\n    'match': Match,\n    'number': Assertion,\n    'number-format': NumberFormat,\n    'object': Assertion,\n    'slice': Slice,\n    'step': Step,\n    'string': Assertion,\n    'to-boolean': Coercion,\n    'to-color': Coercion,\n    'to-number': Coercion,\n    'to-string': Coercion,\n    'var': Var,\n    'within': Within\n};\nfunction rgba(ctx, ref) {\n    var r = ref[0];\n    var g = ref[1];\n    var b = ref[2];\n    var a = ref[3];\n    r = r.evaluate(ctx);\n    g = g.evaluate(ctx);\n    b = b.evaluate(ctx);\n    var alpha = a ? a.evaluate(ctx) : 1;\n    var error = validateRGBA(r, g, b, alpha);\n    if (err
 or) {\n        throw new RuntimeError(error);\n    }\n    return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\nfunction has(key, obj) {\n    return key in obj;\n}\nfunction get(key, obj) {\n    var v = obj[key];\n    return typeof v === 'undefined' ? null : v;\n}\nfunction binarySearch(v, a, i, j) {\n    while (i <= j) {\n        var m = i + j >> 1;\n        if (a[m] === v) {\n            return true;\n        }\n        if (a[m] > v) {\n            j = m - 1;\n        } else {\n            i = m + 1;\n        }\n    }\n    return false;\n}\nfunction varargs(type) {\n    return { type: type };\n}\nCompoundExpression.register(expressions, {\n    'error': [\n        ErrorType,\n        [StringType],\n        function (ctx, ref) {\n            var v = ref[0];\n            throw new RuntimeError(v.evaluate(ctx));\n        }\n    ],\n    'typeof': [\n        StringType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n         
    return toString(typeOf(v.evaluate(ctx)));\n        }\n    ],\n    'to-rgba': [\n        array(NumberType, 4),\n        [ColorType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return v.evaluate(ctx).toArray();\n        }\n    ],\n    'rgb': [\n        ColorType,\n        [\n            NumberType,\n            NumberType,\n            NumberType\n        ],\n        rgba\n    ],\n    'rgba': [\n        ColorType,\n        [\n            NumberType,\n            NumberType,\n            NumberType,\n            NumberType\n        ],\n        rgba\n    ],\n    'has': {\n        type: BooleanType,\n        overloads: [\n            [\n                [StringType],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    return has(key.evaluate(ctx), ctx.properties());\n                }\n            ],\n            [\n                [\n                    StringType,\n                    ObjectType\n           
      ],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    var obj = ref[1];\n                    return has(key.evaluate(ctx), obj.evaluate(ctx));\n                }\n            ]\n        ]\n    },\n    'get': {\n        type: ValueType,\n        overloads: [\n            [\n                [StringType],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    return get(key.evaluate(ctx), ctx.properties());\n                }\n            ],\n            [\n                [\n                    StringType,\n                    ObjectType\n                ],\n                function (ctx, ref) {\n                    var key = ref[0];\n                    var obj = ref[1];\n                    return get(key.evaluate(ctx), obj.evaluate(ctx));\n                }\n            ]\n        ]\n    },\n    'feature-state': [\n        ValueType,\n        [StringType],\n        function (ctx, ref) {
 \n            var key = ref[0];\n            return get(key.evaluate(ctx), ctx.featureState || {});\n        }\n    ],\n    'properties': [\n        ObjectType,\n        [],\n        function (ctx) {\n            return ctx.properties();\n        }\n    ],\n    'geometry-type': [\n        StringType,\n        [],\n        function (ctx) {\n            return ctx.geometryType();\n        }\n    ],\n    'id': [\n        ValueType,\n        [],\n        function (ctx) {\n            return ctx.id();\n        }\n    ],\n    'zoom': [\n        NumberType,\n        [],\n        function (ctx) {\n            return ctx.globals.zoom;\n        }\n    ],\n    'heatmap-density': [\n        NumberType,\n        [],\n        function (ctx) {\n            return ctx.globals.heatmapDensity || 0;\n        }\n    ],\n    'line-progress': [\n        NumberType,\n        [],\n        function (ctx) {\n            return ctx.globals.lineProgress || 0;\n        }\n    ],\n    'accumulated': [\n        V
 alueType,\n        [],\n        function (ctx) {\n            return ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated;\n        }\n    ],\n    '+': [\n        NumberType,\n        varargs(NumberType),\n        function (ctx, args) {\n            var result = 0;\n            for (var i = 0, list = args; i < list.length; i += 1) {\n                var arg = list[i];\n                result += arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '*': [\n        NumberType,\n        varargs(NumberType),\n        function (ctx, args) {\n            var result = 1;\n            for (var i = 0, list = args; i < list.length; i += 1) {\n                var arg = list[i];\n                result *= arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '-': {\n        type: NumberType,\n        overloads: [\n            [\n                [\n                    NumberType,\n                    NumberType\n  
               ],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    var b = ref[1];\n                    return a.evaluate(ctx) - b.evaluate(ctx);\n                }\n            ],\n            [\n                [NumberType],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    return -a.evaluate(ctx);\n                }\n            ]\n        ]\n    },\n    '/': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        function (ctx, ref) {\n            var a = ref[0];\n            var b = ref[1];\n            return a.evaluate(ctx) / b.evaluate(ctx);\n        }\n    ],\n    '%': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        function (ctx, ref) {\n            var a = ref[0];\n            var b = ref[1];\n            return a.evaluate(ctx) % b.evaluate(ctx);\n        }\n    ],\n    'ln2': 
 [\n        NumberType,\n        [],\n        function () {\n            return Math.LN2;\n        }\n    ],\n    'pi': [\n        NumberType,\n        [],\n        function () {\n            return Math.PI;\n        }\n    ],\n    'e': [\n        NumberType,\n        [],\n        function () {\n            return Math.E;\n        }\n    ],\n    '^': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        function (ctx, ref) {\n            var b = ref[0];\n            var e = ref[1];\n            return Math.pow(b.evaluate(ctx), e.evaluate(ctx));\n        }\n    ],\n    'sqrt': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var x = ref[0];\n            return Math.sqrt(x.evaluate(ctx));\n        }\n    ],\n    'log10': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.log(n.evaluate(ctx)) / Math.LN10;\n        }\n 
    ],\n    'ln': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.log(n.evaluate(ctx));\n        }\n    ],\n    'log2': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.log(n.evaluate(ctx)) / Math.LN2;\n        }\n    ],\n    'sin': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.sin(n.evaluate(ctx));\n        }\n    ],\n    'cos': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.cos(n.evaluate(ctx));\n        }\n    ],\n    'tan': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.tan(n.evaluate(ctx));\n        }\n    ],\n    'asin': [\n        NumberType,\n        [NumberType],\n
         function (ctx, ref) {\n            var n = ref[0];\n            return Math.asin(n.evaluate(ctx));\n        }\n    ],\n    'acos': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.acos(n.evaluate(ctx));\n        }\n    ],\n    'atan': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.atan(n.evaluate(ctx));\n        }\n    ],\n    'min': [\n        NumberType,\n        varargs(NumberType),\n        function (ctx, args) {\n            return Math.min.apply(Math, args.map(function (arg) {\n                return arg.evaluate(ctx);\n            }));\n        }\n    ],\n    'max': [\n        NumberType,\n        varargs(NumberType),\n        function (ctx, args) {\n            return Math.max.apply(Math, args.map(function (arg) {\n                return arg.evaluate(ctx);\n            }));\n        }\n    ],\n    'abs':
  [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.abs(n.evaluate(ctx));\n        }\n    ],\n    'round': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            var v = n.evaluate(ctx);\n            return v < 0 ? -Math.round(-v) : Math.round(v);\n        }\n    ],\n    'floor': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.floor(n.evaluate(ctx));\n        }\n    ],\n    'ceil': [\n        NumberType,\n        [NumberType],\n        function (ctx, ref) {\n            var n = ref[0];\n            return Math.ceil(n.evaluate(ctx));\n        }\n    ],\n    'filter-==': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n         
    return ctx.properties()[k.value] === v.value;\n        }\n    ],\n    'filter-id-==': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return ctx.id() === v.value;\n        }\n    ],\n    'filter-type-==': [\n        BooleanType,\n        [StringType],\n        function (ctx, ref) {\n            var v = ref[0];\n            return ctx.geometryType() === v.value;\n        }\n    ],\n    'filter-<': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter-id-<': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n  
           return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter->': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-id->': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-<=': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b
  && a <= b;\n        }\n    ],\n    'filter-id-<=': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter->=': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            var a = ctx.properties()[k.value];\n            var b = v.value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-id->=': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) {\n            var v = ref[0];\n            var a = ctx.id();\n            var b = v.value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-has': [\n        BooleanType,\n        [ValueType],\n        function (ctx, ref) 
 {\n            var k = ref[0];\n            return k.value in ctx.properties();\n        }\n    ],\n    'filter-has-id': [\n        BooleanType,\n        [],\n        function (ctx) {\n            return ctx.id() !== null && ctx.id() !== undefined;\n        }\n    ],\n    'filter-type-in': [\n        BooleanType,\n        [array(StringType)],\n        function (ctx, ref) {\n            var v = ref[0];\n            return v.value.indexOf(ctx.geometryType()) >= 0;\n        }\n    ],\n    'filter-id-in': [\n        BooleanType,\n        [array(ValueType)],\n        function (ctx, ref) {\n            var v = ref[0];\n            return v.value.indexOf(ctx.id()) >= 0;\n        }\n    ],\n    'filter-in-small': [\n        BooleanType,\n        [\n            StringType,\n            array(ValueType)\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            return v.value.indexOf(ctx.properties()[k.value]) >= 0;\n        }\n    ],\n  
   'filter-in-large': [\n        BooleanType,\n        [\n            StringType,\n            array(ValueType)\n        ],\n        function (ctx, ref) {\n            var k = ref[0];\n            var v = ref[1];\n            return binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1);\n        }\n    ],\n    'all': {\n        type: BooleanType,\n        overloads: [\n            [\n                [\n                    BooleanType,\n                    BooleanType\n                ],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    var b = ref[1];\n                    return a.evaluate(ctx) && b.evaluate(ctx);\n                }\n            ],\n            [\n                varargs(BooleanType),\n                function (ctx, args) {\n                    for (var i = 0, list = args; i < list.length; i += 1) {\n                        var arg = list[i];\n                        if (!arg.evaluate(ctx)) {\n         
                    return false;\n                        }\n                    }\n                    return true;\n                }\n            ]\n        ]\n    },\n    'any': {\n        type: BooleanType,\n        overloads: [\n            [\n                [\n                    BooleanType,\n                    BooleanType\n                ],\n                function (ctx, ref) {\n                    var a = ref[0];\n                    var b = ref[1];\n                    return a.evaluate(ctx) || b.evaluate(ctx);\n                }\n            ],\n            [\n                varargs(BooleanType),\n                function (ctx, args) {\n                    for (var i = 0, list = args; i < list.length; i += 1) {\n                        var arg = list[i];\n                        if (arg.evaluate(ctx)) {\n                            return true;\n                        }\n                    }\n                    return false;\n                }\n            ]\n   
      ]\n    },\n    '!': [\n        BooleanType,\n        [BooleanType],\n        function (ctx, ref) {\n            var b = ref[0];\n            return !b.evaluate(ctx);\n        }\n    ],\n    'is-supported-script': [\n        BooleanType,\n        [StringType],\n        function (ctx, ref) {\n            var s = ref[0];\n            var isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n            if (isSupportedScript) {\n                return isSupportedScript(s.evaluate(ctx));\n            }\n            return true;\n        }\n    ],\n    'upcase': [\n        StringType,\n        [StringType],\n        function (ctx, ref) {\n            var s = ref[0];\n            return s.evaluate(ctx).toUpperCase();\n        }\n    ],\n    'downcase': [\n        StringType,\n        [StringType],\n        function (ctx, ref) {\n            var s = ref[0];\n            return s.evaluate(ctx).toLowerCase();\n        }\n    ],\n    'concat': [\n        StringType,\n        
 varargs(ValueType),\n        function (ctx, args) {\n            return args.map(function (arg) {\n                return toString$1(arg.evaluate(ctx));\n            }).join('');\n        }\n    ],\n    'resolved-locale': [\n        StringType,\n        [CollatorType],\n        function (ctx, ref) {\n            var collator = ref[0];\n            return collator.evaluate(ctx).resolvedLocale();\n        }\n    ]\n});\n\nfunction success(value) {\n    return {\n        result: 'success',\n        value: value\n    };\n}\nfunction error(value) {\n    return {\n        result: 'error',\n        value: value\n    };\n}\n\nfunction supportsPropertyExpression(spec) {\n    return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\nfunction supportsZoomExpression(spec) {\n    return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\nfunction supportsInterpolation(spec) {\n    return !!spec.expression && spec.expression.i
 nterpolated;\n}\n\nfunction getType(val) {\n    if (val instanceof Number) {\n        return 'number';\n    } else if (val instanceof String) {\n        return 'string';\n    } else if (val instanceof Boolean) {\n        return 'boolean';\n    } else if (Array.isArray(val)) {\n        return 'array';\n    } else if (val === null) {\n        return 'null';\n    } else {\n        return typeof val;\n    }\n}\n\nfunction isFunction$1(value) {\n    return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nfunction identityFunction(x) {\n    return x;\n}\nfunction createFunction(parameters, propertySpec) {\n    var isColor = propertySpec.type === 'color';\n    var zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n    var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    var type = parameters.type || (supportsInterpolati
 on(propertySpec) ? 'exponential' : 'interval');\n    if (isColor) {\n        parameters = extend({}, parameters);\n        if (parameters.stops) {\n            parameters.stops = parameters.stops.map(function (stop) {\n                return [\n                    stop[0],\n                    Color.parse(stop[1])\n                ];\n            });\n        }\n        if (parameters.default) {\n            parameters.default = Color.parse(parameters.default);\n        } else {\n            parameters.default = Color.parse(propertySpec.default);\n        }\n    }\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {\n        throw new Error('Unknown color space: ' + parameters.colorSpace);\n    }\n    var innerFun;\n    var hashedStops;\n    var categoricalKeyType;\n    if (type === 'exponential') {\n        innerFun = evaluateExponentialFunction;\n    } else if (type === 'interval') {\n        innerFun = evaluateIntervalFunctio
 n;\n    } else if (type === 'categorical') {\n        innerFun = evaluateCategoricalFunction;\n        hashedStops = Object.create(null);\n        for (var i = 0, list = parameters.stops; i < list.length; i += 1) {\n            var stop = list[i];\n            hashedStops[stop[0]] = stop[1];\n        }\n        categoricalKeyType = typeof parameters.stops[0][0];\n    } else if (type === 'identity') {\n        innerFun = evaluateIdentityFunction;\n    } else {\n        throw new Error('Unknown function type \"' + type + '\"');\n    }\n    if (zoomAndFeatureDependent) {\n        var featureFunctions = {};\n        var zoomStops = [];\n        for (var s = 0; s < parameters.stops.length; s++) {\n            var stop$1 = parameters.stops[s];\n            var zoom = stop$1[0].zoom;\n            if (featureFunctions[zoom] === undefined) {\n                featureFunctions[zoom] = {\n                    zoom: zoom,\n                    type: parameters.type,\n                    property: 
 parameters.property,\n                    default: parameters.default,\n                    stops: []\n                };\n                zoomStops.push(zoom);\n            }\n            featureFunctions[zoom].stops.push([\n                stop$1[0].value,\n                stop$1[1]\n            ]);\n        }\n        var featureFunctionStops = [];\n        for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) {\n            var z = list$1[i$1];\n            featureFunctionStops.push([\n                featureFunctions[z].zoom,\n                createFunction(featureFunctions[z], propertySpec)\n            ]);\n        }\n        var interpolationType = { name: 'linear' };\n        return {\n            kind: 'composite',\n            interpolationType: interpolationType,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n            zoomStops: featureFunctionStops.map(function (s) {\n                return s[0];\
 n            }),\n            evaluate: function evaluate(ref, properties) {\n                var zoom = ref.zoom;\n                return evaluateExponentialFunction({\n                    stops: featureFunctionStops,\n                    base: parameters.base\n                }, propertySpec, zoom).evaluate(zoom, properties);\n            }\n        };\n    } else if (zoomDependent) {\n        var interpolationType$1 = type === 'exponential' ? {\n            name: 'exponential',\n            base: parameters.base !== undefined ? parameters.base : 1\n        } : null;\n        return {\n            kind: 'camera',\n            interpolationType: interpolationType$1,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType$1),\n            zoomStops: parameters.stops.map(function (s) {\n                return s[0];\n            }),\n            evaluate: function (ref) {\n                var zoom = ref.zoom;\n                return innerFun
 (parameters, propertySpec, zoom, hashedStops, categoricalKeyType);\n            }\n        };\n    } else {\n        return {\n            kind: 'source',\n            evaluate: function evaluate(_, feature) {\n                var value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n                if (value === undefined) {\n                    return coalesce(parameters.default, propertySpec.default);\n                }\n                return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n            }\n        };\n    }\n}\nfunction coalesce(a, b, c) {\n    if (a !== undefined) {\n        return a;\n    }\n    if (b !== undefined) {\n        return b;\n    }\n    if (c !== undefined) {\n        return c;\n    }\n}\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n    var evaluated = typeof input === keyType ? hashedStops[input] : undefined;\n    return coalesce(ev
 aluated, parameters.default, propertySpec.default);\n}\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n    if (getType(input) !== 'number') {\n        return coalesce(parameters.default, propertySpec.default);\n    }\n    var n = parameters.stops.length;\n    if (n === 1) {\n        return parameters.stops[0][1];\n    }\n    if (input <= parameters.stops[0][0]) {\n        return parameters.stops[0][1];\n    }\n    if (input >= parameters.stops[n - 1][0]) {\n        return parameters.stops[n - 1][1];\n    }\n    var index = findStopLessThanOrEqualTo(parameters.stops.map(function (stop) {\n        return stop[0];\n    }), input);\n    return parameters.stops[index][1];\n}\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n    var base = parameters.base !== undefined ? parameters.base : 1;\n    if (getType(input) !== 'number') {\n        return coalesce(parameters.default, propertySpec.default);\n    }\n    var n = parameters.stops.length;\
 n    if (n === 1) {\n        return parameters.stops[0][1];\n    }\n    if (input <= parameters.stops[0][0]) {\n        return parameters.stops[0][1];\n    }\n    if (input >= parameters.stops[n - 1][0]) {\n        return parameters.stops[n - 1][1];\n    }\n    var index = findStopLessThanOrEqualTo(parameters.stops.map(function (stop) {\n        return stop[0];\n    }), input);\n    var t = interpolationFactor(input, base, parameters.stops[index][0], parameters.stops[index + 1][0]);\n    var outputLower = parameters.stops[index][1];\n    var outputUpper = parameters.stops[index + 1][1];\n    var interp = interpolate[propertySpec.type] || identityFunction;\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n        var colorspace = colorSpaces[parameters.colorSpace];\n        interp = function (a, b) {\n            return colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n        };\n    }\n    if (typeof outputLower.evalua
 te === 'function') {\n        return {\n            evaluate: function evaluate() {\n                var args = [], len = arguments.length;\n                while (len--)\n                    args[len] = arguments[len];\n                var evaluatedLower = outputLower.evaluate.apply(undefined, args);\n                var evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n                if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n                    return undefined;\n                }\n                return interp(evaluatedLower, evaluatedUpper, t);\n            }\n        };\n    }\n    return interp(outputLower, outputUpper, t);\n}\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n    if (propertySpec.type === 'color') {\n        input = Color.parse(input);\n    } else if (propertySpec.type === 'formatted') {\n        input = Formatted.fromString(input.toString());\n    } else if (propertySpec.type === 'resolvedImage') {
 \n        input = ResolvedImage.fromString(input.toString());\n    } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n        input = undefined;\n    }\n    return coalesce(input, parameters.default, propertySpec.default);\n}\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n    var difference = upperValue - lowerValue;\n    var progress = input - lowerValue;\n    if (difference === 0) {\n        return 0;\n    } else if (base === 1) {\n        return progress / difference;\n    } else {\n        return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n    }\n}\n\nvar StyleExpression = function StyleExpression(expression, propertySpec) {\n    this.expression = expression;\n    this._warningHistory = {};\n    this._evaluator = new EvaluationContext();\n    this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n    this._enumValues = propertySpec && propertySpec.
 type === 'enum' ? propertySpec.values : null;\n};\nStyleExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    this._evaluator.globals = globals;\n    this._evaluator.feature = feature;\n    this._evaluator.featureState = featureState;\n    this._evaluator.canonical = canonical;\n    this._evaluator.availableImages = availableImages || null;\n    this._evaluator.formattedSection = formattedSection;\n    return this.expression.evaluate(this._evaluator);\n};\nStyleExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    this._evaluator.globals = globals;\n    this._evaluator.feature = feature || null;\n    this._evaluator.featureState = featureState || null;\n    this._evaluator.canonical = canonical;\n    this._evaluator.availableImages = availableImages || null;\n    this._evaluator.forma
 ttedSection = formattedSection || null;\n    try {\n        var val = this.expression.evaluate(this._evaluator);\n        if (val === null || val === undefined || typeof val === 'number' && val !== val) {\n            return this._defaultValue;\n        }\n        if (this._enumValues && !(val in this._enumValues)) {\n            throw new RuntimeError('Expected value to be one of ' + Object.keys(this._enumValues).map(function (v) {\n                return JSON.stringify(v);\n            }).join(', ') + ', but found ' + JSON.stringify(val) + ' instead.');\n        }\n        return val;\n    } catch (e) {\n        if (!this._warningHistory[e.message]) {\n            this._warningHistory[e.message] = true;\n            if (typeof console !== 'undefined') {\n                console.warn(e.message);\n            }\n        }\n        return this._defaultValue;\n    }\n};\nfunction isExpression(expression) {\n    return Array.isArray(expression) && expression.length > 0 && typeof expres
 sion[0] === 'string' && expression[0] in expressions;\n}\nfunction createExpression(expression, propertySpec) {\n    var parser = new ParsingContext(expressions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n    var parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined);\n    if (!parsed) {\n        return error(parser.errors);\n    }\n    return success(new StyleExpression(parsed, propertySpec));\n}\nvar ZoomConstantExpression = function ZoomConstantExpression(kind, expression) {\n    this.kind = kind;\n    this._styleExpression = expression;\n    this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);\n};\nZoomConstantExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluateWith
 outErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomConstantExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nvar ZoomDependentExpression = function ZoomDependentExpression(kind, expression, zoomStops, interpolationType) {\n    this.kind = kind;\n    this.zoomStops = zoomStops;\n    this._styleExpression = expression;\n    this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);\n    this.interpolationType = interpolationType;\n};\nZoomDependentExpression.prototype.evaluateWithoutErrorHandling = function evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureS
 tate, canonical, availableImages, formattedSection);\n};\nZoomDependentExpression.prototype.evaluate = function evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n    return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n};\nZoomDependentExpression.prototype.interpolationFactor = function interpolationFactor(input, lower, upper) {\n    if (this.interpolationType) {\n        return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n    } else {\n        return 0;\n    }\n};\nfunction createPropertyExpression(expression, propertySpec) {\n    expression = createExpression(expression, propertySpec);\n    if (expression.result === 'error') {\n        return expression;\n    }\n    var parsed = expression.value.expression;\n    var isFeatureConstant$1 = isFeatureConstant(parsed);\n    if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) {\n  
       return error([new ParsingError('', 'data expressions not supported')]);\n    }\n    var isZoomConstant = isGlobalPropertyConstant(parsed, ['zoom']);\n    if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n        return error([new ParsingError('', 'zoom expressions not supported')]);\n    }\n    var zoomCurve = findZoomCurve(parsed);\n    if (!zoomCurve && !isZoomConstant) {\n        return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n    } else if (zoomCurve instanceof ParsingError) {\n        return error([zoomCurve]);\n    } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n        return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n    }\n    if (!zoomCurve) {\n        return success(isFeatureConstant$1 ? new ZoomConstantExpression('constant', expression.value) : new ZoomConstantExpr
 ession('source', expression.value));\n    }\n    var interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n    return success(isFeatureConstant$1 ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType));\n}\nvar StylePropertyFunction = function StylePropertyFunction(parameters, specification) {\n    this._parameters = parameters;\n    this._specification = specification;\n    extend(this, createFunction(this._parameters, this._specification));\n};\nStylePropertyFunction.deserialize = function deserialize(serialized) {\n    return new StylePropertyFunction(serialized._parameters, serialized._specification);\n};\nStylePropertyFunction.serialize = function serialize(input) {\n    return {\n        _parameters: input._parameters,\n        _specification: input._specification\n    };\n};\nfunction normalizeProperty
 Expression(value, specification) {\n    if (isFunction$1(value)) {\n        return new StylePropertyFunction(value, specification);\n    } else if (isExpression(value)) {\n        var expression = createPropertyExpression(value, specification);\n        if (expression.result === 'error') {\n            throw new Error(expression.value.map(function (err) {\n                return err.key + ': ' + err.message;\n            }).join(', '));\n        }\n        return expression.value;\n    } else {\n        var constant = value;\n        if (typeof value === 'string' && specification.type === 'color') {\n            constant = Color.parse(value);\n        }\n        return {\n            kind: 'constant',\n            evaluate: function () {\n                return constant;\n            }\n        };\n    }\n}\nfunction findZoomCurve(expression) {\n    var result = null;\n    if (expression instanceof Let) {\n        result = findZoomCurve(expression.result);\n    } else if (expression
  instanceof Coalesce) {\n        for (var i = 0, list = expression.args; i < list.length; i += 1) {\n            var arg = list[i];\n            result = findZoomCurve(arg);\n            if (result) {\n                break;\n            }\n        }\n    } else if ((expression instanceof Step || expression instanceof Interpolate) && expression.input instanceof CompoundExpression && expression.input.name === 'zoom') {\n        result = expression;\n    }\n    if (result instanceof ParsingError) {\n        return result;\n    }\n    expression.eachChild(function (child) {\n        var childResult = findZoomCurve(child);\n        if (childResult instanceof ParsingError) {\n            result = childResult;\n        } else if (!result && childResult) {\n            result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n        } else if (result && childResult && result !== childResult) {\n            resul
 t = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n        }\n    });\n    return result;\n}\nfunction getExpectedType(spec) {\n    var types = {\n        color: ColorType,\n        string: StringType,\n        number: NumberType,\n        enum: StringType,\n        boolean: BooleanType,\n        formatted: FormattedType,\n        resolvedImage: ResolvedImageType\n    };\n    if (spec.type === 'array') {\n        return array(types[spec.value] || ValueType, spec.length);\n    }\n    return types[spec.type];\n}\nfunction getDefaultValue(spec) {\n    if (spec.type === 'color' && isFunction$1(spec.default)) {\n        return new Color(0, 0, 0, 0);\n    } else if (spec.type === 'color') {\n        return Color.parse(spec.default) || null;\n    } else if (spec.default === undefined) {\n        return null;\n    } else {\n        return spec.default;\n    }\n}\n\nfunction convertLiteral(value) {\n    return typeof valu
 e === 'object' ? [\n        'literal',\n        value\n    ] : value;\n}\nfunction convertFunction(parameters, propertySpec) {\n    var stops = parameters.stops;\n    if (!stops) {\n        return convertIdentityFunction(parameters, propertySpec);\n    }\n    var zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n    var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    stops = stops.map(function (stop) {\n        if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n            return [\n                stop[0],\n                convertTokenString(stop[1])\n            ];\n        }\n        return [\n            stop[0],\n            convertLiteral(stop[1])\n        ];\n    });\n    if (zoomAndFeatureDependent) {\n        return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n    } else if (zoomDependent) {\n      
   return convertZoomFunction(parameters, propertySpec, stops);\n    } else {\n        return convertPropertyFunction(parameters, propertySpec, stops);\n    }\n}\nfunction convertIdentityFunction(parameters, propertySpec) {\n    var get = [\n        'get',\n        parameters.property\n    ];\n    if (parameters.default === undefined) {\n        return propertySpec.type === 'string' ? [\n            'string',\n            get\n        ] : get;\n    } else if (propertySpec.type === 'enum') {\n        return [\n            'match',\n            get,\n            Object.keys(propertySpec.values),\n            get,\n            parameters.default\n        ];\n    } else {\n        var expression = [\n            propertySpec.type === 'color' ? 'to-color' : propertySpec.type,\n            get,\n            convertLiteral(parameters.default)\n        ];\n        if (propertySpec.type === 'array') {\n            expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n    
     }\n        return expression;\n    }\n}\nfunction getInterpolateOperator(parameters) {\n    switch (parameters.colorSpace) {\n    case 'hcl':\n        return 'interpolate-hcl';\n    case 'lab':\n        return 'interpolate-lab';\n    default:\n        return 'interpolate';\n    }\n}\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n    var featureFunctionParameters = {};\n    var featureFunctionStops = {};\n    var zoomStops = [];\n    for (var s = 0; s < stops.length; s++) {\n        var stop = stops[s];\n        var zoom = stop[0].zoom;\n        if (featureFunctionParameters[zoom] === undefined) {\n            featureFunctionParameters[zoom] = {\n                zoom: zoom,\n                type: parameters.type,\n                property: parameters.property,\n                default: parameters.default\n            };\n            featureFunctionStops[zoom] = [];\n            zoomStops.push(zoom);\n        }\n        featureFunctionStops[zoom].push
 ([\n            stop[0].value,\n            stop[1]\n        ]);\n    }\n    var functionType = getFunctionType({}, propertySpec);\n    if (functionType === 'exponential') {\n        var expression = [\n            getInterpolateOperator(parameters),\n            ['linear'],\n            ['zoom']\n        ];\n        for (var i = 0, list = zoomStops; i < list.length; i += 1) {\n            var z = list[i];\n            var output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n            appendStopPair(expression, z, output, false);\n        }\n        return expression;\n    } else {\n        var expression$1 = [\n            'step',\n            ['zoom']\n        ];\n        for (var i$1 = 0, list$1 = zoomStops; i$1 < list$1.length; i$1 += 1) {\n            var z$1 = list$1[i$1];\n            var output$1 = convertPropertyFunction(featureFunctionParameters[z$1], propertySpec, featureFunctionStops[z$1]);\n            appendStopPair(
 expression$1, z$1, output$1, true);\n        }\n        fixupDegenerateStepCurve(expression$1);\n        return expression$1;\n    }\n}\nfunction coalesce$1(a, b) {\n    if (a !== undefined) {\n        return a;\n    }\n    if (b !== undefined) {\n        return b;\n    }\n}\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n    var type = getFunctionType(parameters, propertySpec);\n    var get = [\n        'get',\n        parameters.property\n    ];\n    if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n        var expression = ['case'];\n        for (var i = 0, list = stops; i < list.length; i += 1) {\n            var stop = list[i];\n            expression.push([\n                '==',\n                get,\n                stop[0]\n            ], stop[1]);\n        }\n        expression.push(convertLiteral(coalesce$1(parameters.default, propertySpec.default)));\n        return expression;\n    } else if (type === 'categorical') {\n        var 
 expression$1 = [\n            'match',\n            get\n        ];\n        for (var i$1 = 0, list$1 = stops; i$1 < list$1.length; i$1 += 1) {\n            var stop$1 = list$1[i$1];\n            appendStopPair(expression$1, stop$1[0], stop$1[1], false);\n        }\n        expression$1.push(convertLiteral(coalesce$1(parameters.default, propertySpec.default)));\n        return expression$1;\n    } else if (type === 'interval') {\n        var expression$2 = [\n            'step',\n            [\n                'number',\n                get\n            ]\n        ];\n        for (var i$2 = 0, list$2 = stops; i$2 < list$2.length; i$2 += 1) {\n            var stop$2 = list$2[i$2];\n            appendStopPair(expression$2, stop$2[0], stop$2[1], true);\n        }\n        fixupDegenerateStepCurve(expression$2);\n        return parameters.default === undefined ? expression$2 : [\n            'case',\n            [\n                '==',\n                [\n                    'typeof',\
 n                    get\n                ],\n                'number'\n            ],\n            expression$2,\n            convertLiteral(parameters.default)\n        ];\n    } else if (type === 'exponential') {\n        var base = parameters.base !== undefined ? parameters.base : 1;\n        var expression$3 = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : [\n                'exponential',\n                base\n            ],\n            [\n                'number',\n                get\n            ]\n        ];\n        for (var i$3 = 0, list$3 = stops; i$3 < list$3.length; i$3 += 1) {\n            var stop$3 = list$3[i$3];\n            appendStopPair(expression$3, stop$3[0], stop$3[1], false);\n        }\n        return parameters.default === undefined ? expression$3 : [\n            'case',\n            [\n                '==',\n                [\n                    'typeof',\n                    get\n                ],\n       
          'number'\n            ],\n            expression$3,\n            convertLiteral(parameters.default)\n        ];\n    } else {\n        throw new Error('Unknown property function type ' + type);\n    }\n}\nfunction convertZoomFunction(parameters, propertySpec, stops, input) {\n    if (input === void 0)\n        input = ['zoom'];\n    var type = getFunctionType(parameters, propertySpec);\n    var expression;\n    var isStep = false;\n    if (type === 'interval') {\n        expression = [\n            'step',\n            input\n        ];\n        isStep = true;\n    } else if (type === 'exponential') {\n        var base = parameters.base !== undefined ? parameters.base : 1;\n        expression = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : [\n                'exponential',\n                base\n            ],\n            input\n        ];\n    } else {\n        throw new Error('Unknown zoom function type \"' + type + '\"');\n   
  }\n    for (var i = 0, list = stops; i < list.length; i += 1) {\n        var stop = list[i];\n        appendStopPair(expression, stop[0], stop[1], isStep);\n    }\n    fixupDegenerateStepCurve(expression);\n    return expression;\n}\nfunction fixupDegenerateStepCurve(expression) {\n    if (expression[0] === 'step' && expression.length === 3) {\n        expression.push(0);\n        expression.push(expression[3]);\n    }\n}\nfunction appendStopPair(curve, input, output, isStep) {\n    if (curve.length > 3 && input === curve[curve.length - 2]) {\n        return;\n    }\n    if (!(isStep && curve.length === 2)) {\n        curve.push(input);\n    }\n    curve.push(output);\n}\nfunction getFunctionType(parameters, propertySpec) {\n    if (parameters.type) {\n        return parameters.type;\n    } else {\n        return propertySpec.expression.interpolated ? 'exponential' : 'interval';\n    }\n}\nfunction convertTokenString(s) {\n    var result = ['concat'];\n    var re = /{([^{}]+)}/g;\n
     var pos = 0;\n    for (var match = re.exec(s); match !== null; match = re.exec(s)) {\n        var literal = s.slice(pos, re.lastIndex - match[0].length);\n        pos = re.lastIndex;\n        if (literal.length > 0) {\n            result.push(literal);\n        }\n        result.push([\n            'get',\n            match[1]\n        ]);\n    }\n    if (result.length === 1) {\n        return s;\n    }\n    if (pos < s.length) {\n        result.push(s.slice(pos));\n    } else if (result.length === 2) {\n        return [\n            'to-string',\n            result[1]\n        ];\n    }\n    return result;\n}\n\nfunction isExpressionFilter(filter) {\n    if (filter === true || filter === false) {\n        return true;\n    }\n    if (!Array.isArray(filter) || filter.length === 0) {\n        return false;\n    }\n    switch (filter[0]) {\n    case 'has':\n        return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n    case 'in':\n        return filter.len
 gth >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n    case '!in':\n    case '!has':\n    case 'none':\n        return false;\n    case '==':\n    case '!=':\n    case '>':\n    case '>=':\n    case '<':\n    case '<=':\n        return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2]));\n    case 'any':\n    case 'all':\n        for (var i = 0, list = filter.slice(1); i < list.length; i += 1) {\n            var f = list[i];\n            if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n                return false;\n            }\n        }\n        return true;\n    default:\n        return true;\n    }\n}\nvar filterSpec = {\n    'type': 'boolean',\n    'default': false,\n    'transition': false,\n    'property-type': 'data-driven',\n    'expression': {\n        'interpolated': false,\n        'parameters': [\n            'zoom',\n            'feature'\n        ]\n    }\n};\nfunction createFilter(filter) {\n    if (filter ==
 = null || filter === undefined) {\n        return {\n            filter: function () {\n                return true;\n            },\n            needGeometry: false\n        };\n    }\n    if (!isExpressionFilter(filter)) {\n        filter = convertFilter(filter);\n    }\n    var compiled = createExpression(filter, filterSpec);\n    if (compiled.result === 'error') {\n        throw new Error(compiled.value.map(function (err) {\n            return err.key + ': ' + err.message;\n        }).join(', '));\n    } else {\n        var needGeometry = geometryNeeded(filter);\n        return {\n            filter: function (globalProperties, feature, canonical) {\n                return compiled.value.evaluate(globalProperties, feature, {}, canonical);\n            },\n            needGeometry: needGeometry\n        };\n    }\n}\nfunction compare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction geometryNeeded(filter) {\n    if (!Array.isArray(filter)) {\n        return false;\n   
  }\n    if (filter[0] === 'within') {\n        return true;\n    }\n    for (var index = 1; index < filter.length; index++) {\n        if (geometryNeeded(filter[index])) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction convertFilter(filter) {\n    if (!filter) {\n        return true;\n    }\n    var op = filter[0];\n    if (filter.length <= 1) {\n        return op !== 'any';\n    }\n    var converted = op === '==' ? convertComparisonOp(filter[1], filter[2], '==') : op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) : op === '<' || op === '>' || op === '<=' || op === '>=' ? convertComparisonOp(filter[1], filter[2], op) : op === 'any' ? convertDisjunctionOp(filter.slice(1)) : op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) : op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) : op === 'in' ? convertInOp(filter[1], filter.slice(2)) : op === '!in' ? convertNegation(convertInOp(
 filter[1], filter.slice(2))) : op === 'has' ? convertHasOp(filter[1]) : op === '!has' ? convertNegation(convertHasOp(filter[1])) : op === 'within' ? filter : true;\n    return converted;\n}\nfunction convertComparisonOp(property, value, op) {\n    switch (property) {\n    case '$type':\n        return [\n            'filter-type-' + op,\n            value\n        ];\n    case '$id':\n        return [\n            'filter-id-' + op,\n            value\n        ];\n    default:\n        return [\n            'filter-' + op,\n            property,\n            value\n        ];\n    }\n}\nfunction convertDisjunctionOp(filters) {\n    return ['any'].concat(filters.map(convertFilter));\n}\nfunction convertInOp(property, values) {\n    if (values.length === 0) {\n        return false;\n    }\n    switch (property) {\n    case '$type':\n        return [\n            'filter-type-in',\n            [\n                'literal',\n                values\n            ]\n        ];\n    case '$
 id':\n        return [\n            'filter-id-in',\n            [\n                'literal',\n                values\n            ]\n        ];\n    default:\n        if (values.length > 200 && !values.some(function (v) {\n                return typeof v !== typeof values[0];\n            })) {\n            return [\n                'filter-in-large',\n                property,\n                [\n                    'literal',\n                    values.sort(compare)\n                ]\n            ];\n        } else {\n            return [\n                'filter-in-small',\n                property,\n                [\n                    'literal',\n                    values\n                ]\n            ];\n        }\n    }\n}\nfunction convertHasOp(property) {\n    switch (property) {\n    case '$type':\n        return true;\n    case '$id':\n        return ['filter-has-id'];\n    default:\n        return [\n            'filter-has',\n            property\n        ];\n 
    }\n}\nfunction convertNegation(filter) {\n    return [\n        '!',\n        filter\n    ];\n}\n\nfunction convertFilter$1(filter) {\n    return _convertFilter(filter, {});\n}\nfunction _convertFilter(filter, expectedTypes) {\n    var ref$1;\n    if (isExpressionFilter(filter)) {\n        return filter;\n    }\n    if (!filter) {\n        return true;\n    }\n    var op = filter[0];\n    if (filter.length <= 1) {\n        return op !== 'any';\n    }\n    var converted;\n    if (op === '==' || op === '!=' || op === '<' || op === '>' || op === '<=' || op === '>=') {\n        var ref = filter;\n        var property = ref[1];\n        var value = ref[2];\n        converted = convertComparisonOp$1(property, value, op, expectedTypes);\n    } else if (op === 'any') {\n        var children = filter.slice(1).map(function (f) {\n            var types = {};\n            var child = _convertFilter(f, types);\n            var typechecks = runtimeTypeChecks(types);\n            return typeche
 cks === true ? child : [\n                'case',\n                typechecks,\n                child,\n                false\n            ];\n        });\n        return ['any'].concat(children);\n    } else if (op === 'all') {\n        var children$1 = filter.slice(1).map(function (f) {\n            return _convertFilter(f, expectedTypes);\n        });\n        return children$1.length > 1 ? ['all'].concat(children$1) : (ref$1 = []).concat.apply(ref$1, children$1);\n    } else if (op === 'none') {\n        return [\n            '!',\n            _convertFilter(['any'].concat(filter.slice(1)), {})\n        ];\n    } else if (op === 'in') {\n        converted = convertInOp$1(filter[1], filter.slice(2));\n    } else if (op === '!in') {\n        converted = convertInOp$1(filter[1], filter.slice(2), true);\n    } else if (op === 'has') {\n        converted = convertHasOp$1(filter[1]);\n    } else if (op === '!has') {\n        converted = [\n            '!',\n            convertHasOp$1(
 filter[1])\n        ];\n    } else {\n        converted = true;\n    }\n    return converted;\n}\nfunction runtimeTypeChecks(expectedTypes) {\n    var conditions = [];\n    for (var property in expectedTypes) {\n        var get = property === '$id' ? ['id'] : [\n            'get',\n            property\n        ];\n        conditions.push([\n            '==',\n            [\n                'typeof',\n                get\n            ],\n            expectedTypes[property]\n        ]);\n    }\n    if (conditions.length === 0) {\n        return true;\n    }\n    if (conditions.length === 1) {\n        return conditions[0];\n    }\n    return ['all'].concat(conditions);\n}\nfunction convertComparisonOp$1(property, value, op, expectedTypes) {\n    var get;\n    if (property === '$type') {\n        return [\n            op,\n            ['geometry-type'],\n            value\n        ];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = [\n         
    'get',\n            property\n        ];\n    }\n    if (expectedTypes && value !== null) {\n        var type = typeof value;\n        expectedTypes[property] = type;\n    }\n    if (op === '==' && property !== '$id' && value === null) {\n        return [\n            'all',\n            [\n                'has',\n                property\n            ],\n            [\n                '==',\n                get,\n                null\n            ]\n        ];\n    } else if (op === '!=' && property !== '$id' && value === null) {\n        return [\n            'any',\n            [\n                '!',\n                [\n                    'has',\n                    property\n                ]\n            ],\n            [\n                '!=',\n                get,\n                null\n            ]\n        ];\n    }\n    return [\n        op,\n        get,\n        value\n    ];\n}\nfunction convertInOp$1(property, values, negate) {\n    if (negate === void 0)\n      
   negate = false;\n    if (values.length === 0) {\n        return negate;\n    }\n    var get;\n    if (property === '$type') {\n        get = ['geometry-type'];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = [\n            'get',\n            property\n        ];\n    }\n    var uniformTypes = true;\n    var type = typeof values[0];\n    for (var i = 0, list = values; i < list.length; i += 1) {\n        var value = list[i];\n        if (typeof value !== type) {\n            uniformTypes = false;\n            break;\n        }\n    }\n    if (uniformTypes && (type === 'string' || type === 'number')) {\n        var uniqueValues = values.sort().filter(function (v, i) {\n            return i === 0 || values[i - 1] !== v;\n        });\n        return [\n            'match',\n            get,\n            uniqueValues,\n            !negate,\n            negate\n        ];\n    }\n    return [negate ? 'all' : 'any'].concat(values.map(function (v)
  {\n        return [\n            negate ? '!=' : '==',\n            get,\n            v\n        ];\n    }));\n}\nfunction convertHasOp$1(property) {\n    if (property === '$type') {\n        return true;\n    } else if (property === '$id') {\n        return [\n            '!=',\n            ['id'],\n            null\n        ];\n    } else {\n        return [\n            'has',\n            property\n        ];\n    }\n}\n\nfunction migrateToExpressions (style) {\n    var converted = [];\n    eachLayer(style, function (layer) {\n        if (layer.filter) {\n            layer.filter = convertFilter$1(layer.filter);\n        }\n    });\n    eachProperty(style, {\n        paint: true,\n        layout: true\n    }, function (ref) {\n        var path = ref.path;\n        var value = ref.value;\n        var reference = ref.reference;\n        var set = ref.set;\n        if (isExpression(value)) {\n            return;\n        }\n        if (typeof value === 'object' && !Array.isArray(v
 alue)) {\n            set(convertFunction(value, reference));\n            converted.push(path.join('.'));\n        } else if (reference.tokens && typeof value === 'string') {\n            set(convertTokenString(value));\n        }\n    });\n    return style;\n}\n\nfunction migrate (style) {\n    var migrated = false;\n    if (style.version === 7) {\n        style = migrateToV8(style);\n        migrated = true;\n    }\n    if (style.version === 8) {\n        migrated = migrateToExpressions(style);\n        migrated = true;\n    }\n    if (!migrated) {\n        throw new Error('cannot migrate from', style.version);\n    }\n    return style;\n}\n\nfunction composite (style) {\n    var styleIDs = [];\n    var sourceIDs = [];\n    var compositedSourceLayers = [];\n    for (var id in style.sources) {\n        var source = style.sources[id];\n        if (source.type !== 'vector') {\n            continue;\n        }\n        var match = /^mapbox:\\/\\/(.*)/.exec(source.url);\n        if (!
 match) {\n            continue;\n        }\n        styleIDs.push(id);\n        sourceIDs.push(match[1]);\n    }\n    if (styleIDs.length < 2) {\n        return style;\n    }\n    styleIDs.forEach(function (id) {\n        delete style.sources[id];\n    });\n    var compositeID = sourceIDs.join(',');\n    style.sources[compositeID] = {\n        'type': 'vector',\n        'url': 'mapbox://' + compositeID\n    };\n    style.layers.forEach(function (layer) {\n        if (styleIDs.indexOf(layer.source) >= 0) {\n            layer.source = compositeID;\n            if ('source-layer' in layer) {\n                if (compositedSourceLayers.indexOf(layer['source-layer']) >= 0) {\n                    throw new Error('Conflicting source layer names');\n                } else {\n                    compositedSourceLayers.push(layer['source-layer']);\n                }\n            }\n        }\n    });\n    return style;\n}\n\nvar refProperties = [\n    'type',\n    'source',\n    'source-layer
 ',\n    'minzoom',\n    'maxzoom',\n    'filter',\n    'layout'\n];\n\nfunction deref(layer, parent) {\n    var result = {};\n    for (var k in layer) {\n        if (k !== 'ref') {\n            result[k] = layer[k];\n        }\n    }\n    refProperties.forEach(function (k) {\n        if (k in parent) {\n            result[k] = parent[k];\n        }\n    });\n    return result;\n}\nfunction derefLayers(layers) {\n    layers = layers.slice();\n    var map = Object.create(null);\n    for (var i = 0; i < layers.length; i++) {\n        map[layers[i].id] = layers[i];\n    }\n    for (var i$1 = 0; i$1 < layers.length; i$1++) {\n        if ('ref' in layers[i$1]) {\n            layers[i$1] = deref(layers[i$1], map[layers[i$1].ref]);\n        }\n    }\n    return layers;\n}\n\nfunction deepEqual(a, b) {\n    if (Array.isArray(a)) {\n        if (!Array.isArray(b) || a.length !== b.length) {\n            return false;\n        }\n        for (var i = 0; i < a.length; i++) {\n            if (!de
 epEqual(a[i], b[i])) {\n                return false;\n            }\n        }\n        return true;\n    }\n    if (typeof a === 'object' && a !== null && b !== null) {\n        if (!(typeof b === 'object')) {\n            return false;\n        }\n        var keys = Object.keys(a);\n        if (keys.length !== Object.keys(b).length) {\n            return false;\n        }\n        for (var key in a) {\n            if (!deepEqual(a[key], b[key])) {\n                return false;\n            }\n        }\n        return true;\n    }\n    return a === b;\n}\n\nvar operations = {\n    setStyle: 'setStyle',\n    addLayer: 'addLayer',\n    removeLayer: 'removeLayer',\n    setPaintProperty: 'setPaintProperty',\n    setLayoutProperty: 'setLayoutProperty',\n    setFilter: 'setFilter',\n    addSource: 'addSource',\n    removeSource: 'removeSource',\n    setGeoJSONSourceData: 'setGeoJSONSourceData',\n    setLayerZoomRange: 'setLayerZoomRange',\n    setLayerProperty: 'setLayerProperty',\n  
   setCenter: 'setCenter',\n    setZoom: 'setZoom',\n    setBearing: 'setBearing',\n    setPitch: 'setPitch',\n    setSprite: 'setSprite',\n    setGlyphs: 'setGlyphs',\n    setTransition: 'setTransition',\n    setLight: 'setLight'\n};\nfunction addSource(sourceId, after, commands) {\n    commands.push({\n        command: operations.addSource,\n        args: [\n            sourceId,\n            after[sourceId]\n        ]\n    });\n}\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n    commands.push({\n        command: operations.removeSource,\n        args: [sourceId]\n    });\n    sourcesRemoved[sourceId] = true;\n}\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n    removeSource(sourceId, commands, sourcesRemoved);\n    addSource(sourceId, after, commands);\n}\nfunction canUpdateGeoJSON(before, after, sourceId) {\n    var prop;\n    for (prop in before[sourceId]) {\n        if (!before[sourceId].hasOwnProperty(prop)) {\n            continue;\n     
    }\n        if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n            return false;\n        }\n    }\n    for (prop in after[sourceId]) {\n        if (!after[sourceId].hasOwnProperty(prop)) {\n            continue;\n        }\n        if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction diffSources(before, after, commands, sourcesRemoved) {\n    before = before || {};\n    after = after || {};\n    var sourceId;\n    for (sourceId in before) {\n        if (!before.hasOwnProperty(sourceId)) {\n            continue;\n        }\n        if (!after.hasOwnProperty(sourceId)) {\n            removeSource(sourceId, commands, sourcesRemoved);\n        }\n    }\n    for (sourceId in after) {\n        if (!after.hasOwnProperty(sourceId)) {\n            continue;\n        }\n        if (!before.hasOwnProperty(sourceId)) {\n            addSource(sou
 rceId, after, commands);\n        } else if (!deepEqual(before[sourceId], after[sourceId])) {\n            if (before[sourceId].type === 'geojson' && after[sourceId].type === 'geojson' && canUpdateGeoJSON(before, after, sourceId)) {\n                commands.push({\n                    command: operations.setGeoJSONSourceData,\n                    args: [\n                        sourceId,\n                        after[sourceId].data\n                    ]\n                });\n            } else {\n                updateSource(sourceId, after, commands, sourcesRemoved);\n            }\n        }\n    }\n}\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n    before = before || {};\n    after = after || {};\n    var prop;\n    for (prop in before) {\n        if (!before.hasOwnProperty(prop)) {\n            continue;\n        }\n        if (!deepEqual(before[prop], after[prop])) {\n            commands.push({\n                command: command,\n
                 args: [\n                    layerId,\n                    prop,\n                    after[prop],\n                    klass\n                ]\n            });\n        }\n    }\n    for (prop in after) {\n        if (!after.hasOwnProperty(prop) || before.hasOwnProperty(prop)) {\n            continue;\n        }\n        if (!deepEqual(before[prop], after[prop])) {\n            commands.push({\n                command: command,\n                args: [\n                    layerId,\n                    prop,\n                    after[prop],\n                    klass\n                ]\n            });\n        }\n    }\n}\nfunction pluckId(layer) {\n    return layer.id;\n}\nfunction indexById(group, layer) {\n    group[layer.id] = layer;\n    return group;\n}\nfunction diffLayers(before, after, commands) {\n    before = before || [];\n    after = after || [];\n    var beforeOrder = before.map(pluckId);\n    var afterOrder = after.map(pluckId);\n    var beforeInde
 x = before.reduce(indexById, {});\n    var afterIndex = after.reduce(indexById, {});\n    var tracker = beforeOrder.slice();\n    var clean = Object.create(null);\n    var i, d, layerId, beforeLayer, afterLayer, insertBeforeLayerId, prop;\n    for (i = 0, d = 0; i < beforeOrder.length; i++) {\n        layerId = beforeOrder[i];\n        if (!afterIndex.hasOwnProperty(layerId)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            tracker.splice(tracker.indexOf(layerId, d), 1);\n        } else {\n            d++;\n        }\n    }\n    for (i = 0, d = 0; i < afterOrder.length; i++) {\n        layerId = afterOrder[afterOrder.length - 1 - i];\n        if (tracker[tracker.length - 1 - i] === layerId) {\n            continue;\n        }\n        if (beforeIndex.hasOwnProperty(layerId)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n 
            });\n            tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n        } else {\n            d++;\n        }\n        insertBeforeLayerId = tracker[tracker.length - i];\n        commands.push({\n            command: operations.addLayer,\n            args: [\n                afterIndex[layerId],\n                insertBeforeLayerId\n            ]\n        });\n        tracker.splice(tracker.length - i, 0, layerId);\n        clean[layerId] = true;\n    }\n    for (i = 0; i < afterOrder.length; i++) {\n        layerId = afterOrder[i];\n        beforeLayer = beforeIndex[layerId];\n        afterLayer = afterIndex[layerId];\n        if (clean[layerId] || deepEqual(beforeLayer, afterLayer)) {\n            continue;\n        }\n        if (!deepEqual(beforeLayer.source, afterLayer.source) || !deepEqual(beforeLayer['source-layer'], afterLayer['source-layer']) || !deepEqual(beforeLayer.type, afterLayer.type)) {\n            commands.push({\n                c
 ommand: operations.removeLayer,\n                args: [layerId]\n            });\n            insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n            commands.push({\n                command: operations.addLayer,\n                args: [\n                    afterLayer,\n                    insertBeforeLayerId\n                ]\n            });\n            continue;\n        }\n        diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);\n        diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);\n        if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {\n            commands.push({\n                command: operations.setFilter,\n                args: [\n                    layerId,\n                    afterLayer.filter\n                ]\n            });\n        }\n        if (!deepEqual(beforeLayer.minzoom, afterLay
 er.minzoom) || !deepEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n            commands.push({\n                command: operations.setLayerZoomRange,\n                args: [\n                    layerId,\n                    afterLayer.minzoom,\n                    afterLayer.maxzoom\n                ]\n            });\n        }\n        for (prop in beforeLayer) {\n            if (!beforeLayer.hasOwnProperty(prop)) {\n                continue;\n            }\n            if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') {\n                continue;\n            }\n            if (prop.indexOf('paint.') === 0) {\n                diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n            } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n                commands.push({\n                    command: operatio
 ns.setLayerProperty,\n                    args: [\n                        layerId,\n                        prop,\n                        afterLayer[prop]\n                    ]\n                });\n            }\n        }\n        for (prop in afterLayer) {\n            if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop)) {\n                continue;\n            }\n            if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom') {\n                continue;\n            }\n            if (prop.indexOf('paint.') === 0) {\n                diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n            } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n                commands.push({\n                    command: operations.setLayerProperty,\n                    args: [\n                        la
 yerId,\n                        prop,\n                        afterLayer[prop]\n                    ]\n                });\n            }\n        }\n    }\n}\nfunction diffStyles(before, after) {\n    if (!before) {\n        return [{\n                command: operations.setStyle,\n                args: [after]\n            }];\n    }\n    var commands = [];\n    try {\n        if (!deepEqual(before.version, after.version)) {\n            return [{\n                    command: operations.setStyle,\n                    args: [after]\n                }];\n        }\n        if (!deepEqual(before.center, after.center)) {\n            commands.push({\n                command: operations.setCenter,\n                args: [after.center]\n            });\n        }\n        if (!deepEqual(before.zoom, after.zoom)) {\n            commands.push({\n                command: operations.setZoom,\n                args: [after.zoom]\n            });\n        }\n        if (!deepEqual(before.bea
 ring, after.bearing)) {\n            commands.push({\n                command: operations.setBearing,\n                args: [after.bearing]\n            });\n        }\n        if (!deepEqual(before.pitch, after.pitch)) {\n            commands.push({\n                command: operations.setPitch,\n                args: [after.pitch]\n            });\n        }\n        if (!deepEqual(before.sprite, after.sprite)) {\n            commands.push({\n                command: operations.setSprite,\n                args: [after.sprite]\n            });\n        }\n        if (!deepEqual(before.glyphs, after.glyphs)) {\n            commands.push({\n                command: operations.setGlyphs,\n                args: [after.glyphs]\n            });\n        }\n        if (!deepEqual(before.transition, after.transition)) {\n            commands.push({\n                command: operations.setTransition,\n                args: [after.transition]\n            });\n        }\n        if (!deepEq
 ual(before.light, after.light)) {\n            commands.push({\n                command: operations.setLight,\n                args: [after.light]\n            });\n        }\n        var sourcesRemoved = {};\n        var removeOrAddSourceCommands = [];\n        diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n        var beforeLayers = [];\n        if (before.layers) {\n            before.layers.forEach(function (layer) {\n                if (sourcesRemoved[layer.source]) {\n                    commands.push({\n                        command: operations.removeLayer,\n                        args: [layer.id]\n                    });\n                } else {\n                    beforeLayers.push(layer);\n                }\n            });\n        }\n        commands = commands.concat(removeOrAddSourceCommands);\n        diffLayers(beforeLayers, after.layers, commands);\n    } catch (e) {\n        console.warn('Unable to compute style diff:',
  e);\n        commands = [{\n                command: operations.setStyle,\n                args: [after]\n            }];\n    }\n    return commands;\n}\n\nvar ValidationError = function ValidationError(key, value, message, identifier) {\n    this.message = (key ? key + ': ' : '') + message;\n    if (identifier) {\n        this.identifier = identifier;\n    }\n    if (value !== null && value !== undefined && value.__line__) {\n        this.line = value.__line__;\n    }\n};\n\nvar ParsingError$1 = function ParsingError(error) {\n    this.error = error;\n    this.message = error.message;\n    var match = error.message.match(/line (\\d+)/);\n    this.line = match ? parseInt(match[1], 10) : 0;\n};\n\nfunction validateConstants(options) {\n    var key = options.key;\n    var constants = options.value;\n    if (constants) {\n        return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n    } else {\n        return [];\n    }\n}\n\nfunction unbundle(va
 lue) {\n    if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n        return value.valueOf();\n    } else {\n        return value;\n    }\n}\nfunction deepUnbundle(value) {\n    if (Array.isArray(value)) {\n        return value.map(deepUnbundle);\n    } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n        var unbundledValue = {};\n        for (var key in value) {\n            unbundledValue[key] = deepUnbundle(value[key]);\n        }\n        return unbundledValue;\n    }\n    return unbundle(value);\n}\n\nfunction validateObject(options) {\n    var key = options.key;\n    var object = options.value;\n    var elementSpecs = options.valueSpec || {};\n    var elementValidators = options.objectElementValidators || {};\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    var errors = [];\n    var type = getType(object);\n    if (type !== 'object') {\n
         return [new ValidationError(key, object, 'object expected, ' + type + ' found')];\n    }\n    for (var objectKey in object) {\n        var elementSpecKey = objectKey.split('.')[0];\n        var elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n        var validateElement = void 0;\n        if (elementValidators[elementSpecKey]) {\n            validateElement = elementValidators[elementSpecKey];\n        } else if (elementSpecs[elementSpecKey]) {\n            validateElement = validate;\n        } else if (elementValidators['*']) {\n            validateElement = elementValidators['*'];\n        } else if (elementSpecs['*']) {\n            validateElement = validate;\n        } else {\n            errors.push(new ValidationError(key, object[objectKey], 'unknown property \"' + objectKey + '\"'));\n            continue;\n        }\n        errors = errors.concat(validateElement({\n            key: (key ? key + '.' : key) + objectKey,\n            value: object[ob
 jectKey],\n            valueSpec: elementSpec,\n            style: style,\n            styleSpec: styleSpec,\n            object: object,\n            objectKey: objectKey\n        }, object));\n    }\n    for (var elementSpecKey$1 in elementSpecs) {\n        if (elementValidators[elementSpecKey$1]) {\n            continue;\n        }\n        if (elementSpecs[elementSpecKey$1].required && elementSpecs[elementSpecKey$1]['default'] === undefined && object[elementSpecKey$1] === undefined) {\n            errors.push(new ValidationError(key, object, 'missing required property \"' + elementSpecKey$1 + '\"'));\n        }\n    }\n    return errors;\n}\n\nfunction validateArray(options) {\n    var array = options.value;\n    var arraySpec = options.valueSpec;\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    var key = options.key;\n    var validateArrayElement = options.arrayElementValidator || validate;\n    if (getType(array) !== 'array') {\n        return [new 
 ValidationError(key, array, 'array expected, ' + getType(array) + ' found')];\n    }\n    if (arraySpec.length && array.length !== arraySpec.length) {\n        return [new ValidationError(key, array, 'array length ' + arraySpec.length + ' expected, length ' + array.length + ' found')];\n    }\n    if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n        return [new ValidationError(key, array, 'array length at least ' + arraySpec['min-length'] + ' expected, length ' + array.length + ' found')];\n    }\n    var arrayElementSpec = {\n        'type': arraySpec.value,\n        'values': arraySpec.values\n    };\n    if (styleSpec.$version < 7) {\n        arrayElementSpec.function = arraySpec.function;\n    }\n    if (getType(arraySpec.value) === 'object') {\n        arrayElementSpec = arraySpec.value;\n    }\n    var errors = [];\n    for (var i = 0; i < array.length; i++) {\n        errors = errors.concat(validateArrayElement({\n            array: array,\n      
       arrayIndex: i,\n            value: array[i],\n            valueSpec: arrayElementSpec,\n            style: style,\n            styleSpec: styleSpec,\n            key: key + '[' + i + ']'\n        }));\n    }\n    return errors;\n}\n\nfunction validateNumber(options) {\n    var key = options.key;\n    var value = options.value;\n    var valueSpec = options.valueSpec;\n    var type = getType(value);\n    if (type === 'number' && value !== value) {\n        type = 'NaN';\n    }\n    if (type !== 'number') {\n        return [new ValidationError(key, value, 'number expected, ' + type + ' found')];\n    }\n    if ('minimum' in valueSpec && value < valueSpec.minimum) {\n        return [new ValidationError(key, value, value + ' is less than the minimum value ' + valueSpec.minimum)];\n    }\n    if ('maximum' in valueSpec && value > valueSpec.maximum) {\n        return [new ValidationError(key, value, value + ' is greater than the maximum value ' + valueSpec.maximum)];\n    }\n    retu
 rn [];\n}\n\nfunction validateFunction(options) {\n    var functionValueSpec = options.valueSpec;\n    var functionType = unbundle(options.value.type);\n    var stopKeyType;\n    var stopDomainValues = {};\n    var previousStopDomainValue;\n    var previousStopDomainZoom;\n    var isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n    var isPropertyFunction = !isZoomFunction;\n    var isZoomAndPropertyFunction = getType(options.value.stops) === 'array' && getType(options.value.stops[0]) === 'array' && getType(options.value.stops[0][0]) === 'object';\n    var errors = validateObject({\n        key: options.key,\n        value: options.value,\n        valueSpec: options.styleSpec.function,\n        style: options.style,\n        styleSpec: options.styleSpec,\n        objectElementValidators: {\n            stops: validateFunctionStops,\n            default: validateFunctionDefault\n        }\n    });\n    if (functionType === 'identity' && isZoom
 Function) {\n        errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n    }\n    if (functionType !== 'identity' && !options.value.stops) {\n        errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n    }\n    if (functionType === 'exponential' && options.valueSpec.expression && !supportsInterpolation(options.valueSpec)) {\n        errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n    }\n    if (options.styleSpec.$version >= 8) {\n        if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n            errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n        } else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n            errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n        }\n    
 }\n    if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n        errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n    }\n    return errors;\n    function validateFunctionStops(options) {\n        if (functionType === 'identity') {\n            return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n        }\n        var errors = [];\n        var value = options.value;\n        errors = errors.concat(validateArray({\n            key: options.key,\n            value: value,\n            valueSpec: options.valueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec,\n            arrayElementValidator: validateFunctionStop\n        }));\n        if (getType(value) === 'array' && value.length === 0) {\n            errors.push(new ValidationError(options.key, value, 'array must have at least on
 e stop'));\n        }\n        return errors;\n    }\n    function validateFunctionStop(options) {\n        var errors = [];\n        var value = options.value;\n        var key = options.key;\n        if (getType(value) !== 'array') {\n            return [new ValidationError(key, value, 'array expected, ' + getType(value) + ' found')];\n        }\n        if (value.length !== 2) {\n            return [new ValidationError(key, value, 'array length 2 expected, length ' + value.length + ' found')];\n        }\n        if (isZoomAndPropertyFunction) {\n            if (getType(value[0]) !== 'object') {\n                return [new ValidationError(key, value, 'object expected, ' + getType(value[0]) + ' found')];\n            }\n            if (value[0].zoom === undefined) {\n                return [new ValidationError(key, value, 'object stop key must have zoom')];\n            }\n            if (value[0].value === undefined) {\n                return [new ValidationError(key, value, 'ob
 ject stop key must have value')];\n            }\n            if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n                return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n            }\n            if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n                previousStopDomainZoom = unbundle(value[0].zoom);\n                previousStopDomainValue = undefined;\n                stopDomainValues = {};\n            }\n            errors = errors.concat(validateObject({\n                key: key + '[0]',\n                value: value[0],\n                valueSpec: { zoom: {} },\n                style: options.style,\n                styleSpec: options.styleSpec,\n                objectElementValidators: {\n                    zoom: validateNumber,\n                    value: validateStopDomainValue\n                }\n            }));\n        } else {\n            errors = errors.
 concat(validateStopDomainValue({\n                key: key + '[0]',\n                value: value[0],\n                valueSpec: {},\n                style: options.style,\n                styleSpec: options.styleSpec\n            }, value));\n        }\n        if (isExpression(deepUnbundle(value[1]))) {\n            return errors.concat([new ValidationError(key + '[1]', value[1], 'expressions are not allowed in function stops.')]);\n        }\n        return errors.concat(validate({\n            key: key + '[1]',\n            value: value[1],\n            valueSpec: functionValueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec\n        }));\n    }\n    function validateStopDomainValue(options, stop) {\n        var type = getType(options.value);\n        var value = unbundle(options.value);\n        var reportValue = options.value !== null ? options.value : stop;\n        if (!stopKeyType) {\n            stopKeyType = type;\n        } else if (typ
 e !== stopKeyType) {\n            return [new ValidationError(options.key, reportValue, type + ' stop domain type must match previous stop domain type ' + stopKeyType)];\n        }\n        if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n            return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n        }\n        if (type !== 'number' && functionType !== 'categorical') {\n            var message = 'number expected, ' + type + ' found';\n            if (supportsPropertyExpression(functionValueSpec) && functionType === undefined) {\n                message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n            }\n            return [new ValidationError(options.key, reportValue, message)];\n        }\n        if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n            return [new Val
 idationError(options.key, reportValue, 'integer expected, found ' + value)];\n        }\n        if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n            return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n        } else {\n            previousStopDomainValue = value;\n        }\n        if (functionType === 'categorical' && value in stopDomainValues) {\n            return [new ValidationError(options.key, reportValue, 'stop domain values must be unique')];\n        } else {\n            stopDomainValues[value] = true;\n        }\n        return [];\n    }\n    function validateFunctionDefault(options) {\n        return validate({\n            key: options.key,\n            value: options.value,\n            valueSpec: functionValueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec\n        });\n    }\n}\
 n\nfunction validateExpression(options) {\n    var expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n    if (expression.result === 'error') {\n        return expression.value.map(function (error) {\n            return new ValidationError('' + options.key + error.key, options.value, error.message);\n        });\n    }\n    var expressionObj = expression.value.expression || expression.value._styleExpression.expression;\n    if (options.expressionContext === 'property' && options.propertyKey === 'text-font' && !expressionObj.outputDefined()) {\n        return [new ValidationError(options.key, options.value, 'Invalid data expression for \"' + options.propertyKey + '\". Output values must be contained as literals within the expression.')];\n    }\n    if (options.expressionContext === 'property' && options.propertyType === 'layout' && !isStateConstant(expressionObj)) {\n        return [n
 ew ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n    }\n    if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n        return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')];\n    }\n    if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n        if (!isGlobalPropertyConstant(expressionObj, [\n                'zoom',\n                'feature-state'\n            ])) {\n            return [new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n        }\n        if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n            return [new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expressi
 on part of cluster properties.')];\n        }\n    }\n    return [];\n}\n\nfunction validateBoolean(options) {\n    var value = options.value;\n    var key = options.key;\n    var type = getType(value);\n    if (type !== 'boolean') {\n        return [new ValidationError(key, value, 'boolean expected, ' + type + ' found')];\n    }\n    return [];\n}\n\nfunction validateColor(options) {\n    var key = options.key;\n    var value = options.value;\n    var type = getType(value);\n    if (type !== 'string') {\n        return [new ValidationError(key, value, 'color expected, ' + type + ' found')];\n    }\n    if (csscolorparser_1(value) === null) {\n        return [new ValidationError(key, value, 'color expected, \"' + value + '\" found')];\n    }\n    return [];\n}\n\nfunction validateEnum(options) {\n    var key = options.key;\n    var value = options.value;\n    var valueSpec = options.valueSpec;\n    var errors = [];\n    if (Array.isArray(valueSpec.values)) {\n        if (valueSpec.v
 alues.indexOf(unbundle(value)) === -1) {\n            errors.push(new ValidationError(key, value, 'expected one of [' + valueSpec.values.join(', ') + '], ' + JSON.stringify(value) + ' found'));\n        }\n    } else {\n        if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n            errors.push(new ValidationError(key, value, 'expected one of [' + Object.keys(valueSpec.values).join(', ') + '], ' + JSON.stringify(value) + ' found'));\n        }\n    }\n    return errors;\n}\n\nfunction validateFilter(options) {\n    if (isExpressionFilter(deepUnbundle(options.value))) {\n        return validateExpression(extend({}, options, {\n            expressionContext: 'filter',\n            valueSpec: { value: 'boolean' }\n        }));\n    } else {\n        return validateNonExpressionFilter(options);\n    }\n}\nfunction validateNonExpressionFilter(options) {\n    var value = options.value;\n    var key = options.key;\n    if (getType(value) !== 'array') {\n        re
 turn [new ValidationError(key, value, 'array expected, ' + getType(value) + ' found')];\n    }\n    var styleSpec = options.styleSpec;\n    var type;\n    var errors = [];\n    if (value.length < 1) {\n        return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n    }\n    errors = errors.concat(validateEnum({\n        key: key + '[0]',\n        value: value[0],\n        valueSpec: styleSpec.filter_operator,\n        style: options.style,\n        styleSpec: options.styleSpec\n    }));\n    switch (unbundle(value[0])) {\n    case '<':\n    case '<=':\n    case '>':\n    case '>=':\n        if (value.length >= 2 && unbundle(value[1]) === '$type') {\n            errors.push(new ValidationError(key, value, '\"$type\" cannot be use with operator \"' + value[0] + '\"'));\n        }\n    case '==':\n    case '!=':\n        if (value.length !== 3) {\n            errors.push(new ValidationError(key, value, 'filter array for operator \"' + value[0] + '\" mu
 st have 3 elements'));\n        }\n    case 'in':\n    case '!in':\n        if (value.length >= 2) {\n            type = getType(value[1]);\n            if (type !== 'string') {\n                errors.push(new ValidationError(key + '[1]', value[1], 'string expected, ' + type + ' found'));\n            }\n        }\n        for (var i = 2; i < value.length; i++) {\n            type = getType(value[i]);\n            if (unbundle(value[1]) === '$type') {\n                errors = errors.concat(validateEnum({\n                    key: key + '[' + i + ']',\n                    value: value[i],\n                    valueSpec: styleSpec.geometry_type,\n                    style: options.style,\n                    styleSpec: options.styleSpec\n                }));\n            } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n                errors.push(new ValidationError(key + '[' + i + ']', value[i], 'string, number, or boolean expected, ' + type + ' found'));
 \n            }\n        }\n        break;\n    case 'any':\n    case 'all':\n    case 'none':\n        for (var i$1 = 1; i$1 < value.length; i$1++) {\n            errors = errors.concat(validateNonExpressionFilter({\n                key: key + '[' + i$1 + ']',\n                value: value[i$1],\n                style: options.style,\n                styleSpec: options.styleSpec\n            }));\n        }\n        break;\n    case 'has':\n    case '!has':\n        type = getType(value[1]);\n        if (value.length !== 2) {\n            errors.push(new ValidationError(key, value, 'filter array for \"' + value[0] + '\" operator must have 2 elements'));\n        } else if (type !== 'string') {\n            errors.push(new ValidationError(key + '[1]', value[1], 'string expected, ' + type + ' found'));\n        }\n        break;\n    case 'within':\n        type = getType(value[1]);\n        if (value.length !== 2) {\n            errors.push(new ValidationError(key, value, 'filter ar
 ray for \"' + value[0] + '\" operator must have 2 elements'));\n        } else if (type !== 'object') {\n            errors.push(new ValidationError(key + '[1]', value[1], 'object expected, ' + type + ' found'));\n        }\n        break;\n    }\n    return errors;\n}\n\nfunction validateProperty(options, propertyType) {\n    var key = options.key;\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    var value = options.value;\n    var propertyKey = options.objectKey;\n    var layerSpec = styleSpec[propertyType + '_' + options.layerType];\n    if (!layerSpec) {\n        return [];\n    }\n    var transitionMatch = propertyKey.match(/^(.*)-transition$/);\n    if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n        return validate({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.transition,\n            style: style,\n            styleSpec: sty
 leSpec\n        });\n    }\n    var valueSpec = options.valueSpec || layerSpec[propertyKey];\n    if (!valueSpec) {\n        return [new ValidationError(key, value, 'unknown property \"' + propertyKey + '\"')];\n    }\n    var tokenMatch;\n    if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n        return [new ValidationError(key, value, '\"' + propertyKey + '\" does not support interpolation syntax\\n' + 'Use an identity property function instead: `{ \"type\": \"identity\", \"property\": ' + JSON.stringify(tokenMatch[1]) + ' }`.')];\n    }\n    var errors = [];\n    if (options.layerType === 'symbol') {\n        if (propertyKey === 'text-field' && style && !style.glyphs) {\n            errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n        }\n        if (propertyKey === 'text-font' && isFunction$1(deepUnbundle(value)) && unbundl
 e(value.type) === 'identity') {\n            errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n        }\n    }\n    return errors.concat(validate({\n        key: options.key,\n        value: value,\n        valueSpec: valueSpec,\n        style: style,\n        styleSpec: styleSpec,\n        expressionContext: 'property',\n        propertyType: propertyType,\n        propertyKey: propertyKey\n    }));\n}\n\nfunction validatePaintProperty(options) {\n    return validateProperty(options, 'paint');\n}\n\nfunction validateLayoutProperty(options) {\n    return validateProperty(options, 'layout');\n}\n\nfunction validateLayer(options) {\n    var errors = [];\n    var layer = options.value;\n    var key = options.key;\n    var style = options.style;\n    var styleSpec = options.styleSpec;\n    if (!layer.type && !layer.ref) {\n        errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n    }\n    var typ
 e = unbundle(layer.type);\n    var ref = unbundle(layer.ref);\n    if (layer.id) {\n        var layerId = unbundle(layer.id);\n        for (var i = 0; i < options.arrayIndex; i++) {\n            var otherLayer = style.layers[i];\n            if (unbundle(otherLayer.id) === layerId) {\n                errors.push(new ValidationError(key, layer.id, 'duplicate layer id \"' + layer.id + '\", previously used at line ' + otherLayer.id.__line__));\n            }\n        }\n    }\n    if ('ref' in layer) {\n        [\n            'type',\n            'source',\n            'source-layer',\n            'filter',\n            'layout'\n        ].forEach(function (p) {\n            if (p in layer) {\n                errors.push(new ValidationError(key, layer[p], '\"' + p + '\" is prohibited for ref layers'));\n            }\n        });\n        var parent;\n        style.layers.forEach(function (layer) {\n            if (unbundle(layer.id) === ref) {\n                parent = layer;\n       
      }\n        });\n        if (!parent) {\n            errors.push(new ValidationError(key, layer.ref, 'ref layer \"' + ref + '\" not found'));\n        } else if (parent.ref) {\n            errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n        } else {\n            type = unbundle(parent.type);\n        }\n    } else if (type !== 'background') {\n        if (!layer.source) {\n            errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n        } else {\n            var source = style.sources && style.sources[layer.source];\n            var sourceType = source && unbundle(source.type);\n            if (!source) {\n                errors.push(new ValidationError(key, layer.source, 'source \"' + layer.source + '\" not found'));\n            } else if (sourceType === 'vector' && type === 'raster') {\n                errors.push(new ValidationError(key, layer.source, 'layer \"' + layer.id + '\" requir
 es a raster source'));\n            } else if (sourceType === 'raster' && type !== 'raster') {\n                errors.push(new ValidationError(key, layer.source, 'layer \"' + layer.id + '\" requires a vector source'));\n            } else if (sourceType === 'vector' && !layer['source-layer']) {\n                errors.push(new ValidationError(key, layer, 'layer \"' + layer.id + '\" must specify a \"source-layer\"'));\n            } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n                errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \\'hillshade\\'.'));\n            } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] && (sourceType !== 'geojson' || !source.lineMetrics)) {\n                errors.push(new ValidationError(key, layer, 'layer \"' + layer.id + '\" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.'));\n            }\n        }\n    }
 \n    errors = errors.concat(validateObject({\n        key: key,\n        value: layer,\n        valueSpec: styleSpec.layer,\n        style: options.style,\n        styleSpec: options.styleSpec,\n        objectElementValidators: {\n            '*': function _() {\n                return [];\n            },\n            type: function type() {\n                return validate({\n                    key: key + '.type',\n                    value: layer.type,\n                    valueSpec: styleSpec.layer.type,\n                    style: options.style,\n                    styleSpec: options.styleSpec,\n                    object: layer,\n                    objectKey: 'type'\n                });\n            },\n            filter: validateFilter,\n            layout: function layout(options) {\n                return validateObject({\n                    layer: layer,\n                    key: options.key,\n                    value: options.value,\n                    style: optio
 ns.style,\n                    styleSpec: options.styleSpec,\n                    objectElementValidators: {\n                        '*': function _(options) {\n                            return validateLayoutProperty(extend({ layerType: type }, options));\n                        }\n                    }\n                });\n            },\n            paint: function paint(options) {\n                return validateObject({\n                    layer: layer,\n                    key: options.key,\n                    value: options.value,\n                    style: options.style,\n                    styleSpec: options.styleSpec,\n                    objectElementValidators: {\n                        '*': function _(options) {\n                            return validatePaintProperty(extend({ layerType: type }, options));\n                        }\n                    }\n                });\n            }\n        }\n    }));\n    return errors;\n}\n\nfunction validateString
 (options) {\n    var value = options.value;\n    var key = options.key;\n    var type = getType(value);\n    if (type !== 'string') {\n        return [new ValidationError(key, value, 'string expected, ' + type + ' found')];\n    }\n    return [];\n}\n\nvar objectElementValidators = { promoteId: validatePromoteId };\nfunction validateSource(options) {\n    var value = options.value;\n    var key = options.key;\n    var styleSpec = options.styleSpec;\n    var style = options.style;\n    if (!value.type) {\n        return [new ValidationError(key, value, '\"type\" is required')];\n    }\n    var type = unbundle(value.type);\n    var errors;\n    switch (type) {\n    case 'vector':\n    case 'raster':\n    case 'raster-dem':\n        errors = validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec['source_' + type.replace('-', '_')],\n            style: options.style,\n            styleSpec: styleSpec,\n            objectElementValidators: ob
 jectElementValidators\n        });\n        return errors;\n    case 'geojson':\n        errors = validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.source_geojson,\n            style: style,\n            styleSpec: styleSpec,\n            objectElementValidators: objectElementValidators\n        });\n        if (value.cluster) {\n            for (var prop in value.clusterProperties) {\n                var ref = value.clusterProperties[prop];\n                var operator = ref[0];\n                var mapExpr = ref[1];\n                var reduceExpr = typeof operator === 'string' ? [\n                    operator,\n                    ['accumulated'],\n                    [\n                        'get',\n                        prop\n                    ]\n                ] : operator;\n                errors.push.apply(errors, validateExpression({\n                    key: key + '.' + prop + '.map',\n                    value: m
 apExpr,\n                    expressionContext: 'cluster-map'\n                }));\n                errors.push.apply(errors, validateExpression({\n                    key: key + '.' + prop + '.reduce',\n                    value: reduceExpr,\n                    expressionContext: 'cluster-reduce'\n                }));\n            }\n        }\n        return errors;\n    case 'video':\n        return validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.source_video,\n            style: style,\n            styleSpec: styleSpec\n        });\n    case 'image':\n        return validateObject({\n            key: key,\n            value: value,\n            valueSpec: styleSpec.source_image,\n            style: style,\n            styleSpec: styleSpec\n        });\n    case 'canvas':\n        return [new ValidationError(key, null, 'Please use runtime APIs to add canvas sources, rather than including them in stylesheets.', 'source.canvas'
 )];\n    default:\n        return validateEnum({\n            key: key + '.type',\n            value: value.type,\n            valueSpec: {\n                values: [\n                    'vector',\n                    'raster',\n                    'raster-dem',\n                    'geojson',\n                    'video',\n                    'image'\n                ]\n            },\n            style: style,\n            styleSpec: styleSpec\n        });\n    }\n}\nfunction validatePromoteId(ref) {\n    var key = ref.key;\n    var value = ref.value;\n    if (getType(value) === 'string') {\n        return validateString({\n            key: key,\n            value: value\n        });\n    } else {\n        var errors = [];\n        for (var prop in value) {\n            errors.push.apply(errors, validateString({\n                key: key + '.' + prop,\n                value: value[prop]\n            }));\n        }\n        return errors;\n    }\n}\n\nfunction validateLight(optio
 ns) {\n    var light = options.value;\n    var styleSpec = options.styleSpec;\n    var lightSpec = styleSpec.light;\n    var style = options.style;\n    var errors = [];\n    var rootType = getType(light);\n    if (light === undefined) {\n        return errors;\n    } else if (rootType !== 'object') {\n        errors = errors.concat([new ValidationError('light', light, 'object expected, ' + rootType + ' found')]);\n        return errors;\n    }\n    for (var key in light) {\n        var transitionMatch = key.match(/^(.*)-transition$/);\n        if (transitionMatch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n            errors = errors.concat(validate({\n                key: key,\n                value: light[key],\n                valueSpec: styleSpec.transition,\n                style: style,\n                styleSpec: styleSpec\n            }));\n        } else if (lightSpec[key]) {\n            errors = errors.concat(validate({\n             
    key: key,\n                value: light[key],\n                valueSpec: lightSpec[key],\n                style: style,\n                styleSpec: styleSpec\n            }));\n        } else {\n            errors = errors.concat([new ValidationError(key, light[key], 'unknown property \"' + key + '\"')]);\n        }\n    }\n    return errors;\n}\n\nfunction validateFormatted(options) {\n    if (validateString(options).length === 0) {\n        return [];\n    }\n    return validateExpression(options);\n}\n\nfunction validateImage(options) {\n    if (validateString(options).length === 0) {\n        return [];\n    }\n    return validateExpression(options);\n}\n\nvar VALIDATORS = {\n    '*': function _() {\n        return [];\n    },\n    'array': validateArray,\n    'boolean': validateBoolean,\n    'number': validateNumber,\n    'color': validateColor,\n    'constants': validateConstants,\n    'enum': validateEnum,\n    'filter': validateFilter,\n    'function': validateFunction,\
 n    'layer': validateLayer,\n    'object': validateObject,\n    'source': validateSource,\n    'light': validateLight,\n    'string': validateString,\n    'formatted': validateFormatted,\n    'resolvedImage': validateImage\n};\nfunction validate(options) {\n    var value = options.value;\n    var valueSpec = options.valueSpec;\n    var styleSpec = options.styleSpec;\n    if (valueSpec.expression && isFunction$1(unbundle(value))) {\n        return validateFunction(options);\n    } else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n        return validateExpression(options);\n    } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n        return VALIDATORS[valueSpec.type](options);\n    } else {\n        var valid = validateObject(extend({}, options, { valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec }));\n        return valid;\n    }\n}\n\nfunction validateGlyphsURL (options) {\n    var value = options.value;\n    var key = options.key;\n
     var errors = validateString(options);\n    if (errors.length) {\n        return errors;\n    }\n    if (value.indexOf('{fontstack}') === -1) {\n        errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n    }\n    if (value.indexOf('{range}') === -1) {\n        errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n    }\n    return errors;\n}\n\nfunction validateStyleMin(style, styleSpec) {\n    if (styleSpec === void 0)\n        styleSpec = v8;\n    var errors = [];\n    errors = errors.concat(validate({\n        key: '',\n        value: style,\n        valueSpec: styleSpec.$root,\n        styleSpec: styleSpec,\n        style: style,\n        objectElementValidators: {\n            glyphs: validateGlyphsURL,\n            '*': function _() {\n                return [];\n            }\n        }\n    }));\n    if (style.constants) {\n        errors = errors.concat(validateConstants({\n 
            key: 'constants',\n            value: style.constants,\n            style: style,\n            styleSpec: styleSpec\n        }));\n    }\n    return sortErrors(errors);\n}\nvalidateStyleMin.source = wrapCleanErrors(validateSource);\nvalidateStyleMin.light = wrapCleanErrors(validateLight);\nvalidateStyleMin.layer = wrapCleanErrors(validateLayer);\nvalidateStyleMin.filter = wrapCleanErrors(validateFilter);\nvalidateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);\nvalidateStyleMin.layoutProperty = wrapCleanErrors(validateLayoutProperty);\nfunction sortErrors(errors) {\n    return [].concat(errors).sort(function (a, b) {\n        return a.line - b.line;\n    });\n}\nfunction wrapCleanErrors(inner) {\n    return function () {\n        var args = [], len = arguments.length;\n        while (len--)\n            args[len] = arguments[len];\n        return sortErrors(inner.apply(this, args));\n    };\n}\n\nvar jsonlint = createCommonjsModule(function (module, expor
 ts) {\n/* parser generated by jison 0.4.15 */\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: functi
 on(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_num
 ber, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v){ }return o},$V0=[1,12],$V1=[1,13],$V2=[1,9],$V3=[1,10],$V4=[1,11],$V5=[1,14],$V6=[1,15],$V7=[14,18,22,24],$V8=[18,22],$V9=[22,24];\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"JSONString\":3,\"STRING\":4,\"JS
 ONNumber\":5,\"NUMBER\":6,\"JSONNullLiteral\":7,\"NULL\":8,\"JSONBooleanLiteral\":9,\"TRUE\":10,\"FALSE\":11,\"JSONText\":12,\"JSONValue\":13,\"EOF\":14,\"JSONObject\":15,\"JSONArray\":16,\"{\":17,\"}\":18,\"JSONMemberList\":19,\"JSONMember\":20,\":\":21,\",\":22,\"[\":23,\"]\":24,\"JSONElementList\":25,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"STRING\",6:\"NUMBER\",8:\"NULL\",10:\"TRUE\",11:\"FALSE\",14:\"EOF\",17:\"{\",18:\"}\",21:\":\",22:\",\",23:\"[\",24:\"]\"},\nproductions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n // replace escaped characters with actual character\n          this.$ = new String(yytext.replace(/\\\\(\\\\|\")/g, \"$\"+\"1\")\n             
         .replace(/\\\\n/g,'\\n')\n                     .replace(/\\\\r/g,'\\r')\n                     .replace(/\\\\t/g,'\\t')\n                     .replace(/\\\\v/g,'\\v')\n                     .replace(/\\\\f/g,'\\f')\n                     .replace(/\\\\b/g,'\\b'));\n          this.$.__line__ =  this._$.first_line;\n        \nbreak;\ncase 2:\n\n            this.$ = new Number(yytext);\n            this.$.__line__ =  this._$.first_line;\n        \nbreak;\ncase 3:\n\n            this.$ = null;\n        \nbreak;\ncase 4:\n\n            this.$ = new Boolean(true);\n            this.$.__line__ = this._$.first_line;\n        \nbreak;\ncase 5:\n\n            this.$ = new Boolean(false);\n            this.$.__line__ = this._$.first_line;\n        \nbreak;\ncase 6:\nreturn this.$ = $$[$0-1];\ncase 13:\nthis.$ = {}; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 14: case 19:\nthis.$ = $$[$0-1]; O
 bject.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 15:\nthis.$ = [$$[$0-2], $$[$0]];\nbreak;\ncase 16:\nthis.$ = {}; this.$[$$[$0][0]] = $$[$0][1];\nbreak;\ncase 17:\nthis.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];\nbreak;\ncase 18:\nthis.$ = []; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 20:\nthis.$ = [$$[$0]];\nbreak;\ncase 21:\nthis.$ = $$[$0-2]; $$[$0-2].push($$[$0]);\nbreak;\n}\n},\ntable: [{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,12:1,13:2,15:7,16:8,17:$V5,23:$V6},{1:[3]},{14:[1,16]},o($V7,[2,7]),o($V7,[2,8]),o($V7,[2,9]),o($V7,[2,10]),o($V7,[2,11]),o($V7,[2,12]),o($V7,[2,3]),o($V7,[2,4]),o($V7,[2,5]),o([14,18,21,22,24],[2,1]),o($V7,[2,2]),{3:20,4:$V0,18:[1,17],19:18,20:19},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:23,15:7,16:8,17:$V5,23:$V6,24:[1,21],25:22},{1:[2,6]},o
 ($V7,[2,13]),{18:[1,24],22:[1,25]},o($V8,[2,16]),{21:[1,26]},o($V7,[2,18]),{22:[1,28],24:[1,27]},o($V9,[2,20]),o($V7,[2,14]),{3:20,4:$V0,20:29},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:30,15:7,16:8,17:$V5,23:$V6},o($V7,[2,19]),{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:31,15:7,16:8,17:$V5,23:$V6},o($V8,[2,17]),o($V8,[2,15]),o($V9,[2,21])],\ndefaultActions: {16:[2,6]},\nparseError: function parseError(str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        throw new Error(str);\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n   
      }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    \n        function lex() {\n            var token;\n            token = lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, state, action, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultAction
 s[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n                    if (typeof action === 'undefined' || !action.length || !action[0]) {\n                var errStr = '';\n                expected = [];\n                for (p in table[state]) {\n                    if (this.terminals_[p] && p > TERROR) {\n                        expected.push('\\'' + this.terminals_[p] + '\\'');\n                    }\n                }\n                if (lexer.showPosition) {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n                } else {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + 
 (this.terminals_[symbol] || symbol) + '\\'');\n                }\n                this.parseError(errStr, {\n                    text: lexer.match,\n                    token: this.terminals_[symbol] || symbol,\n                    line: lexer.yylineno,\n                    loc: yyloc,\n                    expected: expected\n                });\n            }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n            }\n            break;\n       
  case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                ret
 urn r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = in
 put;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            
 this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                
 (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracki
 ng persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing erro
 r occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function (match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n          
       yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match 
 += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n   
      if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a 
 rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n   
      }\n    },\n\n// return next match that has a token\nlex:function lex() {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin(condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState() {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules() {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[t
 his.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState(n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState(condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 6\ncas
 e 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4\ncase 3:return 17\ncase 4:return 18\ncase 5:return 23\ncase 6:return 24\ncase 7:return 22\ncase 8:return 21\ncase 9:return 10\ncase 10:return 11\ncase 11:return 8\ncase 12:return 14\ncase 13:return 'INVALID'\n}\n},\nrules: [/^(?:\\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/,/^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/,/^(?:\\{)/,/^(?:\\})/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?::)/,/^(?:true\\b)/,/^(?:false\\b)/,/^(?:null\\b)/,/^(?:$)/,/^(?:.)/],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof commonjsRequire !== 'undefined' && 'object' !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = functi
 on () { return parser.parse.apply(parser, arguments); };\n}\n});\nvar jsonlint_1 = jsonlint.parser;\nvar jsonlint_2 = jsonlint.Parser;\nvar jsonlint_3 = jsonlint.parse;\n\nfunction readStyle(style) {\n    if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {\n        try {\n            return jsonlint.parse(style.toString());\n        } catch (e) {\n            throw new ParsingError$1(e);\n        }\n    }\n    return style;\n}\n\nfunction validateStyle(style, styleSpec) {\n    if (styleSpec === void 0)\n        styleSpec = v8;\n    var s = style;\n    try {\n        s = readStyle(s);\n    } catch (e) {\n        return [e];\n    }\n    return validateStyleMin(s, styleSpec);\n}\n\nvar SUPPORTED_SPEC_VERSION = 8;\nvar MAX_SOURCES_IN_STYLE = 15;\nfunction isValid(value, regex) {\n    if (!value || getType(value) !== 'string') {\n        return true;\n    }\n    return !!value.match(regex);\n}\nfunction getSourceCount(source) {\n    if (source.url) {\n 
        return source.url.split(',').length;\n    } else {\n        return 0;\n    }\n}\nfunction getAllowedKeyErrors(obj, keys, path) {\n    var allowed = new Set(keys);\n    var errors = [];\n    Object.keys(obj).forEach(function (k) {\n        if (!allowed.has(k)) {\n            var prop = path ? path + '.' + k : null;\n            errors.push(new ValidationError(prop, obj[k], 'Unsupported property \"' + k + '\"'));\n        }\n    });\n    return errors;\n}\nfunction getSourceErrors(source, i) {\n    var errors = [];\n    var sourceKeys = [\n        'type',\n        'url',\n        'tileSize'\n    ];\n    errors.push.apply(errors, getAllowedKeyErrors(source, sourceKeys, 'source'));\n    var sourceUrlPattern = /^mapbox:\\/\\/([^/]*)$/;\n    if (!isValid(source.url, sourceUrlPattern)) {\n        errors.push(new ValidationError('sources[' + i + ']', source.url, 'Source url must be a valid Mapbox tileset url'));\n    }\n    return errors;\n}\nfunction getSourcesErrors(sources) {\n   
  var errors = [];\n    var count = 0;\n    Object.keys(sources).forEach(function (s, i) {\n        var sourceErrors = getSourceErrors(sources[s], i);\n        if (!sourceErrors.length) {\n            count = count + getSourceCount(sources[s]);\n        }\n        errors.push.apply(errors, sourceErrors);\n    });\n    if (count > MAX_SOURCES_IN_STYLE) {\n        errors.push(new ValidationError('sources', null, 'Styles must contain ' + MAX_SOURCES_IN_STYLE + ' or fewer sources'));\n    }\n    return errors;\n}\nfunction getRootErrors(style, specKeys) {\n    var errors = [];\n    var optionalRootProperties = [\n        'owner',\n        'id',\n        'cacheControl',\n        'draft',\n        'created',\n        'modified',\n        'visibility'\n    ];\n    var allowedKeyErrors = getAllowedKeyErrors(style, specKeys.concat(optionalRootProperties));\n    errors.push.apply(errors, allowedKeyErrors);\n    if (style.version > SUPPORTED_SPEC_VERSION || style.version < SUPPORTED_SPEC_VERSIO
 N) {\n        errors.push(new ValidationError('version', style.version, 'Style version must be ' + SUPPORTED_SPEC_VERSION));\n    }\n    var glyphUrlPattern = /^mapbox:\\/\\/fonts\\/([^/]*)\\/{fontstack}\\/{range}.pbf$/;\n    if (!isValid(style.glyphs, glyphUrlPattern)) {\n        errors.push(new ValidationError('glyphs', style.glyphs, 'Styles must reference glyphs hosted by Mapbox'));\n    }\n    var spriteUrlPattern = /^mapbox:\\/\\/sprites\\/([^/]*)\\/([^/]*)\\/?([^/]*)?$/;\n    if (!isValid(style.sprite, spriteUrlPattern)) {\n        errors.push(new ValidationError('sprite', style.sprite, 'Styles must reference sprites hosted by Mapbox'));\n    }\n    var visibilityPattern = /^(public|private)$/;\n    if (!isValid(style.visibility, visibilityPattern)) {\n        errors.push(new ValidationError('visibility', style.visibility, 'Style visibility must be public or private'));\n    }\n    return errors;\n}\nfunction validateMapboxApiSupported(style) {\n    var s = style;\n    try {\n
         s = readStyle(s);\n    } catch (e) {\n        return [e];\n    }\n    var errors = validateStyleMin(s, v8).concat(getRootErrors(s, Object.keys(v8.$root)));\n    if (s.sources) {\n        errors = errors.concat(getSourcesErrors(s.sources));\n    }\n    return errors;\n}\n\nvar expression$1 = {\n    StyleExpression: StyleExpression,\n    isExpression: isExpression,\n    isExpressionFilter: isExpressionFilter,\n    createExpression: createExpression,\n    createPropertyExpression: createPropertyExpression,\n    normalizePropertyExpression: normalizePropertyExpression,\n    ZoomConstantExpression: ZoomConstantExpression,\n    ZoomDependentExpression: ZoomDependentExpression,\n    StylePropertyFunction: StylePropertyFunction\n};\nvar styleFunction = {\n    convertFunction: convertFunction,\n    createFunction: createFunction,\n    isFunction: isFunction$1\n};\nvar visit = {\n    eachSource: eachSource,\n    eachLayer: eachLayer,\n    eachProperty: eachProperty\n};\nvalidateStyle.
 parsed = validateStyle;\nvalidateStyle.latest = validateStyle;\n\nexport { Color, ParsingError$1 as ParsingError, ValidationError, composite, convertFilter$1 as convertFilter, derefLayers, diffStyles as diff, expression$1 as expression, createFilter as featureFilter, format, styleFunction as function, v8 as latest, migrate, v8, validateStyle as validate, validateMapboxApiSupported, visit };\n//# sourceMappingURL=index.es.js.map\n","(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\ntypeof define === 'function' && define.amd ? define(factory) :\n(global = global || self, global.RBush = factory());\n}(this, function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n    quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n    while (right > left) {\n        if (right - left > 600) {\n   
          var n = right - left + 1;\n            var m = k - left + 1;\n            var z = Math.log(n);\n            var s = 0.5 * Math.exp(2 * z / 3);\n            var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            quickselectStep(arr, k, newLeft, newRight, compare);\n        }\n\n        var t = arr[k];\n        var i = left;\n        var j = right;\n\n        swap(arr, left, k);\n        if (compare(arr[right], t) > 0) { swap(arr, left, right); }\n\n        while (i < j) {\n            swap(arr, i, j);\n            i++;\n            j--;\n            while (compare(arr[i], t) < 0) { i++; }\n            while (compare(arr[j], t) > 0) { j--; }\n        }\n\n        if (compare(arr[left], t) === 0) { swap(arr, left, j); }\n        else {\n            j++;\n            swap(arr, j, right);\n  
       }\n\n        if (j <= k) { left = j + 1; }\n        if (k <= j) { right = j - 1; }\n    }\n}\n\nfunction swap(arr, i, j) {\n    var tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n\nvar RBush = function RBush(maxEntries) {\n    if ( maxEntries === void 0 ) maxEntries = 9;\n\n    // max entries in a node is 9 by default; min node fill is 40% for best performance\n    this._maxEntries = Math.max(4, maxEntries);\n    this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n    this.clear();\n};\n\nRBush.prototype.all = function all () {\n    return this._all(this.data, []);\n};\n\nRBush.prototype.search = function search (bbox) {\n    var node = this.data;\n    var result = [];\n\n    if (!intersects(bbox, node)) { return result; }\n\n    var toBBox = this.toBBox;\n    var nodesToSearch = [];\n\n    while (node) {\n        for (var i = 0; i < node.children.length; i++) {\n         
    var child = node.children[i];\n            var childBBox = node.leaf ? toBBox(child) : child;\n\n            if (intersects(bbox, childBBox)) {\n                if (node.leaf) { result.push(child); }\n                else if (contains(bbox, childBBox)) { this._all(child, result); }\n                else { nodesToSearch.push(child); }\n            }\n        }\n        node = nodesToSearch.pop();\n    }\n\n    return result;\n};\n\nRBush.prototype.collides = function collides (bbox) {\n    var node = this.data;\n\n    if (!intersects(bbox, node)) { return false; }\n\n    var nodesToSearch = [];\n    while (node) {\n        for (var i = 0; i < node.children.length; i++) {\n            var child = node.children[i];\n            var childBBox = node.leaf ? this.toBBox(child) : child;\n\n            if (intersects(bbox, childBBox)) {\n                if (node.leaf || contains(bbox, childBBox)) { return true; }\n                nodesToSearch.push(child);\n            }\n        }\n    
     node = nodesToSearch.pop();\n    }\n\n    return false;\n};\n\nRBush.prototype.load = function load (data) {\n    if (!(data && data.length)) { return this; }\n\n    if (data.length < this._minEntries) {\n        for (var i = 0; i < data.length; i++) {\n            this.insert(data[i]);\n        }\n        return this;\n    }\n\n    // recursively build the tree with the given data from scratch using OMT algorithm\n    var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n    if (!this.data.children.length) {\n        // save as is if tree is empty\n        this.data = node;\n\n    } else if (this.data.height === node.height) {\n        // split root if trees have the same height\n        this._splitRoot(this.data, node);\n\n    } else {\n        if (this.data.height < node.height) {\n            // swap trees if inserted one is bigger\n            var tmpNode = this.data;\n            this.data = node;\n            node = tmpNode;\n        }\n\n        // insert the s
 mall tree into the large tree at appropriate level\n        this._insert(node, this.data.height - node.height - 1, true);\n    }\n\n    return this;\n};\n\nRBush.prototype.insert = function insert (item) {\n    if (item) { this._insert(item, this.data.height - 1); }\n    return this;\n};\n\nRBush.prototype.clear = function clear () {\n    this.data = createNode([]);\n    return this;\n};\n\nRBush.prototype.remove = function remove (item, equalsFn) {\n    if (!item) { return this; }\n\n    var node = this.data;\n    var bbox = this.toBBox(item);\n    var path = [];\n    var indexes = [];\n    var i, parent, goingUp;\n\n    // depth-first iterative tree traversal\n    while (node || path.length) {\n\n        if (!node) { // go up\n            node = path.pop();\n            parent = path[path.length - 1];\n            i = indexes.pop();\n            goingUp = true;\n        }\n\n        if (node.leaf) { // check current node\n            var index = findItem(item, node.children, equal
 sFn);\n\n            if (index !== -1) {\n                // item found, remove the item and condense tree upwards\n                node.children.splice(index, 1);\n                path.push(node);\n                this._condense(path);\n                return this;\n            }\n        }\n\n        if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n            path.push(node);\n            indexes.push(i);\n            i = 0;\n            parent = node;\n            node = node.children[0];\n\n        } else if (parent) { // go right\n            i++;\n            node = parent.children[i];\n            goingUp = false;\n\n        } else { node = null; } // nothing found\n    }\n\n    return this;\n};\n\nRBush.prototype.toBBox = function toBBox (item) { return item; };\n\nRBush.prototype.compareMinX = function compareMinX (a, b) { return a.minX - b.minX; };\nRBush.prototype.compareMinY = function compareMinY (a, b) { return a.minY - b.minY; };\n\nRBush.prototype.t
 oJSON = function toJSON () { return this.data; };\n\nRBush.prototype.fromJSON = function fromJSON (data) {\n    this.data = data;\n    return this;\n};\n\nRBush.prototype._all = function _all (node, result) {\n    var nodesToSearch = [];\n    while (node) {\n        if (node.leaf) { result.push.apply(result, node.children); }\n        else { nodesToSearch.push.apply(nodesToSearch, node.children); }\n\n        node = nodesToSearch.pop();\n    }\n    return result;\n};\n\nRBush.prototype._build = function _build (items, left, right, height) {\n\n    var N = right - left + 1;\n    var M = this._maxEntries;\n    var node;\n\n    if (N <= M) {\n        // reached leaf level; return leaf\n        node = createNode(items.slice(left, right + 1));\n        calcBBox(node, this.toBBox);\n        return node;\n    }\n\n    if (!height) {\n        // target height of the bulk-loaded tree\n        height = Math.ceil(Math.log(N) / Math.log(M));\n\n        // target number of root entries to maximi
 ze storage utilization\n        M = Math.ceil(N / Math.pow(M, height - 1));\n    }\n\n    node = createNode([]);\n    node.leaf = false;\n    node.height = height;\n\n    // split the items into M mostly square tiles\n\n    var N2 = Math.ceil(N / M);\n    var N1 = N2 * Math.ceil(Math.sqrt(M));\n\n    multiSelect(items, left, right, N1, this.compareMinX);\n\n    for (var i = left; i <= right; i += N1) {\n\n        var right2 = Math.min(i + N1 - 1, right);\n\n        multiSelect(items, i, right2, N2, this.compareMinY);\n\n        for (var j = i; j <= right2; j += N2) {\n\n            var right3 = Math.min(j + N2 - 1, right2);\n\n            // pack each entry recursively\n            node.children.push(this._build(items, j, right3, height - 1));\n        }\n    }\n\n    calcBBox(node, this.toBBox);\n\n    return node;\n};\n\nRBush.prototype._chooseSubtree = function _chooseSubtree (bbox, node, level, path) {\n    while (true) {\n        path.push(node);\n\n        if (node.leaf || pat
 h.length - 1 === level) { break; }\n\n        var minArea = Infinity;\n        var minEnlargement = Infinity;\n        var targetNode = (void 0);\n\n        for (var i = 0; i < node.children.length; i++) {\n            var child = node.children[i];\n            var area = bboxArea(child);\n            var enlargement = enlargedArea(bbox, child) - area;\n\n            // choose entry with the least area enlargement\n            if (enlargement < minEnlargement) {\n                minEnlargement = enlargement;\n                minArea = area < minArea ? area : minArea;\n                targetNode = child;\n\n            } else if (enlargement === minEnlargement) {\n                // otherwise choose one with the smallest area\n                if (area < minArea) {\n                    minArea = area;\n                    targetNode = child;\n                }\n            }\n        }\n\n        node = targetNode || node.children[0];\n    }\n\n    return node;\n};\n\nRBush.prototype.
 _insert = function _insert (item, level, isNode) {\n    var bbox = isNode ? item : this.toBBox(item);\n    var insertPath = [];\n\n    // find the best node for accommodating the item, saving all nodes along the path too\n    var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n    // put the item into the node\n    node.children.push(item);\n    extend(node, bbox);\n\n    // split on node overflow; propagate upwards if necessary\n    while (level >= 0) {\n        if (insertPath[level].children.length > this._maxEntries) {\n            this._split(insertPath, level);\n            level--;\n        } else { break; }\n    }\n\n    // adjust bboxes along the insertion path\n    this._adjustParentBBoxes(bbox, insertPath, level);\n};\n\n// split overflowed node into two\nRBush.prototype._split = function _split (insertPath, level) {\n    var node = insertPath[level];\n    var M = node.children.length;\n    var m = this._minEntries;\n\n    this._chooseSplitAxis(node, m, 
 M);\n\n    var splitIndex = this._chooseSplitIndex(node, m, M);\n\n    var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n    newNode.height = node.height;\n    newNode.leaf = node.leaf;\n\n    calcBBox(node, this.toBBox);\n    calcBBox(newNode, this.toBBox);\n\n    if (level) { insertPath[level - 1].children.push(newNode); }\n    else { this._splitRoot(node, newNode); }\n};\n\nRBush.prototype._splitRoot = function _splitRoot (node, newNode) {\n    // split root node\n    this.data = createNode([node, newNode]);\n    this.data.height = node.height + 1;\n    this.data.leaf = false;\n    calcBBox(this.data, this.toBBox);\n};\n\nRBush.prototype._chooseSplitIndex = function _chooseSplitIndex (node, m, M) {\n    var index;\n    var minOverlap = Infinity;\n    var minArea = Infinity;\n\n    for (var i = m; i <= M - m; i++) {\n        var bbox1 = distBBox(node, 0, i, this.toBBox);\n        var bbox2 = distBBox(node, i, M, this.toBBox);\n\n      
   var overlap = intersectionArea(bbox1, bbox2);\n        var area = bboxArea(bbox1) + bboxArea(bbox2);\n\n        // choose distribution with minimum overlap\n        if (overlap < minOverlap) {\n            minOverlap = overlap;\n            index = i;\n\n            minArea = area < minArea ? area : minArea;\n\n        } else if (overlap === minOverlap) {\n            // otherwise choose distribution with minimum area\n            if (area < minArea) {\n                minArea = area;\n                index = i;\n            }\n        }\n    }\n\n    return index || M - m;\n};\n\n// sorts node children by the best axis for split\nRBush.prototype._chooseSplitAxis = function _chooseSplitAxis (node, m, M) {\n    var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;\n    var compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;\n    var xMargin = this._allDistMargin(node, m, M, compareMinX);\n    var yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n    /
 / if total distributions margin value is minimal for x, sort by minX,\n    // otherwise it's already sorted by minY\n    if (xMargin < yMargin) { node.children.sort(compareMinX); }\n};\n\n// total margin of all possible split distributions where each node is at least m full\nRBush.prototype._allDistMargin = function _allDistMargin (node, m, M, compare) {\n    node.children.sort(compare);\n\n    var toBBox = this.toBBox;\n    var leftBBox = distBBox(node, 0, m, toBBox);\n    var rightBBox = distBBox(node, M - m, M, toBBox);\n    var margin = bboxMargin(leftBBox) + bboxMargin(rightBBox);\n\n    for (var i = m; i < M - m; i++) {\n        var child = node.children[i];\n        extend(leftBBox, node.leaf ? toBBox(child) : child);\n        margin += bboxMargin(leftBBox);\n    }\n\n    for (var i$1 = M - m - 1; i$1 >= m; i$1--) {\n        var child$1 = node.children[i$1];\n        extend(rightBBox, node.leaf ? toBBox(child$1) : child$1);\n        margin += bboxMargin(rightBBox);\n    }\n\n
     return margin;\n};\n\nRBush.prototype._adjustParentBBoxes = function _adjustParentBBoxes (bbox, path, level) {\n    // adjust bboxes along the given tree path\n    for (var i = level; i >= 0; i--) {\n        extend(path[i], bbox);\n    }\n};\n\nRBush.prototype._condense = function _condense (path) {\n    // go through the path, removing empty nodes and updating bboxes\n    for (var i = path.length - 1, siblings = (void 0); i >= 0; i--) {\n        if (path[i].children.length === 0) {\n            if (i > 0) {\n                siblings = path[i - 1].children;\n                siblings.splice(siblings.indexOf(path[i]), 1);\n\n            } else { this.clear(); }\n\n        } else { calcBBox(path[i], this.toBBox); }\n    }\n};\n\nfunction findItem(item, items, equalsFn) {\n    if (!equalsFn) { return items.indexOf(item); }\n\n    for (var i = 0; i < items.length; i++) {\n        if (equalsFn(item, items[i])) { return i; }\n    }\n    return -1;\n}\n\n// calculate node's bbox from bb
 oxes of its children\nfunction calcBBox(node, toBBox) {\n    distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n    if (!destNode) { destNode = createNode(null); }\n    destNode.minX = Infinity;\n    destNode.minY = Infinity;\n    destNode.maxX = -Infinity;\n    destNode.maxY = -Infinity;\n\n    for (var i = k; i < p; i++) {\n        var child = node.children[i];\n        extend(destNode, node.leaf ? toBBox(child) : child);\n    }\n\n    return destNode;\n}\n\nfunction extend(a, b) {\n    a.minX = Math.min(a.minX, b.minX);\n    a.minY = Math.min(a.minY, b.minY);\n    a.maxX = Math.max(a.maxX, b.maxX);\n    a.maxY = Math.max(a.maxY, b.maxY);\n    return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bbo
 xMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n    var minX = Math.max(a.minX, b.minX);\n    var minY = Math.max(a.minY, b.minY);\n    var maxX = Math.min(a.maxX, b.maxX);\n    var maxY = Math.min(a.maxY, b.maxY);\n\n    return Math.max(0, maxX - minX) *\n           Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n    return a.minX <= b.minX &&\n           a.minY <= b.minY &&\n           b.maxX <= a.maxX &&\n           b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n    return b.minX <= a.maxX &&\n           b.minY <= a.maxY &&\n           b.maxX >= a.minX &&\n           b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n    return {\n        children: children,\n        height: 1,\n        leaf: true,\n        minX: Infinity,\n        minY: I
 nfinity,\n        maxX: -Infinity,\n        maxY: -Infinity\n    };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n    var stack = [left, right];\n\n    while (stack.length) {\n        right = stack.pop();\n        left = stack.pop();\n\n        if (right - left <= n) { continue; }\n\n        var mid = left + Math.ceil((right - left) / n / 2) * n;\n        quickselect(arr, mid, left, right, compare);\n\n        stack.push(left, mid, mid, right);\n    }\n}\n\nreturn RBush;\n\n}));\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n    this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n    this.pos = 0;\n    this.type = 0;\n    this.length = this.buf.length;\n}\n\nPbf.Varint  = 0; // varint: int32, int6
 4, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes   = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n    SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n    destroy: function() {\n        this.buf = null;\n    },\n\n    // === READING =================================================================\n\n    readFields: function(readField, result, end) {\n        end = end || this.length;\n\n        while (this.pos < end) {\n            var val = this.readVarint(),\n                tag = val 
 >> 3,\n                startPos = this.pos;\n\n            this.type = val & 0x7;\n            readField(tag, result, this);\n\n            if (this.pos === startPos) this.skip(val);\n        }\n        return result;\n    },\n\n    readMessage: function(readField, result) {\n        return this.readFields(readField, result, this.readVarint() + this.pos);\n    },\n\n    readFixed32: function() {\n        var val = readUInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    readSFixed32: function() {\n        var val = readInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n    readFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readSFixed64: function() {\n        var val = readUInt32(this.buf,
  this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readFloat: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n        this.pos += 4;\n        return val;\n    },\n\n    readDouble: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n        this.pos += 8;\n        return val;\n    },\n\n    readVarint: function(isSigned) {\n        var buf = this.buf,\n            val, b;\n\n        b = buf[this.pos++]; val  =  b & 0x7f;        if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 7;  if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n        b = buf[this.pos];   val |= (b & 0x0f) << 28;\n\n        return readVarintRemainder(val, isSigned, this);\n    },\n\n    readVarint64: function() { // for
  compatibility with v2.0.1\n        return this.readVarint(true);\n    },\n\n    readSVarint: function() {\n        var num = this.readVarint();\n        return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n    },\n\n    readBoolean: function() {\n        return Boolean(this.readVarint());\n    },\n\n    readString: function() {\n        var end = this.readVarint() + this.pos;\n        var pos = this.pos;\n        this.pos = end;\n\n        if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n            // longer strings are fast with the built-in browser TextDecoder API\n            return readUtf8TextDecoder(this.buf, pos, end);\n        }\n        // short strings are fast with our custom implementation\n        return readUtf8(this.buf, pos, end);\n    },\n\n    readBytes: function() {\n        var end = this.readVarint() + this.pos,\n            buffer = this.buf.subarray(this.pos, end);\n        this.pos = end;\n        return buffer;\n    },\n\n   
  // verbose for performance reasons; doesn't affect gzipped size\n\n    readPackedVarint: function(arr, isSigned) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readVarint(isSigned));\n        return arr;\n    },\n    readPackedSVarint: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSVarint());\n        return arr;\n    },\n    readPackedBoolean: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readBoolean());\n        return arr;\n    },\n    readPackedFloat: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push
 (this.readFloat());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFloat());\n        return arr;\n    },\n    readPackedDouble: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readDouble());\n        return arr;\n    },\n    readPackedFixed32: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed32());\n        return arr;\n    },\n    readPackedSFixed32: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed32());\n        return arr;\n    },\n    r
 eadPackedFixed64: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed64());\n        return arr;\n    },\n    readPackedSFixed64: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed64());\n        return arr;\n    },\n\n    skip: function(val) {\n        var type = val & 0x7;\n        if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n        else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n        else if (type === Pbf.Fixed32) this.pos += 4;\n        else if (type === Pbf.Fixed64) this.pos += 8;\n        else throw new Error('Unimplemented type: ' + type);\n    },\n\n    // === WRITING ==========================================
 =======================\n\n    writeTag: function(tag, type) {\n        this.writeVarint((tag << 3) | type);\n    },\n\n    realloc: function(min) {\n        var length = this.length || 16;\n\n        while (length < this.pos + min) length *= 2;\n\n        if (length !== this.length) {\n            var buf = new Uint8Array(length);\n            buf.set(this.buf);\n            this.buf = buf;\n            this.length = length;\n        }\n    },\n\n    finish: function() {\n        this.length = this.pos;\n        this.pos = 0;\n        return this.buf.subarray(0, this.length);\n    },\n\n    writeFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeSFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n       
  writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeSFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeVarint: function(val) {\n        val = +val || 0;\n\n        if (val > 0xfffffff || val < 0) {\n            writeBigVarint(val, this);\n            return;\n        }\n\n        this.realloc(4);\n\n        this.buf[this.pos++] =           val & 0x7f  | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] =   (val >>> 7) & 0x7f;\n    },\n\n    writeSVarint: function(val) {\n        this.writeVarint(val < 0 ? -val *
  2 - 1 : val * 2);\n    },\n\n    writeBoolean: function(val) {\n        this.writeVarint(Boolean(val));\n    },\n\n    writeString: function(str) {\n        str = String(str);\n        this.realloc(str.length * 4);\n\n        this.pos++; // reserve 1 byte for short string length\n\n        var startPos = this.pos;\n        // write the string directly to the buffer and see how much was written\n        this.pos = writeUtf8(this.buf, str, this.pos);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeFloat: function(val) {\n        this.realloc(4);\n        ieee754.write(this.buf, val, this.pos, true, 23, 4);\n        this.pos += 4;\n    },\n\n    writeDouble: function(val) {\n        this.realloc(8);\n        ieee754.w
 rite(this.buf, val, this.pos, true, 52, 8);\n        this.pos += 8;\n    },\n\n    writeBytes: function(buffer) {\n        var len = buffer.length;\n        this.writeVarint(len);\n        this.realloc(len);\n        for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n    },\n\n    writeRawMessage: function(fn, obj) {\n        this.pos++; // reserve 1 byte for short message length\n\n        // write the message directly to the buffer and see how much was written\n        var startPos = this.pos;\n        fn(obj, this);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeMessage: function(tag, fn, obj) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeRawMessage(fn, obj);\n    },\n\n    writePack
 edVarint:   function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr);   },\n    writePackedSVarint:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);  },\n    writePackedBoolean:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);  },\n    writePackedFloat:    function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr);    },\n    writePackedDouble:   function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr);   },\n    writePackedFixed32:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);  },\n    writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n    writePackedFixed64:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);  },\n    writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(ta
 g, writePackedSFixed64, arr); },\n\n    writeBytesField: function(tag, buffer) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeBytes(buffer);\n    },\n    writeFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFixed32(val);\n    },\n    writeSFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeSFixed32(val);\n    },\n    writeFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeFixed64(val);\n    },\n    writeSFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeSFixed64(val);\n    },\n    writeVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeVarint(val);\n    },\n    writeSVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeSVarint(val);\n    },\n    writeStringField: function(tag, str) {\n        this.writeTag
 (tag, Pbf.Bytes);\n        this.writeString(str);\n    },\n    writeFloatField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFloat(val);\n    },\n    writeDoubleField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeDouble(val);\n    },\n    writeBooleanField: function(tag, val) {\n        this.writeVarintField(tag, Boolean(val));\n    }\n};\n\nfunction readVarintRemainder(l, s, p) {\n    var buf = p.buf,\n        h, b;\n\n    b = buf[p.pos++]; h  = (b & 0x70) >> 4;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 3;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\
 n    throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n    return pbf.type === Pbf.Bytes ?\n        pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n    if (isSigned) {\n        return high * 0x100000000 + (low >>> 0);\n    }\n\n    return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n    var low, high;\n\n    if (val >= 0) {\n        low  = (val % 0x100000000) | 0;\n        high = (val / 0x100000000) | 0;\n    } else {\n        low  = ~(-val % 0x100000000);\n        high = ~(-val / 0x100000000);\n\n        if (low ^ 0xffffffff) {\n            low = (low + 1) | 0;\n        } else {\n            low = 0;\n            high = (high + 1) | 0;\n        }\n    }\n\n    if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n        throw new Error('Given varint doesn\\'t fit into 10 bytes');\n    }\n\n    pbf.realloc(10);\n\n    writeBigVarintLow(low, high,
  pbf);\n    writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos]   = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n    var lsb = (high & 0x07) << 4;\n\n    pbf.buf[pbf.pos++] |= lsb         | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n    var extr
 aLen =\n        len <= 0x3fff ? 1 :\n        len <= 0x1fffff ? 2 :\n        len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n    // if 1 byte isn't enough for encoding message length, shift the data to the right\n    pbf.realloc(extraLen);\n    for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);   }\nfunction writePackedSVarint(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);  }\nfunction writePackedFloat(arr, pbf)    { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);    }\nfunction writePackedDouble(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);   }\nfunction writePackedBoolean(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);  }\nfunction writePackedFixed32(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);
   }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);  }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n    buf[pos] = val;\n    buf[pos + 1] = (val >>> 8);\n    buf[pos + 2] = (val >>> 16);\n    buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n    var str = '';\n    var i = pos;\n\n    while (i < end) {\n    
     var b0 = buf[i];\n        var c = null; // codepoint\n        var bytesPerSequence =\n            b0 > 0xEF ? 4 :\n            b0 > 0xDF ? 3 :\n            b0 > 0xBF ? 2 : 1;\n\n        if (i + bytesPerSequence > end) break;\n\n        var b1, b2, b3;\n\n        if (bytesPerSequence === 1) {\n            if (b0 < 0x80) {\n                c = b0;\n            }\n        } else if (bytesPerSequence === 2) {\n            b1 = buf[i + 1];\n            if ((b1 & 0xC0) === 0x80) {\n                c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n                if (c <= 0x7F) {\n                    c = null;\n                }\n            }\n        } else if (bytesPerSequence === 3) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n                if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n                    c = null;\n              
   }\n            }\n        } else if (bytesPerSequence === 4) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            b3 = buf[i + 3];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n                if (c <= 0xFFFF || c >= 0x110000) {\n                    c = null;\n                }\n            }\n        }\n\n        if (c === null) {\n            c = 0xFFFD;\n            bytesPerSequence = 1;\n\n        } else if (c > 0xFFFF) {\n            c -= 0x10000;\n            str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n            c = 0xDC00 | c & 0x3FF;\n        }\n\n        str += String.fromCharCode(c);\n        i += bytesPerSequence;\n    }\n\n    return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n    return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n    
 for (var i = 0, c, lead; i < str.length; i++) {\n        c = str.charCodeAt(i); // code point\n\n        if (c > 0xD7FF && c < 0xE000) {\n            if (lead) {\n                if (c < 0xDC00) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                    lead = c;\n                    continue;\n                } else {\n                    c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n                    lead = null;\n                }\n            } else {\n                if (c > 0xDBFF || (i + 1 === str.length)) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                } else {\n                    lead = c;\n                }\n                continue;\n            }\n        } else if (lead) {\n            buf[pos++] = 0xEF;\n            buf[pos++] = 0xBF;\n            buf[pos++] = 0xBD;\n            lead = null;
 \n        }\n\n        if (c < 0x80) {\n            buf[pos++] = c;\n        } else {\n            if (c < 0x800) {\n                buf[pos++] = c >> 0x6 | 0xC0;\n            } else {\n                if (c < 0x10000) {\n                    buf[pos++] = c >> 0xC | 0xE0;\n                } else {\n                    buf[pos++] = c >> 0x12 | 0xF0;\n                    buf[pos++] = c >> 0xC & 0x3F | 0x80;\n                }\n                buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n            }\n            buf[pos++] = c & 0x3F | 0x80;\n        }\n    }\n    return pos;\n}\n","var fontWeights = {\n  thin: 100,\n  hairline: 100,\n  'ultra-light': 100,\n  'extra-light': 100,\n  light: 200,\n  book: 300,\n  regular: 400,\n  normal: 400,\n  plain: 400,\n  roman: 400,\n  standard: 400,\n  medium: 500,\n  'semi-bold': 600,\n  'demi-bold': 600,\n  bold: 700,\n  heavy: 800,\n  black: 800,\n  'extra-bold': 800,\n  'ultra-black': 900,\n  'extra-black': 900,\n  'ultra-bold': 900,\n  'heavy-black'
 : 900,\n  fat: 900,\n  poster: 900\n};\nvar sp = ' ';\nvar italicRE = /(italic|oblique)$/i;\n\nvar fontCache = {};\n\nmodule.exports = function(fonts, size, lineHeight) {\n  var cssData = fontCache[fonts];\n  if (!cssData) {\n    if (!Array.isArray(fonts)) {\n      fonts = [fonts];\n    }\n    var weight = 400;\n    var style = 'normal';\n    var fontFamilies = [];\n    var haveWeight, haveStyle;\n    for (var i = 0, ii = fonts.length; i < ii; ++i) {\n      var font = fonts[i];\n      var parts = font.split(' ');\n      var maybeWeight = parts[parts.length - 1].toLowerCase();\n      if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n        style = haveStyle ? style : maybeWeight;\n        parts.pop();\n        maybeWeight = parts[parts.length - 1].toLowerCase();\n      } else if (italicRE.test(maybeWeight)) {\n        maybeWeight = maybeWeight.replace(italicRE, '');\n        style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight,
  '');\n      }\n      for (var w in fontWeights) {\n        if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', sp)) {\n          weight = haveWeight ? weight : fontWeights[w];\n          parts.pop();\n          break;\n        }\n      }\n      if (!haveWeight && typeof maybeWeight == 'number') {\n        weight = maybeWeight;\n      }\n      var fontFamily = parts.join(sp)\n        .replace('Klokantech Noto Sans', 'Noto Sans');\n      if (fontFamily.indexOf(sp) !== -1) {\n        fontFamily = '\"' + fontFamily + '\"';\n      }\n      fontFamilies.push(fontFamily);\n    }\n    // CSS font property: font-style font-weight font-size/line-height font-family\n    cssData = fontCache[fonts] = [style, weight, fontFamilies];\n  }\n  return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];\n};\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8
 ) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (
 nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLe
 n -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","// Generated by CoffeeScript 1.10.0\n(function() {\n  var families;\n\n  module.exports = {\n    icon: 'icons/google.svg',\n    name: 'google',\n    title: 'Google Fonts',\n    link: 'google.com/fonts',\n    getNames: function() {\n      return families;\n    },\n    getLink: function(name) {\n      return \"https://fonts.google.com/specimen/\" + (name.replace(/( )/g, '+'));\n    },\n    normalizeName: function(name) {\n      return
  name;\n    }\n  };\n\n  families = [\"ABeeZee\", \"Abel\", \"Abril Fatface\", \"Aclonica\", \"Acme\", \"Actor\", \"Adamina\", \"Advent Pro\", \"Aguafina Script\", \"Akronim\", \"Aladin\", \"Aldrich\", \"Alef\", \"Alegreya\", \"Alegreya SC\", \"Alegreya Sans\", \"Alegreya Sans SC\", \"Alex Brush\", \"Alfa Slab One\", \"Alice\", \"Alike\", \"Alike Angular\", \"Allan\", \"Allerta\", \"Allerta Stencil\", \"Allura\", \"Almendra\", \"Almendra Display\", \"Almendra SC\", \"Amarante\", \"Amaranth\", \"Amatic SC\", \"Amethysta\", \"Amiri\", \"Amita\", \"Anaheim\", \"Andada\", \"Andika\", \"Angkor\", \"Annie Use Your Telescope\", \"Anonymous Pro\", \"Antic\", \"Antic Didone\", \"Antic Slab\", \"Anton\", \"Arapey\", \"Arbutus\", \"Arbutus Slab\", \"Architects Daughter\", \"Archivo Black\", \"Archivo Narrow\", \"Arimo\", \"Arizonia\", \"Armata\", \"Artifika\", \"Arvo\", \"Arya\", \"Asap\", \"Asar\", \"Asset\", \"Astloch\", \"Asul\", \"Atomic Age\", \"Aubrey\", \"Audiowide\", \"Autour One\", \"
 Average\", \"Average Sans\", \"Averia Gruesa Libre\", \"Averia Libre\", \"Averia Sans Libre\", \"Averia Serif Libre\", \"Bad Script\", \"Balthazar\", \"Bangers\", \"Basic\", \"Battambang\", \"Baumans\", \"Bayon\", \"Belgrano\", \"Belleza\", \"BenchNine\", \"Bentham\", \"Berkshire Swash\", \"Bevan\", \"Bigelow Rules\", \"Bigshot One\", \"Bilbo\", \"Bilbo Swash Caps\", \"Biryani\", \"Bitter\", \"Black Ops One\", \"Bokor\", \"Bonbon\", \"Boogaloo\", \"Bowlby One\", \"Bowlby One SC\", \"Brawler\", \"Bree Serif\", \"Bubblegum Sans\", \"Bubbler One\", \"Buda\", \"Buenard\", \"Butcherman\", \"Butterfly Kids\", \"Cabin\", \"Cabin Condensed\", \"Cabin Sketch\", \"Caesar Dressing\", \"Cagliostro\", \"Calligraffitti\", \"Cambay\", \"Cambo\", \"Candal\", \"Cantarell\", \"Cantata One\", \"Cantora One\", \"Capriola\", \"Cardo\", \"Carme\", \"Carrois Gothic\", \"Carrois Gothic SC\", \"Carter One\", \"Catamaran\", \"Caudex\", \"Caveat\", \"Caveat Brush\", \"Cedarville Cursive\", \"Ceviche One\", \"
 Changa One\", \"Chango\", \"Chau Philomene One\", \"Chela One\", \"Chelsea Market\", \"Chenla\", \"Cherry Cream Soda\", \"Cherry Swash\", \"Chewy\", \"Chicle\", \"Chivo\", \"Chonburi\", \"Cinzel\", \"Cinzel Decorative\", \"Clicker Script\", \"Coda\", \"Coda Caption\", \"Codystar\", \"Combo\", \"Comfortaa\", \"Coming Soon\", \"Concert One\", \"Condiment\", \"Content\", \"Contrail One\", \"Convergence\", \"Cookie\", \"Copse\", \"Corben\", \"Courgette\", \"Cousine\", \"Coustard\", \"Covered By Your Grace\", \"Crafty Girls\", \"Creepster\", \"Crete Round\", \"Crimson Text\", \"Croissant One\", \"Crushed\", \"Cuprum\", \"Cutive\", \"Cutive Mono\", \"Damion\", \"Dancing Script\", \"Dangrek\", \"Dawning of a New Day\", \"Days One\", \"Dekko\", \"Delius\", \"Delius Swash Caps\", \"Delius Unicase\", \"Della Respira\", \"Denk One\", \"Devonshire\", \"Dhurjati\", \"Didact Gothic\", \"Diplomata\", \"Diplomata SC\", \"Domine\", \"Donegal One\", \"Doppio One\", \"Dorsa\", \"Dosis\", \"Dr Sugiyama
 \", \"Droid Sans\", \"Droid Sans Mono\", \"Droid Serif\", \"Duru Sans\", \"Dynalight\", \"EB Garamond\", \"Eagle Lake\", \"Eater\", \"Economica\", \"Eczar\", \"Ek Mukta\", \"Electrolize\", \"Elsie\", \"Elsie Swash Caps\", \"Emblema One\", \"Emilys Candy\", \"Engagement\", \"Englebert\", \"Enriqueta\", \"Erica One\", \"Esteban\", \"Euphoria Script\", \"Ewert\", \"Exo\", \"Exo 2\", \"Expletus Sans\", \"Fanwood Text\", \"Fascinate\", \"Fascinate Inline\", \"Faster One\", \"Fasthand\", \"Fauna One\", \"Federant\", \"Federo\", \"Felipa\", \"Fenix\", \"Finger Paint\", \"Fira Mono\", \"Fira Sans\", \"Fjalla One\", \"Fjord One\", \"Flamenco\", \"Flavors\", \"Fondamento\", \"Fontdiner Swanky\", \"Forum\", \"Francois One\", \"Freckle Face\", \"Fredericka the Great\", \"Fredoka One\", \"Freehand\", \"Fresca\", \"Frijole\", \"Fruktur\", \"Fugaz One\", \"GFS Didot\", \"GFS Neohellenic\", \"Gabriela\", \"Gafata\", \"Galdeano\", \"Galindo\", \"Gentium Basic\", \"Gentium Book Basic\", \"Geo\", \"Ge
 ostar\", \"Geostar Fill\", \"Germania One\", \"Gidugu\", \"Gilda Display\", \"Give You Glory\", \"Glass Antiqua\", \"Glegoo\", \"Gloria Hallelujah\", \"Goblin One\", \"Gochi Hand\", \"Gorditas\", \"Goudy Bookletter 1911\", \"Graduate\", \"Grand Hotel\", \"Gravitas One\", \"Great Vibes\", \"Griffy\", \"Gruppo\", \"Gudea\", \"Gurajada\", \"Habibi\", \"Halant\", \"Hammersmith One\", \"Hanalei\", \"Hanalei Fill\", \"Handlee\", \"Hanuman\", \"Happy Monkey\", \"Headland One\", \"Henny Penny\", \"Herr Von Muellerhoff\", \"Hind\", \"Hind Siliguri\", \"Hind Vadodara\", \"Holtwood One SC\", \"Homemade Apple\", \"Homenaje\", \"IM Fell DW Pica\", \"IM Fell DW Pica SC\", \"IM Fell Double Pica\", \"IM Fell Double Pica SC\", \"IM Fell English\", \"IM Fell English SC\", \"IM Fell French Canon\", \"IM Fell French Canon SC\", \"IM Fell Great Primer\", \"IM Fell Great Primer SC\", \"Iceberg\", \"Iceland\", \"Imprima\", \"Inconsolata\", \"Inder\", \"Indie Flower\", \"Inika\", \"Inknut Antiqua\", \"Iris
 h Grover\", \"Istok Web\", \"Italiana\", \"Italianno\", \"Itim\", \"Jacques Francois\", \"Jacques Francois Shadow\", \"Jaldi\", \"Jim Nightshade\", \"Jockey One\", \"Jolly Lodger\", \"Josefin Sans\", \"Josefin Slab\", \"Joti One\", \"Judson\", \"Julee\", \"Julius Sans One\", \"Junge\", \"Jura\", \"Just Another Hand\", \"Just Me Again Down Here\", \"Kadwa\", \"Kalam\", \"Kameron\", \"Kantumruy\", \"Karla\", \"Karma\", \"Kaushan Script\", \"Kavoon\", \"Kdam Thmor\", \"Keania One\", \"Kelly Slab\", \"Kenia\", \"Khand\", \"Khmer\", \"Khula\", \"Kite One\", \"Knewave\", \"Kotta One\", \"Koulen\", \"Kranky\", \"Kreon\", \"Kristi\", \"Krona One\", \"Kurale\", \"La Belle Aurore\", \"Laila\", \"Lakki Reddy\", \"Lancelot\", \"Lateef\", \"Lato\", \"League Script\", \"Leckerli One\", \"Ledger\", \"Lekton\", \"Lemon\", \"Libre Baskerville\", \"Life Savers\", \"Lilita One\", \"Lily Script One\", \"Limelight\", \"Linden Hill\", \"Lobster\", \"Lobster Two\", \"Londrina Outline\", \"Londrina Shadow\
 ", \"Londrina Sketch\", \"Londrina Solid\", \"Lora\", \"Love Ya Like A Sister\", \"Loved by the King\", \"Lovers Quarrel\", \"Luckiest Guy\", \"Lusitana\", \"Lustria\", \"Macondo\", \"Macondo Swash Caps\", \"Magra\", \"Maiden Orange\", \"Mako\", \"Mallanna\", \"Mandali\", \"Marcellus\", \"Marcellus SC\", \"Marck Script\", \"Margarine\", \"Marko One\", \"Marmelad\", \"Martel\", \"Martel Sans\", \"Marvel\", \"Mate\", \"Mate SC\", \"Maven Pro\", \"McLaren\", \"Meddon\", \"MedievalSharp\", \"Medula One\", \"Megrim\", \"Meie Script\", \"Merienda\", \"Merienda One\", \"Merriweather\", \"Merriweather Sans\", \"Metal\", \"Metal Mania\", \"Metamorphous\", \"Metrophobic\", \"Michroma\", \"Milonga\", \"Miltonian\", \"Miltonian Tattoo\", \"Miniver\", \"Miss Fajardose\", \"Modak\", \"Modern Antiqua\", \"Molengo\", \"Molle\", \"Monda\", \"Monofett\", \"Monoton\", \"Monsieur La Doulaise\", \"Montaga\", \"Montez\", \"Montserrat\", \"Montserrat Alternates\", \"Montserrat Subrayada\", \"Moul\", \"Mou
 lpali\", \"Mountains of Christmas\", \"Mouse Memoirs\", \"Mr Bedfort\", \"Mr Dafoe\", \"Mr De Haviland\", \"Mrs Saint Delafield\", \"Mrs Sheppards\", \"Muli\", \"Mystery Quest\", \"NTR\", \"Neucha\", \"Neuton\", \"New Rocker\", \"News Cycle\", \"Niconne\", \"Nixie One\", \"Nobile\", \"Nokora\", \"Norican\", \"Nosifer\", \"Nothing You Could Do\", \"Noticia Text\", \"Noto Sans\", \"Noto Serif\", \"Nova Cut\", \"Nova Flat\", \"Nova Mono\", \"Nova Oval\", \"Nova Round\", \"Nova Script\", \"Nova Slim\", \"Nova Square\", \"Numans\", \"Nunito\", \"Odor Mean Chey\", \"Offside\", \"Old Standard TT\", \"Oldenburg\", \"Oleo Script\", \"Oleo Script Swash Caps\", \"Open Sans\", \"Open Sans Condensed\", \"Oranienbaum\", \"Orbitron\", \"Oregano\", \"Orienta\", \"Original Surfer\", \"Oswald\", \"Over the Rainbow\", \"Overlock\", \"Overlock SC\", \"Ovo\", \"Oxygen\", \"Oxygen Mono\", \"PT Mono\", \"PT Sans\", \"PT Sans Caption\", \"PT Sans Narrow\", \"PT Serif\", \"PT Serif Caption\", \"Pacifico\", 
 \"Palanquin\", \"Palanquin Dark\", \"Paprika\", \"Parisienne\", \"Passero One\", \"Passion One\", \"Pathway Gothic One\", \"Patrick Hand\", \"Patrick Hand SC\", \"Patua One\", \"Paytone One\", \"Peddana\", \"Peralta\", \"Permanent Marker\", \"Petit Formal Script\", \"Petrona\", \"Philosopher\", \"Piedra\", \"Pinyon Script\", \"Pirata One\", \"Plaster\", \"Play\", \"Playball\", \"Playfair Display\", \"Playfair Display SC\", \"Podkova\", \"Poiret One\", \"Poller One\", \"Poly\", \"Pompiere\", \"Pontano Sans\", \"Poppins\", \"Port Lligat Sans\", \"Port Lligat Slab\", \"Pragati Narrow\", \"Prata\", \"Preahvihear\", \"Press Start 2P\", \"Princess Sofia\", \"Prociono\", \"Prosto One\", \"Puritan\", \"Purple Purse\", \"Quando\", \"Quantico\", \"Quattrocento\", \"Quattrocento Sans\", \"Questrial\", \"Quicksand\", \"Quintessential\", \"Qwigley\", \"Racing Sans One\", \"Radley\", \"Rajdhani\", \"Raleway\", \"Raleway Dots\", \"Ramabhadra\", \"Ramaraja\", \"Rambla\", \"Rammetto One\", \"Rancher
 s\", \"Rancho\", \"Ranga\", \"Rationale\", \"Ravi Prakash\", \"Redressed\", \"Reenie Beanie\", \"Revalia\", \"Rhodium Libre\", \"Ribeye\", \"Ribeye Marrow\", \"Righteous\", \"Risque\", \"Roboto\", \"Roboto Condensed\", \"Roboto Mono\", \"Roboto Slab\", \"Rochester\", \"Rock Salt\", \"Rokkitt\", \"Romanesco\", \"Ropa Sans\", \"Rosario\", \"Rosarivo\", \"Rouge Script\", \"Rozha One\", \"Rubik\", \"Rubik Mono One\", \"Rubik One\", \"Ruda\", \"Rufina\", \"Ruge Boogie\", \"Ruluko\", \"Rum Raisin\", \"Ruslan Display\", \"Russo One\", \"Ruthie\", \"Rye\", \"Sacramento\", \"Sahitya\", \"Sail\", \"Salsa\", \"Sanchez\", \"Sancreek\", \"Sansita One\", \"Sarala\", \"Sarina\", \"Sarpanch\", \"Satisfy\", \"Scada\", \"Scheherazade\", \"Schoolbell\", \"Seaweed Script\", \"Sevillana\", \"Seymour One\", \"Shadows Into Light\", \"Shadows Into Light Two\", \"Shanti\", \"Share\", \"Share Tech\", \"Share Tech Mono\", \"Shojumaru\", \"Short Stack\", \"Siemreap\", \"Sigmar One\", \"Signika\", \"Signika Neg
 ative\", \"Simonetta\", \"Sintony\", \"Sirin Stencil\", \"Six Caps\", \"Skranji\", \"Slabo 13px\", \"Slabo 27px\", \"Slackey\", \"Smokum\", \"Smythe\", \"Sniglet\", \"Snippet\", \"Snowburst One\", \"Sofadi One\", \"Sofia\", \"Sonsie One\", \"Sorts Mill Goudy\", \"Source Code Pro\", \"Source Sans Pro\", \"Source Serif Pro\", \"Special Elite\", \"Spicy Rice\", \"Spinnaker\", \"Spirax\", \"Squada One\", \"Sree Krushnadevaraya\", \"Stalemate\", \"Stalinist One\", \"Stardos Stencil\", \"Stint Ultra Condensed\", \"Stint Ultra Expanded\", \"Stoke\", \"Strait\", \"Sue Ellen Francisco\", \"Sumana\", \"Sunshiney\", \"Supermercado One\", \"Sura\", \"Suranna\", \"Suravaram\", \"Suwannaphum\", \"Swanky and Moo Moo\", \"Syncopate\", \"Tangerine\", \"Taprom\", \"Tauri\", \"Teko\", \"Telex\", \"Tenali Ramakrishna\", \"Tenor Sans\", \"Text Me One\", \"The Girl Next Door\", \"Tienne\", \"Tillana\", \"Timmana\", \"Tinos\", \"Titan One\", \"Titillium Web\", \"Trade Winds\", \"Trocchi\", \"Trochut\", \"
 Trykker\", \"Tulpen One\", \"Ubuntu\", \"Ubuntu Condensed\", \"Ubuntu Mono\", \"Ultra\", \"Uncial Antiqua\", \"Underdog\", \"Unica One\", \"UnifrakturCook\", \"UnifrakturMaguntia\", \"Unkempt\", \"Unlock\", \"Unna\", \"VT323\", \"Vampiro One\", \"Varela\", \"Varela Round\", \"Vast Shadow\", \"Vesper Libre\", \"Vibur\", \"Vidaloka\", \"Viga\", \"Voces\", \"Volkhov\", \"Vollkorn\", \"Voltaire\", \"Waiting for the Sunrise\", \"Wallpoet\", \"Walter Turncoat\", \"Warnes\", \"Wellfleet\", \"Wendy One\", \"Wire One\", \"Work Sans\", \"Yanone Kaffeesatz\", \"Yantramanav\", \"Yellowtail\", \"Yeseva One\", \"Yesteryear\", \"Zeyada\"];\n\n}).call(this);\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = Slo
 wBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is 
 slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return 
 an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof e
 ncodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeE
 rror\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assert
 Size(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.all
 ocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.lengt
 h < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fall
 back: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  /
 / length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n 
  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nf
 unction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return
  utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  /
 / Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buf
 fer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(t
 his, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefin
 ed) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) 
 return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN,
  \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'func
 tion') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16
 BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexO
 f (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8T
 oBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } el
 se if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'a
 scii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end
 ))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte &
  0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance
  only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_A
 RGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  v
 ar len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.
 prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) chec
 kOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.le
 ngth)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert)
  checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offs
 et, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = fu
 nction writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIn
 t8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writ
 eUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offs
 et] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (va
 lue < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = M
 ath.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  v
 alue = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offs
 et + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = 
 function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeErr
 or('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n
   // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = 
 end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\
 n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      /
 / 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) 
 {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < le
 ngth; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n
   // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var l
 en = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[
 num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n  
     lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","/**\n * @module ol/util\n */\n/**\n * @return {?} Any return.\n */\nexport function abstract() {\n    return /** @type {?} */ ((function () {\n        throw new Error('Unimplemented abstract method.');\n    })());\n}\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapt
 ed from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n    return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '6.4.0';\n//# sourceMappingURL=util.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/AssertionE
 rror\n */\nimport { VERSION } from './util.js';\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nvar AssertionError = /** @class */ (function (_super) {\n    __extends(AssertionError, _super);\n    /**\n     * @param {number} code Error code.\n     */\n    function AssertionError(code) {\n        var _this = this;\n        var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n        var message = 'Assertion failed. See https://openlayers.org/en/' +\n            path +\n            '/doc/errors/#' +\n            code +\n            ' for details.';\n        _this = _super.call(this, message) || this;\n        /**\n         * Error code. The meaning of the code can be found on\n         * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n         * the version found in the Ope
 nLayers script's header comment if a version\n         * other than the latest is used).\n         * @type {number}\n         * @api\n         */\n        _this.code = code;\n        /**\n         * @type {string}\n         */\n        _this.name = 'AssertionError';\n        // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n        _this.message = message;\n        return _this;\n    }\n    return AssertionError;\n}(Error));\nexport default AssertionError;\n//# sourceMappingURL=AssertionError.js.map","/**\n * @module ol/events/Event\n */\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target
 ~Target}.\n */\nvar BaseEvent = /** @class */ (function () {\n    /**\n     * @param {string} type Type.\n     */\n    function BaseEvent(type) {\n        /**\n         * @type {boolean}\n         */\n        this.propagationStopped;\n        /**\n         * The event type.\n         * @type {string}\n         * @api\n         */\n        this.type = type;\n        /**\n         * The event target.\n         * @type {Object}\n         * @api\n         */\n        this.target = null;\n    }\n    /**\n     * Stop event propagation.\n     * @api\n     */\n    BaseEvent.prototype.preventDefault = function () {\n        this.propagationStopped = true;\n    };\n    /**\n     * Stop event propagation.\n     * @api\n     */\n    BaseEvent.prototype.stopPropagation = function () {\n        this.propagationStopped = true;\n    };\n    return BaseEvent;\n}());\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n    evt.stopPropagation(
 );\n}\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n    evt.preventDefault();\n}\nexport default BaseEvent;\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/ObjectEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a property is changed.\n     * @event module:ol/Object.ObjectEvent#propertychange\n     * @api\n     */\n    PROPERTYCHANGE: 'propertychange',\n};\n//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/Disposable\n */\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = /** @class */ (function () {\n    function Disposable() {\n        /**\n         * The object has already been disposed.\n         * @type {boolean}\n         * @protected\n         */\n        this.disposed = false;\n    }\n    /**\n     * Clean up.\n     */\n    Disposable.prototype.dispose = function () {\n        if (!this.disposed) {\n   
          this.disposed = true;\n            this.disposeInternal();\n        }\n    };\n    /**\n     * Extension point for disposable objects.\n     * @protected\n     */\n    Disposable.prototype.disposeInternal = function () { };\n    return Disposable;\n}());\nexport default Disposable;\n//# sourceMappingURL=Disposable.js.map","/**\n * @module ol/array\n */\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function=} opt_comparator Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, opt_comparator) {\n    var mid, cmp;\n    var comparator = opt_comparator || numberSafeCompareFunction;\n    var low = 0;\n    var high = haystack.length;\n    v
 ar found = false;\n    while (low < high) {\n        /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n         * to double (which gives the wrong results). */\n        mid = low + ((high - low) >> 1);\n        cmp = +comparator(haystack[mid], needle);\n        if (cmp < 0.0) {\n            /* Too low. */\n            low = mid + 1;\n        }\n        else {\n            /* Key found or too high */\n            high = mid;\n            found = !cmp;\n        }\n    }\n    /* Key not found. */\n    return found ? low : ~low;\n}\n/**\n * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n *     argument is less than, equal to, or greater than the second.\n */\nexport function numberSafeCompareFunction(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0;\n}\n/**\n * Whether the
  array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nexport function includes(arr, obj) {\n    return arr.indexOf(obj) >= 0;\n}\n/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n *    means return the largest nearest, < 0 means return the\n *    smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n    var n = arr.length;\n    if (arr[0] <= target) {\n        return 0;\n    }\n    else if (target <= arr[n - 1]) {\n        return n - 1;\n    }\n    else {\n        var i = void 0;\n        if (direction > 0) {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] < target) {\n                    return i - 1;\n                }\n            }\n        }\n        el
 se if (direction < 0) {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] <= target) {\n                    return i;\n                }\n            }\n        }\n        else {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] == target) {\n                    return i;\n                }\n                else if (arr[i] < target) {\n                    if (arr[i - 1] - target < target - arr[i]) {\n                        return i - 1;\n                    }\n                    else {\n                        return i;\n                    }\n                }\n            }\n        }\n        return n - 1;\n    }\n}\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n    while (begin < end) {\n        var tmp = arr[begin];\n        arr[begin] = arr[end];\n        arr[end] = tmp;\n        ++begin;\n        --end;\n    }\n}\n/**\n
  * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n    var extension = Array.isArray(data) ? data : [data];\n    var length = extension.length;\n    for (var i = 0; i < length; i++) {\n        arr[arr.length] = extension[i];\n    }\n}\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n    var i = arr.indexOf(obj);\n    var found = i > -1;\n    if (found) {\n        arr.splice(i, 1);\n    }\n    return found;\n}\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n    var length = 
 arr.length >>> 0;\n    var value;\n    for (var i = 0; i < length; i++) {\n        value = arr[i];\n        if (func(value, i, arr)) {\n            return value;\n        }\n    }\n    return null;\n}\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n    var len1 = arr1.length;\n    if (len1 !== arr2.length) {\n        return false;\n    }\n    for (var i = 0; i < len1; i++) {\n        if (arr1[i] !== arr2[i]) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\
 nexport function stableSort(arr, compareFnc) {\n    var length = arr.length;\n    var tmp = Array(arr.length);\n    var i;\n    for (i = 0; i < length; i++) {\n        tmp[i] = { index: i, value: arr[i] };\n    }\n    tmp.sort(function (a, b) {\n        return compareFnc(a.value, b.value) || a.index - b.index;\n    });\n    for (i = 0; i < arr.length; i++) {\n        arr[i] = tmp[i].value;\n    }\n}\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findIndex(arr, func) {\n    var index;\n    var found = !arr.every(function (el, idx) {\n        index = idx;\n        return !func(el, idx, arr);\n    });\n    return found ? index : -1;\n}\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function=} opt_func Comparison function.\n * @param {boolean=} opt_strict Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, op
 t_func, opt_strict) {\n    var compare = opt_func || numberSafeCompareFunction;\n    return arr.every(function (currentVal, index) {\n        if (index === 0) {\n            return true;\n        }\n        var res = compare(arr[index - 1], currentVal);\n        return !(res > 0 || (opt_strict && res === 0));\n    });\n}\n//# sourceMappingURL=array.js.map","/**\n * @module ol/functions\n */\nimport { equals as arrayEquals } from './array.js';\n/**\n * Always returns true.\n * @returns {boolean} true.\n */\nexport function TRUE() {\n    return true;\n}\n/**\n * Always returns false.\n * @returns {boolean} false.\n */\nexport function FALSE() {\n    return false;\n}\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() { }\n/**\n * Wrap a function in another function that remembers the last return.  If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it wi
 ll return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n    var called = false;\n    /** @type {ReturnType} */\n    var lastResult;\n    /** @type {Array<any>} */\n    var lastArgs;\n    var lastThis;\n    return function () {\n        var nextArgs = Array.prototype.slice.call(arguments);\n        if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n            called = true;\n            lastThis = this;\n            lastArgs = nextArgs;\n            lastResult = fn.apply(this, arguments);\n        }\n        return lastResult;\n    };\n}\n//# sourceMappingURL=functions.js.map","/**\n * @module ol/obj\n */\n/**\n * Polyfill for Object.assign().  Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://dev
 eloper.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport var assign = typeof Object.assign === 'function'\n    ? Object.assign\n    : function (target, var_sources) {\n        if (target === undefined || target === null) {\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n        var output = Object(target);\n        for (var i = 1, ii = arguments.length; i < ii; ++i) {\n            var source = arguments[i];\n            if (source !== undefined && source !== null) {\n                for (var key in source) {\n                    if (source.hasOwnProperty(key)) {\n                        output[key] = source[key];\n                    }\n                }\n            }\n        }\n        return output;\n    };\n/**\n * Removes all properties from
  an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n    for (var property in object) {\n        delete object[property];\n    }\n}\n/**\n * Polyfill for Object.values().  Get an array of property values from an object.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n *\n * @param {!Object<K,V>} object The object from which to get the values.\n * @return {!Array<V>} The property values.\n * @template K,V\n */\nexport var getValues = typeof Object.values === 'function'\n    ? Object.values\n    : function (object) {\n        var values = [];\n        for (var property in object) {\n            values.push(object[property]);\n        }\n        return values;\n    };\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n    var property;\n    for (property 
 in object) {\n        return false;\n    }\n    return !property;\n}\n//# sourceMappingURL=obj.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport { VOID } from '../functions.js';\nimport { clear } from '../obj.js';\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n/**\n * @classdesc\n * A simplified imple
 mentation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n *    `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n *    There is no event target hierarchy. When a listener calls\n *    `stopPropagation` or `preventDefault` on an event object, it means that no\n *    more listeners after this one will be called. Same as when the listener\n *    returns false.\n */\nvar Target = /** @class */ (function (_super) {\n    __extends(Target, _super);\n    /**\n     * @param {*=} opt_target Default event target for dispatched events.\n     */\n    function Target(opt_target) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n        
  * @type {*}\n         */\n        _this.eventTarget_ = opt_target;\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.pendingRemovals_ = null;\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.dispatching_ = null;\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").Listener>>}\n         */\n        _this.listeners_ = null;\n        return _this;\n    }\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../events.js\").Listener} listener Listener.\n     */\n    Target.prototype.addEventListener = function (type, listener) {\n        if (!type || !listener) {\n            return;\n        }\n        var listeners = this.listeners_ || (this.listeners_ = {});\n        var listenersForType = listeners[type] || (listeners[type] = []);\n        if (listenersForType.indexOf(listener) === -1) {\n            listenersFor
 Type.push(listener);\n        }\n    };\n    /**\n     * Dispatches an event and calls all listeners listening for events\n     * of this type. The event parameter can either be a string or an\n     * Object with a `type` property.\n     *\n     * @param {import(\"./Event.js\").default|string} event Event object.\n     * @return {boolean|undefined} `false` if anyone called preventDefault on the\n     *     event object or if any of the listeners returned false.\n     * @api\n     */\n    Target.prototype.dispatchEvent = function (event) {\n        /** @type {import(\"./Event.js\").default|Event} */\n        var evt = typeof event === 'string' ? new Event(event) : event;\n        var type = evt.type;\n        if (!evt.target) {\n            evt.target = this.eventTarget_ || this;\n        }\n        var listeners = this.listeners_ && this.listeners_[type];\n        var propagate;\n        if (listeners) {\n            var dispatching = this.dispatching_ || (this.dispatching_ = {});\n
             var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {});\n            if (!(type in dispatching)) {\n                dispatching[type] = 0;\n                pendingRemovals[type] = 0;\n            }\n            ++dispatching[type];\n            for (var i = 0, ii = listeners.length; i < ii; ++i) {\n                if ('handleEvent' in listeners[i]) {\n                    propagate = /** @type {import(\"../events.js\").ListenerObject} */ (listeners[i]).handleEvent(evt);\n                }\n                else {\n                    propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (listeners[i]).call(this, evt);\n                }\n                if (propagate === false || evt.propagationStopped) {\n                    propagate = false;\n                    break;\n                }\n            }\n            --dispatching[type];\n            if (dispatching[type] === 0) {\n                var pr = pendingRemovals[type];\n      
           delete pendingRemovals[type];\n                while (pr--) {\n                    this.removeEventListener(type, VOID);\n                }\n                delete dispatching[type];\n            }\n            return propagate;\n        }\n    };\n    /**\n     * Clean up.\n     */\n    Target.prototype.disposeInternal = function () {\n        this.listeners_ && clear(this.listeners_);\n    };\n    /**\n     * Get the listeners for a specified event type. Listeners are returned in the\n     * order that they will be called in.\n     *\n     * @param {string} type Type.\n     * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n     */\n    Target.prototype.getListeners = function (type) {\n        return (this.listeners_ && this.listeners_[type]) || undefined;\n    };\n    /**\n     * @param {string=} opt_type Type. If not provided,\n     *     `true` will be returned if this event target has any listeners.\n     * @return {boolean} Has listeners.\n 
     */\n    Target.prototype.hasListener = function (opt_type) {\n        if (!this.listeners_) {\n            return false;\n        }\n        return opt_type\n            ? opt_type in this.listeners_\n            : Object.keys(this.listeners_).length > 0;\n    };\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../events.js\").Listener} listener Listener.\n     */\n    Target.prototype.removeEventListener = function (type, listener) {\n        var listeners = this.listeners_ && this.listeners_[type];\n        if (listeners) {\n            var index = listeners.indexOf(listener);\n            if (index !== -1) {\n                if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n                    // make listener a no-op, and remove later in #dispatchEvent()\n                    listeners[index] = VOID;\n                    ++this.pendingRemovals_[type];\n                }\n                else {\n                    listeners.splice(index, 1);\n
                     if (listeners.length === 0) {\n                        delete this.listeners_[type];\n                    }\n                }\n            }\n        }\n    };\n    return Target;\n}(Disposable));\nexport default Target;\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/events/EventType\n */\n/**\n * @enum {string}\n * @const\n */\nexport default {\n    /**\n     * Generic change event. Triggered when the revision counter is increased.\n     * @event module:ol/events/Event~BaseEvent#change\n     * @api\n     */\n    CHANGE: 'change',\n    /**\n     * Generic error event. Triggered when an error occurs.\n     * @event module:ol/events/Event~BaseEvent#error\n     * @api\n     */\n    ERROR: 'error',\n    BLUR: 'blur',\n    CLEAR: 'clear',\n    CONTEXTMENU: 'contextmenu',\n    CLICK: 'click',\n    DBLCLICK: 'dblclick',\n    DRAGENTER: 'dragenter',\n    DRAGOVER: 'dragover',\n    DROP: 'drop',\n    FOCUS: 'focus',\n    KEYDOWN: 'keydown',\n    KEYPRESS: 'keyp
 ress',\n    LOAD: 'load',\n    RESIZE: 'resize',\n    TOUCHMOVE: 'touchmove',\n    WHEEL: 'wheel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/events\n */\nimport { clear } from './obj.js';\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent\n */\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.githu
 b.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events~unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @param {boolean=} opt_once If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, opt_this, opt_once) {\n    if (opt_this && opt_this !== target) {\n        listener = listener.bind(opt_this);\n    }\n    if (opt_once) {\n        var originalListener_1 = listener;\n        listener = function () {\n            target.removeEventListener(type, listener);\n            originalListener
 _1.apply(this, arguments);\n        };\n    }\n    var eventsKey = {\n        target: target,\n        type: type,\n        listener: listener,\n    };\n    target.addEventListener(type, listener);\n    return eventsKey;\n}\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events~unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events~listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listen
 er.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, opt_this) {\n    return listen(target, type, listener, opt_this, true);\n}\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events~listen} or {@link module:ol/events~listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n    if (key && key.target) {\n        key.target.removeEventListener(key.type, key.listener);\n        clear(key);\n    }\n}\n//# sourceMappingURL=events.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.set
 PrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { listen, listenOnce, unlistenByKey } from './events.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fir
 es import(\"./events/Event.js\").default\n * @api\n */\nvar Observable = /** @class */ (function (_super) {\n    __extends(Observable, _super);\n    function Observable() {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.revision_ = 0;\n        return _this;\n    }\n    /**\n     * Increases the revision counter and dispatches a 'change' event.\n     * @api\n     */\n    Observable.prototype.changed = function () {\n        ++this.revision_;\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * Get the version number for this object.  Each time the object is modified,\n     * its version number will be incremented.\n     * @return {number} Revision.\n     * @api\n     */\n    Observable.prototype.getRevision = function () {\n        return this.revision_;\n    };\n    /**\n     * Listen for a certain type of event.\n     * @param {string|Array<string>} type The event type or ar
 ray of event types.\n     * @param {function(?): ?} listener The listener function.\n     * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n     *     called with an array of event types as the first argument, the return\n     *     will be an array of keys.\n     * @api\n     */\n    Observable.prototype.on = function (type, listener) {\n        if (Array.isArray(type)) {\n            var len = type.length;\n            var keys = new Array(len);\n            for (var i = 0; i < len; ++i) {\n                keys[i] = listen(this, type[i], listener);\n            }\n            return keys;\n        }\n        else {\n            return listen(this, /** @type {string} */ (type), listener);\n        }\n    };\n    /**\n     * Listen once for a certain type of event.\n     * @param {string|Array<string>} type The event type or array of event types.\n     * @param {function(?): ?} listener The listener function.\n   
   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n     *     called with an array of event types as the first argument, the return\n     *     will be an array of keys.\n     * @api\n     */\n    Observable.prototype.once = function (type, listener) {\n        var key;\n        if (Array.isArray(type)) {\n            var len = type.length;\n            key = new Array(len);\n            for (var i = 0; i < len; ++i) {\n                key[i] = listenOnce(this, type[i], listener);\n            }\n        }\n        else {\n            key = listenOnce(this, /** @type {string} */ (type), listener);\n        }\n        /** @type {Object} */ (listener).ol_key = key;\n        return key;\n    };\n    /**\n     * Unlisten for a certain type of event.\n     * @param {string|Array<string>} type The event type or array of event types.\n     * @param {function(?): ?} listener The listener function.\n     * @api\n     */\n
     Observable.prototype.un = function (type, listener) {\n        var key = /** @type {Object} */ (listener).ol_key;\n        if (key) {\n            unByKey(key);\n        }\n        else if (Array.isArray(type)) {\n            for (var i = 0, ii = type.length; i < ii; ++i) {\n                this.removeEventListener(type[i], listener);\n            }\n        }\n        else {\n            this.removeEventListener(type, listener);\n        }\n    };\n    return Observable;\n}(EventTarget));\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n    if (Array.isArray(key)) {\n        for (var i = 0, ii = key.length; i < ii; ++i) {\n            unlistenByKey(key[i]);\n        }\n    }\n    else {\n        unlistenByKey(/** @type {import(\"./events.js\
 ").EventsKey} */ (key));\n    }\n}\nexport default Observable;\n//# sourceMappingURL=Observable.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport { assign, isEmpty } from './obj.js';\nimport { getUid } from './util.js';\n/**\n * @classdesc\n * Events emitted by {@
 link module:ol/Object~BaseObject} instances are instances of this type.\n */\nvar ObjectEvent = /** @class */ (function (_super) {\n    __extends(ObjectEvent, _super);\n    /**\n     * @param {string} type The event type.\n     * @param {string} key The property name.\n     * @param {*} oldValue The old value for `key`.\n     */\n    function ObjectEvent(type, key, oldValue) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The name of the property whose value is changing.\n         * @type {string}\n         * @api\n         */\n        _this.key = key;\n        /**\n         * The old value. To get the new value use `e.target.get(e.key)` where\n         * `e` is the event object.\n         * @type {*}\n         * @api\n         */\n        _this.oldValue = oldValue;\n        return _this;\n    }\n    return ObjectEvent;\n}(Event));\nexport { ObjectEvent };\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not
 \n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n 
 * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\
 nvar BaseObject = /** @class */ (function (_super) {\n    __extends(BaseObject, _super);\n    /**\n     * @param {Object<string, *>=} opt_values An object with key-value pairs.\n     */\n    function BaseObject(opt_values) {\n        var _this = _super.call(this) || this;\n        // Call {@link module:ol/util~getUid} to ensure that the order of objects' ids is\n        // the same as the order in which they were created.  This also helps to\n        // ensure that object properties are always added in the same order, which\n        // helps many JavaScript engines generate faster code.\n        getUid(_this);\n        /**\n         * @private\n         * @type {Object<string, *>}\n         */\n        _this.values_ = null;\n        if (opt_values !== undefined) {\n            _this.setProperties(opt_values);\n        }\n        return _this;\n    }\n    /**\n     * Gets a value.\n     * @param {string} key Key name.\n     * @return {*} Value.\n     * @api\n     */\n    BaseObject.p
 rototype.get = function (key) {\n        var value;\n        if (this.values_ && this.values_.hasOwnProperty(key)) {\n            value = this.values_[key];\n        }\n        return value;\n    };\n    /**\n     * Get a list of object property names.\n     * @return {Array<string>} List of property names.\n     * @api\n     */\n    BaseObject.prototype.getKeys = function () {\n        return (this.values_ && Object.keys(this.values_)) || [];\n    };\n    /**\n     * Get an object of all property names and values.\n     * @return {Object<string, *>} Object.\n     * @api\n     */\n    BaseObject.prototype.getProperties = function () {\n        return (this.values_ && assign({}, this.values_)) || {};\n    };\n    /**\n     * @return {boolean} The object has properties.\n     */\n    BaseObject.prototype.hasProperties = function () {\n        return !!this.values_;\n    };\n    /**\n     * @param {string} key Key name.\n     * @param {*} oldValue Old value.\n     */\n    BaseObject.pr
 ototype.notify = function (key, oldValue) {\n        var eventType;\n        eventType = getChangeEventType(key);\n        this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n        eventType = ObjectEventType.PROPERTYCHANGE;\n        this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    };\n    /**\n     * Sets a value.\n     * @param {string} key Key name.\n     * @param {*} value Value.\n     * @param {boolean=} opt_silent Update without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.set = function (key, value, opt_silent) {\n        var values = this.values_ || (this.values_ = {});\n        if (opt_silent) {\n            values[key] = value;\n        }\n        else {\n            var oldValue = values[key];\n            values[key] = value;\n            if (oldValue !== value) {\n                this.notify(key, oldValue);\n            }\n        }\n    };\n    /**\n     * Sets a collection of key-value pairs.  Note that this cha
 nges any existing\n     * properties and adds new ones (it does not remove any existing properties).\n     * @param {Object<string, *>} values Values.\n     * @param {boolean=} opt_silent Update without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.setProperties = function (values, opt_silent) {\n        for (var key in values) {\n            this.set(key, values[key], opt_silent);\n        }\n    };\n    /**\n     * Unsets a property.\n     * @param {string} key Key name.\n     * @param {boolean=} opt_silent Unset without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.unset = function (key, opt_silent) {\n        if (this.values_ && key in this.values_) {\n            var oldValue = this.values_[key];\n            delete this.values_[key];\n            if (isEmpty(this.values_)) {\n                this.values_ = null;\n            }\n            if (!opt_silent) {\n                this.notify(key, oldValue);\n            }\n        }\n  
   };\n    return BaseObject;\n}(Observable));\n/**\n * @type {Object<string, string>}\n */\nvar changeEventTypeCache = {};\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nexport function getChangeEventType(key) {\n    return changeEventTypeCache.hasOwnProperty(key)\n        ? changeEventTypeCache[key]\n        : (changeEventTypeCache[key] = 'change:' + key);\n}\nexport default BaseObject;\n//# sourceMappingURL=Object.js.map","/**\n * @module ol/CollectionEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when an item is added to the collection.\n     * @event module:ol/Collection.CollectionEvent#add\n     * @api\n     */\n    ADD: 'add',\n    /**\n     * Triggered when an item is removed from the collection.\n     * @event module:ol/Collection.CollectionEvent#remove\n     * @api\n     */\n    REMOVE: 'remove',\n};\n//# sourceMappingURL=CollectionEventType.js.map","var __extends = (this && this.__extends) || (functi
 on () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport BaseObject from './Object.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport Event from './events/Event.js';\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    LENGTH: 'length',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nvar Co
 llectionEvent = /** @class */ (function (_super) {\n    __extends(CollectionEvent, _super);\n    /**\n     * @param {import(\"./CollectionEventType.js\").default} type Type.\n     * @param {*=} opt_element Element.\n     * @param {number=} opt_index The index of the added or removed element.\n     */\n    function CollectionEvent(type, opt_element, opt_index) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The element that is added to or removed from the collection.\n         * @type {*}\n         * @api\n         */\n        _this.element = opt_element;\n        /**\n         * The index of the added or removed element.\n         * @type {number}\n         * @api\n         */\n        _this.index = opt_index;\n        return _this;\n    }\n    return CollectionEvent;\n}(Event));\nexport { CollectionEvent };\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n
  */\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nvar Collection = /** @class */ (function (_super) {\n    __extends(Collection, _super);\n    /**\n     * @param {Array<T>=} opt_array Array.\n     * @param {Options=} opt_options Collection options.\n     */\n    function Collection(opt_array, opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.unique_ = !!options.unique;\n        /**\n         * @private\n         * @type {!Array<T>}\n         */\n        _this.array_ = opt_
 array ? opt_array : [];\n        if (_this.unique_) {\n            for (var i = 0, ii = _this.array_.length; i < ii; ++i) {\n                _this.assertUnique_(_this.array_[i], i);\n            }\n        }\n        _this.updateLength_();\n        return _this;\n    }\n    /**\n     * Remove all elements from the collection.\n     * @api\n     */\n    Collection.prototype.clear = function () {\n        while (this.getLength() > 0) {\n            this.pop();\n        }\n    };\n    /**\n     * Add elements to the collection.  This pushes each item in the provided array\n     * to the end of the collection.\n     * @param {!Array<T>} arr Array.\n     * @return {Collection<T>} This collection.\n     * @api\n     */\n    Collection.prototype.extend = function (arr) {\n        for (var i = 0, ii = arr.length; i < ii; ++i) {\n            this.push(arr[i]);\n        }\n        return this;\n    };\n    /**\n     * Iterate over each element, calling the provided callback.\n     * @param {f
 unction(T, number, Array<T>): *} f The function to call\n     *     for every element. This function takes 3 arguments (the element, the\n     *     index and the array). The return value is ignored.\n     * @api\n     */\n    Collection.prototype.forEach = function (f) {\n        var array = this.array_;\n        for (var i = 0, ii = array.length; i < ii; ++i) {\n            f(array[i], i, array);\n        }\n    };\n    /**\n     * Get a reference to the underlying Array object. Warning: if the array\n     * is mutated, no events will be dispatched by the collection, and the\n     * collection's \"length\" property won't be in sync with the actual length\n     * of the array.\n     * @return {!Array<T>} Array.\n     * @api\n     */\n    Collection.prototype.getArray = function () {\n        return this.array_;\n    };\n    /**\n     * Get the element at the provided index.\n     * @param {number} index Index.\n     * @return {T} Element.\n     * @api\n     */\n    Collection.proto
 type.item = function (index) {\n        return this.array_[index];\n    };\n    /**\n     * Get the length of this collection.\n     * @return {number} The length of the array.\n     * @observable\n     * @api\n     */\n    Collection.prototype.getLength = function () {\n        return this.get(Property.LENGTH);\n    };\n    /**\n     * Insert an element at the provided index.\n     * @param {number} index Index.\n     * @param {T} elem Element.\n     * @api\n     */\n    Collection.prototype.insertAt = function (index, elem) {\n        if (this.unique_) {\n            this.assertUnique_(elem);\n        }\n        this.array_.splice(index, 0, elem);\n        this.updateLength_();\n        this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD, elem, index));\n    };\n    /**\n     * Remove the last element of the collection and return it.\n     * Return `undefined` if the collection is empty.\n     * @return {T|undefined} Element.\n     * @api\n     */\n    Collection.protot
 ype.pop = function () {\n        return this.removeAt(this.getLength() - 1);\n    };\n    /**\n     * Insert the provided element at the end of the collection.\n     * @param {T} elem Element.\n     * @return {number} New length of the collection.\n     * @api\n     */\n    Collection.prototype.push = function (elem) {\n        if (this.unique_) {\n            this.assertUnique_(elem);\n        }\n        var n = this.getLength();\n        this.insertAt(n, elem);\n        return this.getLength();\n    };\n    /**\n     * Remove the first occurrence of an element from the collection.\n     * @param {T} elem Element.\n     * @return {T|undefined} The removed element or undefined if none found.\n     * @api\n     */\n    Collection.prototype.remove = function (elem) {\n        var arr = this.array_;\n        for (var i = 0, ii = arr.length; i < ii; ++i) {\n            if (arr[i] === elem) {\n                return this.removeAt(i);\n            }\n        }\n        return undefined;\n
     };\n    /**\n     * Remove the element at the provided index and return it.\n     * Return `undefined` if the collection does not contain this index.\n     * @param {number} index Index.\n     * @return {T|undefined} Value.\n     * @api\n     */\n    Collection.prototype.removeAt = function (index) {\n        var prev = this.array_[index];\n        this.array_.splice(index, 1);\n        this.updateLength_();\n        this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index));\n        return prev;\n    };\n    /**\n     * Set the element at the provided index.\n     * @param {number} index Index.\n     * @param {T} elem Element.\n     * @api\n     */\n    Collection.prototype.setAt = function (index, elem) {\n        var n = this.getLength();\n        if (index < n) {\n            if (this.unique_) {\n                this.assertUnique_(elem, index);\n            }\n            var prev = this.array_[index];\n            this.array_[index] = elem;\n         
    this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index));\n            this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD, elem, index));\n        }\n        else {\n            for (var j = n; j < index; ++j) {\n                this.insertAt(j, undefined);\n            }\n            this.insertAt(index, elem);\n        }\n    };\n    /**\n     * @private\n     */\n    Collection.prototype.updateLength_ = function () {\n        this.set(Property.LENGTH, this.array_.length);\n    };\n    /**\n     * @private\n     * @param {T} elem Element.\n     * @param {number=} opt_except Optional index to ignore.\n     */\n    Collection.prototype.assertUnique_ = function (elem, opt_except) {\n        for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n            if (this.array_[i] === elem && i !== opt_except) {\n                throw new AssertionError(58);\n            }\n        }\n    };\n    return Collection;\n}(BaseObject));\nexport default C
 ollection;\n//# sourceMappingURL=Collection.js.map","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n    if (!assertion) {\n        throw new AssertionError(errorCode);\n    }\n}\n//# sourceMappingURL=asserts.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
 \n    };\n})();\n/**\n * @module ol/Feature\n */\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport EventType from './events/EventType.js';\nimport { assert } from './asserts.js';\nimport { listen, unlistenByKey } from './events.js';\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using
  the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature.  For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/geom/Point';\n *\n * var feature = new Feature({\n *   geometry: new Polygon(polyCoords),\n *   labelPoint: new Point(labelCoords),\n *   name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry
 ();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} Geometry\n */\nvar Feature = /** @class */ (function (_super) {\n    __extends(Feature, _super);\n    /**\n     * @param {Geometry|Object<string, *>=} opt_geometryOrProperties\n     *     You may pass a Geometry object directly, or an object literal containing\n     *     properties. If you pass an object literal, you may include a Geometry\n     *     associated with a `geometry` key.\n     */\n    function Feature(opt_geometryOrProperties) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {number|string|undefined}\n         */\n        _this.id_ = undefined;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.geometryName_ = 'geometry';\n        /**\n         * User provided style.\n         * @private\n         * @type {import(\"./style/Style.js\").StyleLike}\n         */\n        _this.style_ = null;\n        /**
 \n         * @private\n         * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n         */\n        _this.styleFunction_ = undefined;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.geometryChangeKey_ = null;\n        _this.addEventListener(getChangeEventType(_this.geometryName_), _this.handleGeometryChanged_);\n        if (opt_geometryOrProperties) {\n            if (typeof (\n            /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry) === 'function') {\n                var geometry = /** @type {Geometry} */ (opt_geometryOrProperties);\n                _this.setGeometry(geometry);\n            }\n            else {\n                /** @type {Object<string, *>} */\n                var properties = opt_geometryOrProperties;\n                _this.setProperties(properties);\n            }\n        }\n        return _this;\n    }\n    /**\n     * Clone this feature. If the original
  feature has a geometry it\n     * is also cloned. The feature id is not set in the clone.\n     * @return {Feature} The clone.\n     * @api\n     */\n    Feature.prototype.clone = function () {\n        var clone = new Feature(this.hasProperties() ? this.getProperties() : null);\n        clone.setGeometryName(this.getGeometryName());\n        var geometry = this.getGeometry();\n        if (geometry) {\n            clone.setGeometry(geometry.clone());\n        }\n        var style = this.getStyle();\n        if (style) {\n            clone.setStyle(style);\n        }\n        return clone;\n    };\n    /**\n     * Get the feature's default geometry.  A feature may have any number of named\n     * geometries.  The \"default\" geometry (the one that is rendered by default) is\n     * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n     * @return {Geometry|undefined} The default geometry for the feature.\n     * @api\n     * @observable\n     */\n    Feature.prototype.
 getGeometry = function () {\n        return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n    };\n    /**\n     * Get the feature identifier.  This is a stable identifier for the feature and\n     * is either set when reading data from a remote source or set explicitly by\n     * calling {@link module:ol/Feature~Feature#setId}.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    Feature.prototype.getId = function () {\n        return this.id_;\n    };\n    /**\n     * Get the name of the feature's default geometry.  By default, the default\n     * geometry is named `geometry`.\n     * @return {string} Get the property name associated with the default geometry\n     *     for this feature.\n     * @api\n     */\n    Feature.prototype.getGeometryName = function () {\n        return this.geometryName_;\n    };\n    /**\n     * Get the feature's style. Will return what was provided to the\n     * {@link module:ol/Feature~Feature#setStyle} method
 .\n     * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n     * @api\n     */\n    Feature.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Get the feature's style function.\n     * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n     * representing the current style of this feature.\n     * @api\n     */\n    Feature.prototype.getStyleFunction = function () {\n        return this.styleFunction_;\n    };\n    /**\n     * @private\n     */\n    Feature.prototype.handleGeometryChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    Feature.prototype.handleGeometryChanged_ = function () {\n        if (this.geometryChangeKey_) {\n            unlistenByKey(this.geometryChangeKey_);\n            this.geometryChangeKey_ = null;\n        }\n        var geometry = this.getGeometry();\n        if (geometry) {\n            this.geometryChangeKey_ = 
 listen(geometry, EventType.CHANGE, this.handleGeometryChange_, this);\n        }\n        this.changed();\n    };\n    /**\n     * Set the default geometry for the feature.  This will update the property\n     * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n     * @param {Geometry|undefined} geometry The new geometry.\n     * @api\n     * @observable\n     */\n    Feature.prototype.setGeometry = function (geometry) {\n        this.set(this.geometryName_, geometry);\n    };\n    /**\n     * Set the style for the feature to override the layer style.  This can be a\n     * single style object, an array of styles, or a function that takes a\n     * resolution and returns an array of styles. To unset the feature style, call\n     * `setStyle()` without arguments or a falsey value.\n     * @param {import(\"./style/Style.js\").StyleLike=} opt_style Style for this feature.\n     * @api\n     * @fires module:ol/events/Event~BaseEvent#event:change\n     */\n   
  Feature.prototype.setStyle = function (opt_style) {\n        this.style_ = opt_style;\n        this.styleFunction_ = !opt_style\n            ? undefined\n            : createStyleFunction(opt_style);\n        this.changed();\n    };\n    /**\n     * Set the feature id.  The feature id is considered stable and may be used when\n     * requesting features or comparing identifiers returned from a remote source.\n     * The feature id can be used with the\n     * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n     * @param {number|string|undefined} id The feature id.\n     * @api\n     * @fires module:ol/events/Event~BaseEvent#event:change\n     */\n    Feature.prototype.setId = function (id) {\n        this.id_ = id;\n        this.changed();\n    };\n    /**\n     * Set the property name to be used when getting the feature's default geometry.\n     * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n     * this name will 
 be returned.\n     * @param {string} name The property name of the default geometry.\n     * @api\n     */\n    Feature.prototype.setGeometryName = function (name) {\n        this.removeEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_);\n        this.geometryName_ = name;\n        this.addEventListener(getChangeEventType(this.geometryName_), this.handleGeometryChanged_);\n        this.handleGeometryChanged_();\n    };\n    return Feature;\n}(BaseObject));\n/**\n * Convert the provided object into a feature style function.  Functions passed\n * through unchanged.  Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n *     A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport func
 tion createStyleFunction(obj) {\n    if (typeof obj === 'function') {\n        return obj;\n    }\n    else {\n        /**\n         * @type {Array<import(\"./style/Style.js\").default>}\n         */\n        var styles_1;\n        if (Array.isArray(obj)) {\n            styles_1 = obj;\n        }\n        else {\n            assert(typeof ( /** @type {?} */(obj).getZIndex) === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n            var style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n            styles_1 = [style];\n        }\n        return function () {\n            return styles_1;\n        };\n    }\n}\nexport default Feature;\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/geom/GeometryLayout\n */\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'X
 YM'`, `'XYZM'`.\n * @enum {string}\n */\nexport default {\n    XY: 'XY',\n    XYZ: 'XYZ',\n    XYM: 'XYM',\n    XYZM: 'XYZM',\n};\n//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/geom/GeometryType\n */\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nexport default {\n    POINT: 'Point',\n    LINE_STRING: 'LineString',\n    LINEAR_RING: 'LinearRing',\n    POLYGON: 'Polygon',\n    MULTI_POINT: 'MultiPoint',\n    MULTI_LINE_STRING: 'MultiLineString',\n    MULTI_POLYGON: 'MultiPolygon',\n    GEOMETRY_COLLECTION: 'GeometryCollection',\n    CIRCLE: 'Circle',\n};\n//# sourceMappingURL=GeometryType.js.map","/**\n * @module ol/proj/Units\n */\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nvar Units = {\n    DEGREES: 'degrees',\n    FE
 ET: 'ft',\n    METERS: 'm',\n    PIXELS: 'pixels',\n    TILE_PIXELS: 'tile-pixels',\n    USFEET: 'us-ft',\n};\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport var METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = (2 * Math.PI * 6370997) / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\nexport default Units;\n//# sourceMappingURL=Units.js.map","/**\n * @module ol/transform\n */\nimport { assert } from './asserts.js';\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozill
 a.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n    return [1, 0, 0, 1, 0, 0];\n}\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n    return set(transform, 1, 0, 0, 1, 0, 0);\n}\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n    var a1 = tra
 nsform1[0];\n    var b1 = transform1[1];\n    var c1 = transform1[2];\n    var d1 = transform1[3];\n    var e1 = transform1[4];\n    var f1 = transform1[5];\n    var a2 = transform2[0];\n    var b2 = transform2[1];\n    var c2 = transform2[2];\n    var d2 = transform2[3];\n    var e2 = transform2[4];\n    var f2 = transform2[5];\n    transform1[0] = a1 * a2 + c1 * b2;\n    transform1[1] = b1 * a2 + d1 * b2;\n    transform1[2] = a1 * c2 + c1 * d2;\n    transform1[3] = b1 * c2 + d1 * d2;\n    transform1[4] = a1 * e2 + c1 * f2 + e1;\n    transform1[5] = b1 * e2 + d1 * f2 + f1;\n    return transform1;\n}\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\
 n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n    transform[0] = a;\n    transform[1] = b;\n    transform[2] = c;\n    transform[3] = d;\n    transform[4] = e;\n    transform[5] = f;\n    return transform;\n}\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n    transform1[0] = transform2[0];\n    transform1[1] = transform2[1];\n    transform1[2] = transform2[2];\n    transform1[3] = transform2[3];\n    transform1[4] = transform2[4];\n    transform1[5] = transform2[5];\n    return transform1;\n}\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, tra
 nsformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n    var x = coordinate[0];\n    var y = coordinate[1];\n    coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n    coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n    return coordinate;\n}\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n    var cos = Math.cos(angle);\n    var sin = Math.sin(angle);\n    return multiply(t
 ransform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n    return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n    return set(target, x, 0, 0, y, 0, 0);\n}\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n    return multiply(transform, set
 (tmp_, 1, 0, 0, 1, dx, dy));\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n    var sin = Math.sin(angle);\n    var cos = Math.cos(angle);\n    transform[0] = sx * cos;\n    transform[1] = sy * sin;\n    transform[2] = -sx * sin;\n    transform[3] = sy * cos;\n    transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n    transform[5] = dx2 * sy * sin +
  dy2 * sy * cos + dy1;\n    return transform;\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` porperty of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n    return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) tra
 nsform.\n */\nexport function invert(source) {\n    return makeInverse(source, source);\n}\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n *     the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n    var det = determinant(source);\n    assert(det !== 0, 32); // Transformation matrix cannot be inverted\n    var a = source[0];\n    var b = source[1];\n    var c = source[2];\n    var d = source[3];\n    var e = source[4];\n    var f = source[5];\n    target[0] = d / det;\n    target[1] = -b / det;\n    target[2] = -c / det;\n    target[3] = a / det;\n    target[4] = (c * f - d * e) / det;\n    target[5] = -(a * f - b * e) / det;\n    return target;\n}\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexpor
 t function determinant(mat) {\n    return mat[0] * mat[3] - mat[1] * mat[2];\n}\n/**\n * A string version of the transform.  This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n    return 'matrix(' + mat.join(', ') + ')';\n}\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/extent/Corner\n */\n/**\n * Extent corner.\n * @enum {string}\n */\nexport default {\n    BOTTOM_LEFT: 'bottom-left',\n    BOTTOM_RIGHT: 'bottom-right',\n    TOP_LEFT: 'top-left',\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=Corner.js.map","/**\n * @module ol/extent/Relationship\n */\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n    UNKNOWN: 0,\n    INTERSECTING: 1,\n    ABOVE: 2,\n    RIGHT: 4,\n    BELOW: 8,\n    LEFT: 16,\n};\n//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/extent\n */\nimport Corner from './extent/Corner.js';\nimport
  Relationship from './extent/Relationship.js';\nimport { assert } from './asserts.js';\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n    var extent = createEmpty();\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        extendCoordinate(extent, coordinates[i]);\n    }\n    return extent;\n}\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent=} opt_extent Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n    var minX = Math.min.apply(null, xs);\n    var minY = Math.min.apply(null, ys);\n    var maxX = Math.max.apply(null, xs);\n    v
 ar maxY = Math.max.apply(null, ys);\n    return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0] - value;\n        opt_extent[1] = extent[1] - value;\n        opt_extent[2] = extent[2] + value;\n        opt_extent[3] = extent[3] + value;\n        return opt_extent;\n    }\n    else {\n        return [\n            extent[0] - value,\n            extent[1] - value,\n            extent[2] + value,\n            extent[3] + value,\n        ];\n    }\n}\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} The clone.\n */\nexport func
 tion clone(extent, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0];\n        opt_extent[1] = extent[1];\n        opt_extent[2] = extent[2];\n        opt_extent[3] = extent[3];\n        return opt_extent;\n    }\n    else {\n        return extent.slice();\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n    var dx, dy;\n    if (x < extent[0]) {\n        dx = extent[0] - x;\n    }\n    else if (extent[2] < x) {\n        dx = x - extent[2];\n    }\n    else {\n        dx = 0;\n    }\n    if (y < extent[1]) {\n        dy = extent[1] - y;\n    }\n    else if (extent[3] < y) {\n        dy = y - extent[3];\n    }\n    else {\n        dy = 0;\n    }\n    return dx * dx + dy * dy;\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @
 param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n    return containsXY(extent, coordinate[0], coordinate[1]);\n}\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n *     first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n    return (extent1[0] <= extent2[0] &&\n        extent2[2] <= extent1[2] &&\n        extent1[1] <= extent2[1] &&\n        extent2[3] <= extent1[3]);\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordin
 ate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n    return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n *     import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var maxY = extent[3];\n    var x = coordinate[0];\n    var y = coordinate[1];\n    var relationship = Relationship.UNKNOWN;\n    if (x < minX) {\n        relationship = relationship | Relationship.LEFT;\n    }\n    else if (x > maxX) {\n        relations
 hip = relationship | Relationship.RIGHT;\n    }\n    if (y < minY) {\n        relationship = relationship | Relationship.BELOW;\n    }\n    else if (y > maxY) {\n        relationship = relationship | Relationship.ABOVE;\n    }\n    if (relationship === Relationship.UNKNOWN) {\n        relationship = Relationship.INTERSECTING;\n    }\n    return relationship;\n}\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n    return [Infinity, Infinity, -Infinity, -Infinity];\n}\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = minX;\n        opt_extent[1] = minY;\n        opt_e
 xtent[2] = maxX;\n        opt_extent[3] = maxY;\n        return opt_extent;\n    }\n    else {\n        return [minX, minY, maxX, maxY];\n    }\n}\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(opt_extent) {\n    return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, opt_extent) {\n    var x = coordinate[0];\n    var y = coordinate[1];\n    return createOrUpdate(x, y, x, y, opt_extent);\n}\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {
 \n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendCoordinates(extent, coordinates);\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendRings(extent, rings);\n}\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param 
 {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n    return (extent1[0] == extent2[0] &&\n        extent1[2] == extent2[2] &&\n        extent1[1] == extent2[1] &&\n        extent1[3] == extent2[3]);\n}\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n    return (Math.abs(extent1[0] - extent2[0]) < tolerance &&\n        Math.abs(extent1[2] - extent2[2]) < tolerance &&\n        Math.abs(extent1[1] - extent2[1]) < tolerance &&\n        Math.abs(extent1[3] - extent2[3]) < tolerance);\n}\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * 
 @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n    if (extent2[0] < extent1[0]) {\n        extent1[0] = extent2[0];\n    }\n    if (extent2[2] > extent1[2]) {\n        extent1[2] = extent2[2];\n    }\n    if (extent2[1] < extent1[1]) {\n        extent1[1] = extent2[1];\n    }\n    if (extent2[3] > extent1[3]) {\n        extent1[3] = extent2[3];\n    }\n    return extent1;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n    if (coordinate[0] < extent[0]) {\n        extent[0] = coordinate[0];\n    }\n    if (coordinate[0] > extent[2]) {\n        extent[2] = coordinate[0];\n    }\n    if (coordinate[1] < extent[1]) {\n        extent[1] = coordinate[1];\n    }\n    if (coordinate[1] > extent[3]) {\n        exten
 t[3] = coordinate[1];\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        extendCoordinate(extent, coordinates[i]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) {\n    for (; offset < end; offset += stride) {\n        extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @retur
 n {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n    for (var i = 0, ii = rings.length; i < ii; ++i) {\n        extendCoordinates(extent, rings[i]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n    extent[0] = Math.min(extent[0], x);\n    extent[1] = Math.min(extent[1], y);\n    extent[2] = Math.max(extent[2], x);\n    extent[3] = Math.max(extent[3], y);\n}\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n    var val;\n    val = callback(getBottomLeft(extent));\n    if (
 val) {\n        return val;\n    }\n    val = callback(getBottomRight(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getTopRight(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getTopLeft(extent));\n    if (val) {\n        return val;\n    }\n    return false;\n}\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n    var area = 0;\n    if (!isEmpty(extent)) {\n        area = getWidth(extent) * getHeight(extent);\n    }\n    return area;\n}\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n    return [extent[0], extent[1]];\n}\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} 
 Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n    return [extent[2], extent[1]];\n}\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n    return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./extent/Corner.js\").default} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n    var coordinate;\n    if (corner === Corner.BOTTOM_LEFT) {\n        coordinate = getBottomLeft(extent);\n    }\n    else if (corner === Corner.BOTTOM_RIGHT) {\n        coordinate = getBottomRight(extent);\n    }\n    else if (corner === Corner.TOP_LEFT) {\n        coordinate = getTopLeft(extent);\n    }\n    else if (corner === C
 orner.TOP_RIGHT) {\n        coordinate = getTopRight(extent);\n    }\n    else {\n        assert(false, 13); // Invalid corner\n    }\n    return coordinate;\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n    var minX = Math.min(extent1[0], extent2[0]);\n    var minY = Math.min(extent1[1], extent2[1]);\n    var maxX = Math.max(extent1[2], extent2[2]);\n    var maxY = Math.max(extent1[3], extent2[3]);\n    return (maxX - minX) * (maxY - minY);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, opt_extent) {\n    var dx = (resolution * size[0]) / 
 2;\n    var dy = (resolution * size[1]) / 2;\n    var cosRotation = Math.cos(rotation);\n    var sinRotation = Math.sin(rotation);\n    var xCos = dx * cosRotation;\n    var xSin = dx * sinRotation;\n    var yCos = dy * cosRotation;\n    var ySin = dy * sinRotation;\n    var x = center[0];\n    var y = center[1];\n    var x0 = x - xCos + ySin;\n    var x1 = x - xCos - ySin;\n    var x2 = x + xCos - ySin;\n    var x3 = x + xCos + ySin;\n    var y0 = y - xSin - yCos;\n    var y1 = y - xSin + yCos;\n    var y2 = y + xSin + yCos;\n    var y3 = y + xSin - yCos;\n    return createOrUpdate(Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), opt_extent);\n}\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n    return extent[3] - extent[1];\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {nu
 mber} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n    var intersection = getIntersection(extent1, extent2);\n    return getArea(intersection);\n}\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent=} opt_extent Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n    var intersection = opt_extent ? opt_extent : createEmpty();\n    if (intersects(extent1, extent2)) {\n        if (extent1[0] > extent2[0]) {\n            intersection[0] = extent1[0];\n        }\n        else {\n            intersection[0] = extent2[0];\n        }\n        if (extent1[1] > extent2[1]) {\n            intersection[1] = extent1[1];\n        }\n        else {\n            intersection[1] = extent2[1];\n        }\n        if (extent1[2] < extent2[2]) {\n            inte
 rsection[2] = extent1[2];\n        }\n        else {\n            intersection[2] = extent2[2];\n        }\n        if (extent1[3] < extent2[3]) {\n            intersection[3] = extent1[3];\n        }\n        else {\n            intersection[3] = extent2[3];\n        }\n    }\n    else {\n        createOrUpdateEmpty(intersection);\n    }\n    return intersection;\n}\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n    return getWidth(extent) + getHeight(extent);\n}\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n    return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(
 extent) {\n    return [extent[0], extent[3]];\n}\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n    return [extent[2], extent[3]];\n}\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n    return extent[2] - extent[0];\n}\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n    return (extent1[0] <= extent2[2] &&\n        extent1[2] >= extent2[0] &&\n        extent1[1] <= extent2[3] &&\n        extent1[3] >= extent2[1]);\n}\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @
 api\n */\nexport function isEmpty(extent) {\n    return extent[2] < extent[0] || extent[3] < extent[1];\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0];\n        opt_extent[1] = extent[1];\n        opt_extent[2] = extent[2];\n        opt_extent[3] = extent[3];\n        return opt_extent;\n    }\n    else {\n        return extent;\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n    var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n    var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n    extent[0] -= deltaX;\n    extent[2] += deltaX;\n    extent[1] -= deltaY;\n    extent[3] += deltaY;\n}\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) t
 he provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n    var intersects = false;\n    var startRel = coordinateRelationship(extent, start);\n    var endRel = coordinateRelationship(extent, end);\n    if (startRel === Relationship.INTERSECTING ||\n        endRel === Relationship.INTERSECTING) {\n        intersects = true;\n    }\n    else {\n        var minX = extent[0];\n        var minY = extent[1];\n        var maxX = extent[2];\n        var maxY = extent[3];\n        var startX = start[0];\n        var startY = start[1];\n        var endX = end[0];\n        var endY = end[1];\n        var slope = (endY - startY) / (endX - startX);\n        var x = void 0, y = void 0;\n        if (!!(endRel & Rel
 ationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n            // potentially intersects top\n            x = endX - (endY - maxY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.RIGHT) &&\n            !(startRel & Relationship.RIGHT)) {\n            // potentially intersects right\n            y = endY - (endX - maxX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.BELOW) &&\n            !(startRel & Relationship.BELOW)) {\n            // potentially intersects bottom\n            x = endX - (endY - minY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.LEFT) &&\n            !(startRel & Relationship.LEFT)) {\n            // potentially intersects left\n            y = endY - (endX - minX) * slope;\n            inters
 ects = y >= minY && y <= maxY;\n        }\n    }\n    return intersects;\n}\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent=} opt_extent Destination extent.\n * @param {number=} opt_stops Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent, opt_stops) {\n    var coordinates = [];\n    if (opt_stops > 1) {\n        var width = extent[2] - extent[0];\n        var height = extent[3] - extent[1];\n        for (var i = 0; i < opt_stops; ++i) {\n            coordinates.push(extent[0] + (width * i) / opt_stops, extent[1], extent[2], extent[1] + (height * i) / opt_stops, extent[2] - (width * i) / opt_stops, extent[3], extent[0], extent[3] - (heig
 ht * i) / opt_stops);\n        }\n    }\n    else {\n        coordinates = [\n            extent[0],\n            extent[1],\n            extent[2],\n            extent[1],\n            extent[2],\n            extent[3],\n            extent[0],\n            extent[3],\n        ];\n    }\n    transformFn(coordinates, coordinates, 2);\n    var xs = [];\n    var ys = [];\n    for (var i = 0, l = coordinates.length; i < l; i += 2) {\n        xs.push(coordinates[i]);\n        ys.push(coordinates[i + 1]);\n    }\n    return _boundingExtentXYs(xs, ys, opt_extent);\n}\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n    var projectionExtent = projection.getExtent();\n    var center = getCenter(extent);\n    if (projection.canWrap
 X() &&\n        (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) {\n        var worldWidth = getWidth(projectionExtent);\n        var worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth);\n        var offset = worldsAway * worldWidth;\n        extent[0] -= offset;\n        extent[2] -= offset;\n    }\n    return extent;\n}\n//# sourceMappingURL=extent.js.map","/**\n * @module ol/proj/Projection\n */\nimport { METERS_PER_UNIT } from './Units.js';\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").default|string} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole glo
 be.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `{number}` view resolution and an `{import(\"../coordinate.js\").Coordinate}` as arguments, and returns\n * the `{number}` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj#getPointResolution} function will be used.\n */\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link module:ol/proj} namespace.\n * You can use these in applic
 ations, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj~get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n *     http://www.opengis.net/gml/srs/epsg.xml#4326,\n *     urn:x-ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n *     urn:ogc:def:crs:EPSG:6.18:3:3857,\n *     http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol/proj/proj4~register} function.\n *\n * @api\n */\nvar Proj
 ection = /** @class */ (function () {\n    /**\n     * @param {Options} options Projection options.\n     */\n    function Projection(options) {\n        /**\n         * @private\n         * @type {string}\n         */\n        this.code_ = options.code;\n        /**\n         * Units of projected coordinates. When set to `TILE_PIXELS`, a\n         * `this.extent_` and `this.worldExtent_` must be configured properly for each\n         * tile.\n         * @private\n         * @type {import(\"./Units.js\").default}\n         */\n        this.units_ = /** @type {import(\"./Units.js\").default} */ (options.units);\n        /**\n         * Validity extent of the projection in projected coordinates. For projections\n         * with `TILE_PIXELS` units, this is the extent of the tile in\n         * tile pixel space.\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.extent_ = options.extent !== undefined ? options.extent : null;\n        /**
 \n         * Extent of the world in EPSG:4326. For projections with\n         * `TILE_PIXELS` units, this is the extent of the tile in\n         * projected coordinate space.\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.worldExtent_ =\n            options.worldExtent !== undefined ? options.worldExtent : null;\n        /**\n         * @private\n         * @type {string}\n         */\n        this.axisOrientation_ =\n            options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.global_ = options.global !== undefined ? options.global : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.canWrapX_ = !!(this.global_ && this.extent_);\n        /**\n         * @private\n         * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n         */\n     
    this.getPointResolutionFunc_ = options.getPointResolution;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        this.defaultTileGrid_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.metersPerUnit_ = options.metersPerUnit;\n    }\n    /**\n     * @return {boolean} The projection is suitable for wrapping the x-axis\n     */\n    Projection.prototype.canWrapX = function () {\n        return this.canWrapX_;\n    };\n    /**\n     * Get the code for this projection, e.g. 'EPSG:4326'.\n     * @return {string} Code.\n     * @api\n     */\n    Projection.prototype.getCode = function () {\n        return this.code_;\n    };\n    /**\n     * Get the validity extent for this projection.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    Projection.prototype.getExtent = function () {\n        return this.extent_;\n    };\n    /**\n    
  * Get the units of this projection.\n     * @return {import(\"./Units.js\").default} Units.\n     * @api\n     */\n    Projection.prototype.getUnits = function () {\n        return this.units_;\n    };\n    /**\n     * Get the amount of meters per unit of this projection.  If the projection is\n     * not configured with `metersPerUnit` or a units identifier, the return is\n     * `undefined`.\n     * @return {number|undefined} Meters.\n     * @api\n     */\n    Projection.prototype.getMetersPerUnit = function () {\n        return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n    };\n    /**\n     * Get the world extent for this projection.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    Projection.prototype.getWorldExtent = function () {\n        return this.worldExtent_;\n    };\n    /**\n     * Get the axis orientation of this projection.\n     * Example values are:\n     * enu - the default easting, northing, elevation.\n     * neu -
  northing, easting, up - useful for \"lat/long\" geographic coordinates,\n     *     or south orientated transverse mercator.\n     * wnu - westing, northing, up - some planetary coordinate systems have\n     *     \"west positive\" coordinate systems\n     * @return {string} Axis orientation.\n     * @api\n     */\n    Projection.prototype.getAxisOrientation = function () {\n        return this.axisOrientation_;\n    };\n    /**\n     * Is this projection a global projection which spans the whole world?\n     * @return {boolean} Whether the projection is global.\n     * @api\n     */\n    Projection.prototype.isGlobal = function () {\n        return this.global_;\n    };\n    /**\n     * Set if the projection is a global projection which spans the whole world\n     * @param {boolean} global Whether the projection is global.\n     * @api\n     */\n    Projection.prototype.setGlobal = function (global) {\n        this.global_ = global;\n        this.canWrapX_ = !!(global && this.exte
 nt_);\n    };\n    /**\n     * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n     */\n    Projection.prototype.getDefaultTileGrid = function () {\n        return this.defaultTileGrid_;\n    };\n    /**\n     * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n     */\n    Projection.prototype.setDefaultTileGrid = function (tileGrid) {\n        this.defaultTileGrid_ = tileGrid;\n    };\n    /**\n     * Set the validity extent for this projection.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    Projection.prototype.setExtent = function (extent) {\n        this.extent_ = extent;\n        this.canWrapX_ = !!(this.global_ && extent);\n    };\n    /**\n     * Set the world extent for this projection.\n     * @param {import(\"../extent.js\").Extent} worldExtent World extent\n     *     [minlon, minlat, maxlon, maxlat].\n     * @api\n     */\n    Projection.prototype.setWorldExtent
  = function (worldExtent) {\n        this.worldExtent_ = worldExtent;\n    };\n    /**\n     * Set the getPointResolution function (see {@link module:ol/proj~getPointResolution}\n     * for this projection.\n     * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n     * @api\n     */\n    Projection.prototype.setGetPointResolution = function (func) {\n        this.getPointResolutionFunc_ = func;\n    };\n    /**\n     * Get the custom point resolution function for this projection (if set).\n     * @return {function(number, import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n     * resolution function (if set).\n     */\n    Projection.prototype.getPointResolutionFunc = function () {\n        return this.getPointResolutionFunc_;\n    };\n    return Projection;\n}());\nexport default Projection;\n//# sourceMappingURL=Projection.js.map","/**\n * @module ol/math\n */\n/**\n * Takes a number and clamps it to within the prov
 ided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clamp(value, min, max) {\n    return Math.min(Math.max(value, min), max);\n}\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport var cosh = (function () {\n    // Wrapped in a iife, to save the overhead of checking for the native\n    // implementation on every invocation.\n    var cosh;\n    if ('cosh' in Math) {\n        // The environment supports the native Math.cosh function, use it…\n        cosh
  = Math.cosh;\n    }\n    else {\n        // … else, use the reference implementation of MDN:\n        cosh = function (x) {\n            var y = /** @type {Math} */ (Math).exp(x);\n            return (y + 1 / y) / 2;\n        };\n    }\n    return cosh;\n})();\n/**\n * Return the base 2 logarithm of a given number. The method will use the\n * native `Math.log2` function if it is available, otherwise the base 2\n * logarithm will be calculated via the reference implementation of the\n * Mozilla developer network.\n *\n * @param {number} x X.\n * @return {number} Base 2 logarithm of x.\n */\nexport var log2 = (function () {\n    // Wrapped in a iife, to save the overhead of checking for the native\n    // implementation on every invocation.\n    var log2;\n    if ('log2' in Math) {\n        // The environment supports the native Math.log2 function, use it…\n        log2 = Math.log2;\n    }\n    else {\n        // … else, use the reference implementation of MDN:\n        log2 = 
 function (x) {\n            return Math.log(x) * Math.LOG2E;\n        };\n    }\n    return log2;\n})();\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    if (dx !== 0 || dy !== 0) {\n        var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            x1 = x2;\n            y1 = y2;\n        }\n        else if (t > 0) {\n            x1 += dx * t;\n            y1 += dy * t;\n        }\n    }\n    return squaredDistance(x, y, x1, y1);\n}\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {numb
 er} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    return dx * dx + dy * dy;\n}\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     in row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n    var n = mat.length;\n    for (var i = 0; i < n; i++) {\n        // Find max in the i-th column (ignoring i - 1 first rows)\n        var maxRow = i;\n        var maxEl = Math.abs(mat[i][i]);\n        for (var r = i + 1; r < n; r++) {\n            var absValue = Math.abs(mat[r][i]);\n            if (absValue > maxEl) {\n                maxEl = absValue;\n                maxRow = r;\n            }\n        }\n        if (maxEl === 0) {\n 
            return null; // matrix is singular\n        }\n        // Swap max row with i-th (current) row\n        var tmp = mat[maxRow];\n        mat[maxRow] = mat[i];\n        mat[i] = tmp;\n        // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n        for (var j = i + 1; j < n; j++) {\n            var coef = -mat[j][i] / mat[i][i];\n            for (var k = i; k < n + 1; k++) {\n                if (i == k) {\n                    mat[j][k] = 0;\n                }\n                else {\n                    mat[j][k] += coef * mat[i][k];\n                }\n            }\n        }\n    }\n    // Solve Ax=b for upper triangular matrix A (mat)\n    var x = new Array(n);\n    for (var l = n - 1; l >= 0; l--) {\n        x[l] = mat[l][n] / mat[l][l];\n        for (var m = l - 1; m >= 0; m--) {\n            mat[m][n] -= mat[m][l] * x[l];\n        }\n    }\n    return x;\n}\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians An
 gle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n    return (angleInRadians * 180) / Math.PI;\n}\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n    return (angleInDegrees * Math.PI) / 180;\n}\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n    var r = a % b;\n    return r * b < 0 ? r + b : r;\n}\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n    return a + x * (b - a);\n}\n//# sourceMappingURL=math.js.map","var __extends = (this 
 && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\nimport { cosh } from '../math.js';\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [
 -HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /** @class */ (function (_super) {\n    __extends(EPSG3857Projection, _super);\n    /**\n     * @param {string} code Code.\n     */\n    function EPSG3857Projection(code) {\n        return _super.call(this, {\n            code: code,\n            units: Units.METERS,\n            extent: EXTENT,\n            global: true,\n            worldExtent: WORLD_EXTENT,\n            getPointResolution: function (resolution, point) {\n                return resolution / cosh(point[1] / RADIUS);\n            },\n        }) || this;\n    }\n    return EPSG3857Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS 
 = [\n    new EPSG3857Projection('EPSG:3857'),\n    new EPSG3857Projection('EPSG:102100'),\n    new EPSG3857Projection('EPSG:102113'),\n    new EPSG3857Projection('EPSG:900913'),\n    new EPSG3857Projection('urn:ogc:def:crs:EPSG:6.18:3:3857'),\n    new EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'),\n    new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n    var length = input.length;\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var output = opt_output;\n    if (output === undefined) {\n        if (dimension > 2) {\n            // preserve values be
 yond second dimension\n            output = input.slice();\n        }\n        else {\n            output = new Array(length);\n        }\n    }\n    var halfSize = HALF_SIZE;\n    for (var i = 0; i < length; i += dimension) {\n        output[i] = (halfSize * input[i]) / 180;\n        var y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n        if (y > halfSize) {\n            y = halfSize;\n        }\n        else if (y < -halfSize) {\n            y = -halfSize;\n        }\n        output[i + 1] = y;\n    }\n    return output;\n}\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n    var length = input.length;\n    var d
 imension = opt_dimension > 1 ? opt_dimension : 2;\n    var output = opt_output;\n    if (output === undefined) {\n        if (dimension > 2) {\n            // preserve values beyond second dimension\n            output = input.slice();\n        }\n        else {\n            output = new Array(length);\n        }\n    }\n    for (var i = 0; i < length; i += dimension) {\n        output[i] = (180 * input[i]) / HALF_SIZE;\n        output[i + 1] =\n            (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n    }\n    return output;\n}\n//# sourceMappingURL=epsg3857.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return functio
 n (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-180, -90, 180, 90];\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-pro
 jection, with x,y coordinates.\n */\nvar EPSG4326Projection = /** @class */ (function (_super) {\n    __extends(EPSG4326Projection, _super);\n    /**\n     * @param {string} code Code.\n     * @param {string=} opt_axisOrientation Axis orientation.\n     */\n    function EPSG4326Projection(code, opt_axisOrientation) {\n        return _super.call(this, {\n            code: code,\n            units: Units.DEGREES,\n            extent: EXTENT,\n            axisOrientation: opt_axisOrientation,\n            global: true,\n            metersPerUnit: METERS_PER_UNIT,\n            worldExtent: EXTENT,\n        }) || this;\n    }\n    return EPSG4326Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n    new EPSG4326Projection('CRS:84'),\n    new EPSG4326Projection('EPSG:4326', 'neu'),\n    new EPSG4326Projection('urn:ogc:def:crs:EPSG::4326', 'neu'),\n    new EPSG4326Proj
 ection('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),\n    new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n    new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n    new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n    new EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu'),\n];\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nvar cache = {};\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n    cache = {};\n}\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n    return cache[code] || null;\n}\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache
 .\n */\nexport function add(code, projection) {\n    cache[code] = projection;\n}\n//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport { isEmpty } from '../obj.js';\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nvar transforms = {};\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n    transforms = {};\n}\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n    var sourceCode = source.getCode();\n    var destinationCode = destination.getCode();\n    if (!(sourceCode in transforms)) {\n        transforms[sourceCode] =
  {};\n    }\n    transforms[sourceCode][destinationCode] = transformFn;\n}\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n    var sourceCode = source.getCode();\n    var destinationCode = destination.getCode();\n    var transform = transforms[sourceCode][destinationCode];\n    delete transforms[sourceCode][destinationCode];\n    if (isEmpty(transforms[sourceCode])) {\n        delete transforms[sourceCode];\n    }\n    return transform;\n}\n/**\n * Get a transform given a source code and a destination code.\n * @param {string}
  sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n    var transform;\n    if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n        transform = transforms[sourceCode][destinationCode];\n    }\n    return transform;\n}\n//# sourceMappingURL=transforms.js.map","/**\n * @module ol/sphere\n */\nimport GeometryType from './geom/GeometryType.js';\nimport { toDegrees, toRadians } from './math.js';\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the  geometry.  By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radi
 us=6371008.8] Sphere radius.  By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport var DEFAULT_RADIUS = 6371008.8;\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number=} opt_radius The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, opt_radius) {\n    var radius = opt_radius || DEFAULT_RADIUS;\n    var lat1 = toRadians(c1[1]);\n    var lat2 = toRadians(c2[1]);\n    var deltaLatBy2 = (lat2 - lat1) / 2;\n    var deltaLonBy2 = toRadia
 ns(c2[0] - c1[0]) / 2;\n    var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n        Math.sin(deltaLonBy2) *\n            Math.sin(deltaLonBy2) *\n            Math.cos(lat1) *\n            Math.cos(lat2);\n    return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n    var length = 0;\n    for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n        length += getDistance(coordinates[i], coordinates[i + 1], radius);\n    }\n    return length;\n}\n/**\n * Get the spherical length of a geometry.  This length is the sum of the\n * great circle distances between coordinates.  For polygons, the length is\n * the sum of all rings.  For points, the length is zero.  For mu
 lti-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt_options Options for the\n * length calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, opt_options) {\n    var options = opt_options || {};\n    var radius = options.radius || DEFAULT_RADIUS;\n    var projection = options.projection || 'EPSG:3857';\n    var type = geometry.getType();\n    if (type !== GeometryType.GEOMETRY_COLLECTION) {\n        geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    }\n    var length = 0;\n    var coordinates, coords, i, ii, j, jj;\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT: {\n            break;\n        }\n        case 
 GeometryType.LINE_STRING:\n        case GeometryType.LINEAR_RING: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            length = getLengthInternal(coordinates, radius);\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING:\n        case GeometryType.POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                length += getLengthInternal(coordinates[i], radius);\n            }\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                coords = coordinates[i];\n                for (j = 0, jj = coords.length; j < jj; ++j) {\n       
              length += getLengthInternal(coords[j], radius);\n                }\n            }\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n            for (i = 0, ii = geometries.length; i < ii; ++i) {\n                length += getLength(geometries[i], opt_options);\n            }\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return length;\n}\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of 
 coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n    var area = 0;\n    var len = coordinates.length;\n    var x1 = coordinates[len - 1][0];\n    var y1 = coordinates[len - 1][1];\n    for (var i = 0; i < len; i++) {\n        var x2 = coordinates[i][0];\n        var y2 = coordinates[i][1];\n        area +=\n            toRadians(x2 - x1) *\n                (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n        x1 = x2;\n        y1 = y2;\n    }\n    return (area * radius * radius) / 2.0;\n}\n/**\n * Get the spherical area of a geometry.  This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt
 _options Options for the area\n *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n *     You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, opt_options) {\n    var options = opt_options || {};\n    var radius = options.radius || DEFAULT_RADIUS;\n    var projection = options.projection || 'EPSG:3857';\n    var type = geometry.getType();\n    if (type !== GeometryType.GEOMETRY_COLLECTION) {\n        geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    }\n    var area = 0;\n    var coordinates, coords, i, ii, j, jj;\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n        case GeometryType.LINE_STRING:\n        case GeometryType.MULTI_LINE_STRING:\n        case GeometryType.LINEAR_RING: {\n            break;\n        }\n        case GeometryType.POLYGON: {\n            coordinates = /
 ** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n            area = Math.abs(getAreaInternal(coordinates[0], radius));\n            for (i = 1, ii = coordinates.length; i < ii; ++i) {\n                area -= Math.abs(getAreaInternal(coordinates[i], radius));\n            }\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                coords = coordinates[i];\n                area += Math.abs(getAreaInternal(coords[0], radius));\n                for (j = 1, jj = coords.length; j < jj; ++j) {\n                    area -= Math.abs(getAreaInternal(coords[j], radius));\n                }\n            }\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            var geometries = /** @type {import(\"./geom/GeometryC
 ollection.js\").default} */ (geometry).getGeometries();\n            for (i = 0, ii = geometries.length; i < ii; ++i) {\n                area += getArea(geometries[i], opt_options);\n            }\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return area;\n}\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n *     point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number=} opt_radius The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, opt_radius) {\n    var radius = opt_radius ||
  DEFAULT_RADIUS;\n    var lat1 = toRadians(c1[1]);\n    var lon1 = toRadians(c1[0]);\n    var dByR = distance / radius;\n    var lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) +\n        Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n    var lon = lon1 +\n        Math.atan2(Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1), Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n    return [toDegrees(lon), toDegrees(lat)];\n}\n//# sourceMappingURL=sphere.js.map","/**\n * @module ol/string\n */\n/**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)\n * @returns {string} Formatted string\n */\nexport function padNumber(number, width, opt_precision) {\n    var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;\n    var decimal = numberString.indexOf('.');\n    decimal = decimal === -1 ? numberString.le
 ngth : decimal;\n    return decimal > width\n        ? numberString\n        : new Array(1 + width - decimal).join('0') + numberString;\n}\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @returns {number} Value\n */\nexport function compareVersions(v1, v2) {\n    var s1 = ('' + v1).split('.');\n    var s2 = ('' + v2).split('.');\n    for (var i = 0; i < Math.max(s1.length, s2.length); i++) {\n        var n1 = parseInt(s1[i] || '0', 10);\n        var n2 = parseInt(s2[i] || '0', 10);\n        if (n1 > n2) {\n            return 1;\n        }\n        if (n2 > n1) {\n            return -1;\n        }\n    }\n    return 0;\n}\n//# sourceMappingURL=string.js.map","/**\n * @module ol/coordinate\n */\nimport { getWidth } from './extent.js';\nimport { modulo } from './math.js';\nimport { padNumber } from './string.js';\n/**\n * An array of numbers representin
 g an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {add} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     add(coord, [-2, 4]);\n *     // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n    coordinate[0] += +delta[0];\n    coordinate[1] += +delta[1];\n    return coordinate;\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @par
 am {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n    var r = circle.getRadius();\n    var center = circle.getCenter();\n    var x0 = center[0];\n    var y0 = center[1];\n    var x1 = coordinate[0];\n    var y1 = coordinate[1];\n    var dx = x1 - x0;\n    var dy = y1 - y0;\n    if (dx === 0 && dy === 0) {\n        dx = 1;\n    }\n    var d = Math.sqrt(dx * dx + dy * dy);\n    var x = x0 + (r * dx) / d;\n    var y = y0 + (r * dy) / d;\n    return [x, y];\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coord
 inate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n    var x0 = coordinate[0];\n    var y0 = coordinate[1];\n    var start = segment[0];\n    var end = segment[1];\n    var x1 = start[0];\n    var y1 = start[1];\n    var x2 = end[0];\n    var y2 = end[1];\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    var along = dx === 0 && dy === 0\n        ? 0\n        : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n    var x, y;\n    if (along <= 0) {\n        x = x1;\n        y = y1;\n    }\n    else if (along >= 1) {\n        x = x2;\n        y = y2;\n    }\n    else {\n        x = x1 + along * dx;\n        y = y1 + along * dy;\n    }\n    return [x, y];\n}\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without
  specifying the fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY();\n *     var out = stringifyFunc(coord);\n *     // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY(2);\n *     var out = stringifyFunc(coord);\n *     // out is now '7.85, 47.98'\n *\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(opt_fractionDigits) {\n    return (\n    /**\n     * @param {Coordinate} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function (coordinate) {\n        return toStringXY(coordinate, opt_fractionDigits);\n    })
 ;\n}\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n    var normalizedDegrees = modulo(degrees + 180, 360) - 180;\n    var x = Math.abs(3600 * normalizedDegrees);\n    var dflPrecision = opt_fractionDigits || 0;\n    var precision = Math.pow(10, dflPrecision);\n    var deg = Math.floor(x / 3600);\n    var min = Math.floor((x - deg * 3600) / 60);\n    var sec = x - deg * 3600 - min * 60;\n    sec = Math.ceil(sec * precision) / precision;\n    if (sec >= 60) {\n        sec = 0;\n        min += 1;\n    }\n    if (min >= 60) {\n        min = 0;\n        deg += 1;\n    }\n    return (deg +\n        '\\u00b0 ' +\n        padNumber(min, 2) +\n        '\\u2032 ' +\n        padNumber(sec, 2, dflPrecision) +\n        '\\u
 2033' +\n        (normalizedDegrees == 0\n            ? ''\n            : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)));\n}\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template);\n *     // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template, 2);\n *     // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinat
 e} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n *     that will be replaced by first and second coordinate values.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, opt_fractionDigits) {\n    if (coordinate) {\n        return template\n            .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))\n            .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));\n    }\n    else {\n        return '';\n    }\n}\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n    var equals = true;\n    for (var i = coordinate1.length - 1; i >= 0; --i) {\n        if (coordinate1[i] !
 = coordinate2[i]) {\n            equals = false;\n            break;\n        }\n    }\n    return equals;\n}\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n *     import {rotate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var rotateRadians = Math.PI / 2; // 90 degrees\n *     rotate(coord, rotateRadians);\n *     // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n    var cosAngle = Math.cos(angle);\n    var sinAngle = Math.sin(angle);\n    var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n    var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n    coordinate[0] = x;\n    coordinate[1] = y;\n    return coordinate;\n}\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modif
 ied in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var scale = 1.2;\n *     scaleCoordinate(coord, scale);\n *     // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n    coordinate[0] *= scale;\n    coordinate[1] *= scale;\n    return coordinate;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n    var dx = coord1[0] - coord2[0];\n    var dy = coord1[1] - coord2[1];\n    return dx * dx + dy * dy;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {num
 ber} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n    return Math.sqrt(squaredDistance(coord1, coord2));\n}\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n    return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord);\n *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\
 n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord, 1);\n *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, opt_fractionDigits) {\n    if (coordinate) {\n        return (degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) +\n            ' ' +\n            degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits));\n    }\n    else {\n        return '';\n    }\n}\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStr
 ingXY(coord);\n *     // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord, 1);\n *     // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, opt_fractionDigits) {\n    return format(coordinate, '{x}, {y}', opt_fractionDigits);\n}\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport fun
 ction wrapX(coordinate, projection) {\n    var worldWidth = getWidth(projection.getExtent());\n    var worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n    if (worldsAway) {\n        coordinate[0] -= worldsAway * worldWidth;\n    }\n    return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number=} opt_sourceExtentWidth Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {\n    var projectionExtent = projection.getExtent();\n    var worldsAway = 0;\n    if (projection.canWrapX() &&\n        (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) {\n        var sourceExtentWidth = opt_sourceExtentWidth || getWidth(projectionExtent);\n        worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth);\n    }\n    r
 eturn worldsAway;\n}\n//# sourceMappingURL=coordinate.js.map","/**\n * @module ol/proj\n */\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom bu
 ild to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not su
 pport projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection} object for the new projection and add it with\n * {@link module:ol/proj~addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj~addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection} with\n * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport Projection from './proj/Projection.js';\nimport Units, { MET
 ERS_PER_UNIT } from './proj/Units.js';\nimport { PROJECTIONS as EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326, } from './proj/epsg3857.js';\nimport { PROJECTIONS as EPSG4326_PROJECTIONS } from './proj/epsg4326.js';\nimport { add as addProj, clear as clearProj, get as getProj, } from './proj/projections.js';\nimport { add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc, } from './proj/transforms.js';\nimport { applyTransform, getWidth } from './extent.js';\nimport { clamp, modulo } from './math.js';\nimport { getDistance } from './sphere.js';\nimport { getWorldsAway } from './coordinate.js';\n/**\n * A projection as {@link module:ol/proj/Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordi
 nate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array<number>, Array<number>=, number=): Array<number>} TransformFunction\n * @api\n */\nexport { METERS_PER_UNIT };\nexport { Projection };\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n *     values).\n */\nexport function cloneTransform(input, opt_output, opt_dimension) {\n    var output;\n    if (opt_output !== undefined) {\n        for (var i = 0, ii = input.length; i < ii; ++i) {\n            opt_output[i] = input[i];\n        }\n        output = opt_output;\n    }\n    else {\n        output = input.slice();\n    }\n    return output;\n}\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate
  values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n    if (opt_output !== undefined && input !== opt_output) {\n        for (var i = 0, ii = input.length; i < ii; ++i) {\n            opt_output[i] = input[i];\n        }\n        input = opt_output;\n    }\n    return input;\n}\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n    addProj(projection.getCode(), projection);\n    addTransformFunc(projection, projection, cloneTransform);\n}\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n    projections.forEach(addProjection);\n}\n/**\n * Fetches a Projection object for the code specified.\n 
 *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n    return typeof projectionLike === 'string'\n        ? getProj(/** @type {string} */ (projectionLike))\n        : /** @type {Projection} */ (projectionLike) || null;\n}\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the 'point' pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointRes
 olution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").default=} opt_units Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n    projection = get(projection);\n    var pointResolution;\n    var getter = projection.getPointResolutionFunc();\n    if (getter) {\n        pointResolution = getter(resolution, point);\n        if (opt_units && opt_units !== projection.getUnits()) {\n            var metersPerUnit = projec
 tion.getMetersPerUnit();\n            if (metersPerUnit) {\n                pointResolution =\n                    (pointResolution * metersPerUnit) / METERS_PER_UNIT[opt_units];\n            }\n        }\n    }\n    else {\n        var units = projection.getUnits();\n        if ((units == Units.DEGREES && !opt_units) || opt_units == Units.DEGREES) {\n            pointResolution = resolution;\n        }\n        else {\n            // Estimate point resolution by transforming the center pixel to EPSG:4326,\n            // measuring its width and height on the normal sphere, and taking the\n            // average of the width and height.\n            var toEPSG4326_1 = getTransformFromProjections(projection, get('EPSG:4326'));\n            var vertices = [\n                point[0] - resolution / 2,\n                point[1],\n                point[0] + resolution / 2,\n                point[1],\n                point[0],\n                point[1] - resolution / 2,\n                p
 oint[0],\n                point[1] + resolution / 2,\n            ];\n            vertices = toEPSG4326_1(vertices, vertices, 2);\n            var width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n            var height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n            pointResolution = (width + height) / 2;\n            var metersPerUnit = opt_units\n                ? METERS_PER_UNIT[opt_units]\n                : projection.getMetersPerUnit();\n            if (metersPerUnit !== undefined) {\n                pointResolution /= metersPerUnit;\n            }\n        }\n    }\n    return pointResolution;\n}\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n    addProjections(projections);\n    projections.forEach(function (sou
 rce) {\n        projections.forEach(function (destination) {\n            if (source !== destination) {\n                addTransformFunc(source, destination, cloneTransform);\n            }\n        });\n    });\n}\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equal\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) {\n    projections1.forEach(function (projection1) {\n        projections2.forEach(functi
 on (projection2) {\n            addTransformFunc(projection1, projection2, forwardTransform);\n            addTransformFunc(projection2, projection1, inverseTransform);\n        });\n    });\n}\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n    clearProj();\n    clearTransformFuncs();\n}\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n    if (!projection) {\n        return get(defaultCode);\n    }\n    else if (typeof projection === 'string') {\n        return get(projection);\n    }\n    else {\n        return /** @type {Projection} */ (projection);\n    }\n}\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coo
 rdinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n    return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>=} opt_output Output.\n     * @param {number=} opt_dimension Dimension.\n     * @return {Array<number>} Output.\n     */\n    function (input, opt_output, opt_dimension) {\n        var length = input.length;\n        var dimension = opt_dimension !== undefined ? opt_dimension : 2;\n        var output = opt_output !== undefined ? opt_output : new Array(length);\n        for (var i = 0; i < length; i += dimension) {\n            var point = coordTransform([input[i], input[i + 1]]);\n            output[i] = point[0];\n            output[i + 1] = point[1];\n            for (var j = dimension - 1; j >= 2; --j) {\n                output[i + j] = input[i + j];\n            }\n        }\n        return output;\n   
  });\n}\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n *     function (that is, from the destinat
 ion projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n    var sourceProj = get(source);\n    var destProj = get(destination);\n    addTransformFunc(sourceProj, destProj, createTransformFromCoordinateTransform(forward));\n    addTransformFunc(destProj, sourceProj, createTransformFromCoordinateTransform(inverse));\n}\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike=} opt_projection Target projection. The\n *     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projec
 ted to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n    return transform(coordinate, 'EPSG:4326', opt_projection !== undefined ? opt_projection : 'EPSG:3857');\n}\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike=} opt_projection Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, opt_projection) {\n    var lonLat = transform(coordinate, opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');\n    var lon = lonLat[0];\n    if (lon < -180 || lon > 180) {\n        lonLat[0] = modulo(lon + 180, 360) - 180;\n    }\n    return lonLat;\n}\n/**\n * Checks if tw
 o projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n    if (projection1 === projection2) {\n        return true;\n    }\n    var equalUnits = projection1.getUnits() === projection2.getUnits();\n    if (projection1.getCode() === projection2.getCode()) {\n        return equalUnits;\n    }\n    else {\n        var transformFunc = getTransformFromProjections(projection1, projection2);\n        return transformFunc === cloneTransform && equalUnits;\n    }\n}\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Pro
 jection object.\n * @param {Projection} destinationProjection Destination Projection\n *     object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(sourceProjection, destinationProjection) {\n    var sourceCode = sourceProjection.getCode();\n    var destinationCode = destinationProjection.getCode();\n    var transformFunc = getTransformFunc(sourceCode, destinationCode);\n    if (!transformFunc) {\n        transformFunc = identityTransform;\n    }\n    return transformFunc;\n}\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n    var sourceProjection = get(source);\n    var destinationP
 rojection = get(destination);\n    return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj~transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n    var transformFunc = getTransform(source, destination);\n    return transformFunc(coordinate, undefined, coordinate.length);\n}\n/**\n * Transforms an extent from source projecti
 on to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number=} opt_stops Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, opt_stops) {\n    var transformFunc = getTransform(source, destination);\n    return applyTransform(extent, transformFunc, undefined, opt_stops);\n}\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @retur
 n {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(point, sourceProjection, destinationProjection) {\n    var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection);\n    return transformFunc(point);\n}\n/**\n * @type {?Projection}\n */\nvar userProjection = null;\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @param {ProjectionLike} projection The user projection.\n */\nexport function setUserProjection(projection) {\n    userProjection = get(projection);\n}\n/**\n * Clear the user projection if set.  Note that this method is not yet a part of\n * the stable API.  Support for user projections is not yet complete and should\n * be considered experimental.\n */\nexport function clearUserProjection() {\n    userPr
 ojection = null;\n}\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @returns {?Projection} The user projection (or null if not set).\n */\nexport function getUserProjection() {\n    return userProjection;\n}\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods.  Note that this\n * method is not yet a part of the stable API.  Support for user projections is\n * not yet complete and should be considered experimental.\n */\nexport function useGeographic() {\n    setUserProjection('EPSG:4326');\n}\n/**\n * Return a coordinate transformed into the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @returns 
 {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n    if (!userProjection) {\n        return coordinate;\n    }\n    return transform(coordinate, sourceProjection, userProjection);\n}\n/**\n * Return a coordinate transformed from the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n    if (!userProjection) {\n        return coordinate;\n    }\n    return transform(coordinate, userProjection, destProjection);\n}\n/**\n * Return an extent transformed into the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\
 n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @returns {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n    if (!userProjection) {\n        return extent;\n    }\n    return transformExtent(extent, sourceProjection, userProjection);\n}\n/**\n * Return an extent transformed from the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n    if (!userProjection) {\n        return extent;\n    }\n    return transformExtent(extent, userProjection, destProjection);\n}\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe
 \" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destiation).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destiation).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n    return function (coord) {\n        var sourceX = coord[0];\n        var sourceY = coord[1];\n        var transformed, worldsAway;\n        if (sourceProj.canWrapX()) {\n            var sourceExtent = sourceProj.getExtent();\n            var sourceExtentWidth = getWidth(sourceExtent);\n
             worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n            if (worldsAway) {\n                // Move x to the real world\n                sourceX = sourceX - worldsAway * sourceExtentWidth;\n            }\n            sourceX = clamp(sourceX, sourceExtent[0], sourceExtent[2]);\n            sourceY = clamp(sourceY, sourceExtent[1], sourceExtent[3]);\n            transformed = transform([sourceX, sourceY]);\n        }\n        else {\n            transformed = transform(coord);\n        }\n        if (worldsAway && destProj.canWrapX()) {\n            // Move transformed coordinate back to the offset world\n            transformed[0] += worldsAway * getWidth(destProj.getExtent());\n        }\n        return transformed;\n    };\n}\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n *
 /\nexport function addCommon() {\n    // Add transformations that don't alter coordinates to convert within set of\n    // projections with equal meaning.\n    addEquivalentProjections(EPSG3857_PROJECTIONS);\n    addEquivalentProjections(EPSG4326_PROJECTIONS);\n    // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n    // coordinates and back.\n    addEquivalentTransforms(EPSG4326_PROJECTIONS, EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326);\n}\naddCommon();\n//# sourceMappingURL=proj.js.map","/**\n * @module ol/geom/flat/transform\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(flatCoordinates, offset, end, stride, transform,
  opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var x = flatCoordinates[j];\n        var y = flatCoordinates[j + 1];\n        dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n        dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var cos = Math.cos(angle);\n    var sin = Math.sin(
 angle);\n    var anchorX = anchor[0];\n    var anchorY = anchor[1];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var deltaX = flatCoordinates[j] - anchorX;\n        var deltaY = flatCoordinates[j + 1] - anchorY;\n        dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n        dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Arra
 y<number>} Transformed coordinates.\n */\nexport function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var anchorX = anchor[0];\n    var anchorY = anchor[1];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var deltaX = flatCoordinates[j] - anchorX;\n        var deltaY = flatCoordinates[j + 1] - anchorY;\n        dest[i++] = anchorX + sx * deltaX;\n        dest[i++] = anchorY + sy * deltaY;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>=} opt_dest Destination.\n * @r
 eturn {Array<number>} Transformed coordinates.\n */\nexport function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        dest[i++] = flatCoordinates[j] + deltaX;\n        dest[i++] = flatCoordinates[j + 1] + deltaY;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n//# sourceMappingURL=transform.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    retur
 n function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createEmpty, createOrUpdateEmpty, getHeight, returnOrUpdate, } from '../extent.js';\nimport { get as getProjection, getTransform } from '../proj.js';\nimport { memoizeOne } from '../functions.js';\nimport { transform2D } from './flat/transform.js';\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notif
 ied of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nvar Geometry = /** @class */ (function (_super) {\n    __extends(Geometry, _super);\n    function Geometry() {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.extent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.extentRevision_ = -1;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.simplifiedGeometryRevision = 0;\n        /**\n         * Get a transformed and simplified version of the geometry.\n         * @abstract\n         * @param {number} revision The geometry revision.\n         * @par
 am {number} squaredTolerance Squared tolerance.\n         * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n         * @return {Geometry} Simplified geometry.\n         */\n        _this.simplifyTransformedInternal = memoizeOne(function (revision, squaredTolerance, opt_transform) {\n            if (!opt_transform) {\n                return this.getSimplifiedGeometry(squaredTolerance);\n            }\n            var clone = this.clone();\n            clone.applyTransform(opt_transform);\n            return clone.getSimplifiedGeometry(squaredTolerance);\n        });\n        return _this;\n    }\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {Geometry} Simplified geometry.\n     */\n    Geometry.prototype.simplifyTr
 ansformed = function (squaredTolerance, opt_transform) {\n        return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, opt_transform);\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @abstract\n     * @return {!Geometry} Clone.\n     */\n    Geometry.prototype.clone = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Geometry.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        return abstract();\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Geometry.prototype.containsXY = function (x, y) {\n        var coord = this.ge
 tClosestPoint([x, y]);\n        return coord[0] === x && coord[1] === y;\n    };\n    /**\n     * Return the closest point of the geometry to the passed point as\n     * {@link module:ol/coordinate~Coordinate coordinate}.\n     * @param {import(\"../coordinate.js\").Coordinate} point Point.\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_closestPoint Closest point.\n     * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n     * @api\n     */\n    Geometry.prototype.getClosestPoint = function (point, opt_closestPoint) {\n        var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n        this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n        return closestPoint;\n    };\n    /**\n     * Returns true if this geometry includes the specified coordinate. If the\n     * coordinate is on the boundary of the geometry, returns false.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @ret
 urn {boolean} Contains coordinate.\n     * @api\n     */\n    Geometry.prototype.intersectsCoordinate = function (coordinate) {\n        return this.containsXY(coordinate[0], coordinate[1]);\n    };\n    /**\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Geometry.prototype.computeExtent = function (extent) {\n        return abstract();\n    };\n    /**\n     * Get the extent of the geometry.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    Geometry.prototype.getExtent = function (opt_extent) {\n        if (this.extentRevision_ != this.getRevision()) {\n            var extent = this.computeExtent(this.extent_);\n            if (isNaN(extent[0]) || isNaN(extent[1])) {\n                createOrUpdateEmpty(extent);\n            }\n            thi
 s.extentRevision_ = this.getRevision();\n        }\n        return returnOrUpdate(this.extent_, opt_extent);\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    Geometry.prototype.rotate = function (angle, anchor) {\n        abstract();\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    Geometry.prototype.sc
 ale = function (sx, opt_sy, opt_anchor) {\n        abstract();\n    };\n    /**\n     * Create a simplified version of this geometry.  For linestrings, this uses\n     * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n     * algorithm.  For polygons, a quantization-based\n     * simplification is used to preserve topology.\n     * @param {number} tolerance The tolerance distance for simplification.\n     * @return {Geometry} A new, simplified version of the original geometry.\n     * @api\n     */\n    Geometry.prototype.simplify = function (tolerance) {\n        return this.getSimplifiedGeometry(tolerance * tolerance);\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker\n     * algorithm.\n     * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {Geometry} Simplified geometry.\n     */\n    G
 eometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        return abstract();\n    };\n    /**\n     * Get the type of this geometry.\n     * @abstract\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     */\n    Geometry.prototype.getType = function () {\n        return abstract();\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @abstract\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     */\n    Geometry.prototype.applyTransform = function (transformFn) {\n        abstract();\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} e
 xtent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     */\n    Geometry.prototype.intersectsExtent = function (extent) {\n        return abstract();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @abstract\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    Geometry.prototype.translate = function (deltaX, deltaY) {\n        abstract();\n    };\n    /**\n     * Transform each coordinate of the geometry from one coordinate reference\n     * system to another. The geometry is modified in place.\n     * For example, a line will be transformed to a line and a circle to a circle.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     *\n     * @param {import(\"../proj.js\").ProjectionL
 ike} source The current projection.  Can be a\n     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n     * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n     * @return {Geometry} This geometry.  Note that original geometry is\n     *     modified in place.\n     * @api\n     */\n    Geometry.prototype.transform = function (source, destination) {\n        /** @type {import(\"../proj/Projection.js\").default} */\n        var sourceProj = getProjection(source);\n        var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS\n            ? function (inCoordinates, outCoordinates, stride) {\n                var pixelExtent = sourceProj.getExtent();\n                var projectedExtent = sourceProj.getWorldExtent();\n                var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n                c
 omposeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n                transform2D(inCoordinates, 0, inCoordinates.length, stride, tmpTransform, outCoordinates);\n                return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n            }\n            : getTransform(sourceProj, destination);\n        this.applyTransform(transformFn);\n        return this;\n    };\n    return Geometry;\n}(BaseObject));\nexport default Geometry;\n//# sourceMappingURL=Geometry.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n     
    function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport { abstract } from '../util.js';\nimport { createOrUpdateFromFlatCoordinates, getCenter } from '../extent.js';\nimport { rotate, scale, transform2D, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nvar SimpleGeometry = /** @class */ (function (_super) {\n    __extends(SimpleGeometry, _super);\n    function SimpleGeometry() {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"./GeometryLayout.js\").default}\n         */\n        _this.layout = GeometryLayout.XY;\n        /**\n  
        * @protected\n         * @type {number}\n         */\n        _this.stride = 2;\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        _this.flatCoordinates = null;\n        return _this;\n    }\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    SimpleGeometry.prototype.computeExtent = function (extent) {\n        return createOrUpdateFromFlatCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    };\n    /**\n     * @abstract\n     * @return {Array<*>} Coordinates.\n     */\n    SimpleGeometry.prototype.getCoordinates = function () {\n        return abstract();\n    };\n    /**\n     * Return the first coordinate of the geometry.\n     * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n     * @api\n     */\n    SimpleGeometry.prototype.getFirstCoordinate = function
  () {\n        return this.flatCoordinates.slice(0, this.stride);\n    };\n    /**\n     * @return {Array<number>} Flat coordinates.\n     */\n    SimpleGeometry.prototype.getFlatCoordinates = function () {\n        return this.flatCoordinates;\n    };\n    /**\n     * Return the last coordinate of the geometry.\n     * @return {import(\"../coordinate.js\").Coordinate} Last point.\n     * @api\n     */\n    SimpleGeometry.prototype.getLastCoordinate = function () {\n        return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n    };\n    /**\n     * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n     * @return {import(\"./GeometryLayout.js\").default} Layout.\n     * @api\n     */\n    SimpleGeometry.prototype.getLayout = function () {\n        return this.layout;\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n     * @param {number} squaredTolerance Squared tolerance.\n 
     * @return {SimpleGeometry} Simplified geometry.\n     */\n    SimpleGeometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        if (this.simplifiedGeometryRevision !== this.getRevision()) {\n            this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n            this.simplifiedGeometryRevision = this.getRevision();\n        }\n        // If squaredTolerance is negative or if we know that simplification will not\n        // have any effect then just return this.\n        if (squaredTolerance < 0 ||\n            (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n                squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {\n            return this;\n        }\n        var simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance);\n        var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n        if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n            return si
 mplifiedGeometry;\n        }\n        else {\n            // Simplification did not actually remove any coordinates.  We now know\n            // that any calls to getSimplifiedGeometry with a squaredTolerance less\n            // than or equal to the current squaredTolerance will also not have any\n            // effect.  This allows us to short circuit simplification (saving CPU\n            // cycles) and prevents the cache of simplified geometries from filling\n            // up with useless identical copies of this geometry (saving memory).\n            this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n            return this;\n        }\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {SimpleGeometry} Simplified geometry.\n     * @protected\n     */\n    SimpleGeometry.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        return this;\n    };\n    /**\n     * @return {number} Stride.\n     
 */\n    SimpleGeometry.prototype.getStride = function () {\n        return this.stride;\n    };\n    /**\n     * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     */\n    SimpleGeometry.prototype.setFlatCoordinates = function (layout, flatCoordinates) {\n        this.stride = getStrideForLayout(layout);\n        this.layout = layout;\n        this.flatCoordinates = flatCoordinates;\n    };\n    /**\n     * @abstract\n     * @param {!Array<*>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    SimpleGeometry.prototype.setCoordinates = function (coordinates, opt_layout) {\n        abstract();\n    };\n    /**\n     * @param {import(\"./GeometryLayout.js\").default|undefined} layout Layout.\n     * @param {Array<*>} coordinates Coordinates.\n     * @param {number} nesting Nesting.\n     * @protected\n     */\n    SimpleGeometry.prototype.
 setLayout = function (layout, coordinates, nesting) {\n        /** @type {number} */\n        var stride;\n        if (layout) {\n            stride = getStrideForLayout(layout);\n        }\n        else {\n            for (var i = 0; i < nesting; ++i) {\n                if (coordinates.length === 0) {\n                    this.layout = GeometryLayout.XY;\n                    this.stride = 2;\n                    return;\n                }\n                else {\n                    coordinates = /** @type {Array} */ (coordinates[0]);\n                }\n            }\n            stride = coordinates.length;\n            layout = getLayoutForStride(stride);\n        }\n        this.layout = layout;\n        this.stride = stride;\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone
 .\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     * @api\n     */\n    SimpleGeometry.prototype.applyTransform = function (transformFn) {\n        if (this.flatCoordinates) {\n            transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n            this.changed();\n        }\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    SimpleGeometry.prototype.rotate = function (angle, anchor) {\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            rotate(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinat
 es);\n            this.changed();\n        }\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    SimpleGeometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        var sy = opt_sy;\n        if (sy === undefined) {\n            sy = sx;\n        }\n        var anchor = opt_anchor;\n        if (!anchor) {\n            anchor = getCenter(this.getExtent());\n        }\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            scale(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, a
 nchor, flatCoordinates);\n            this.changed();\n        }\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    SimpleGeometry.prototype.translate = function (deltaX, deltaY) {\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            translate(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates);\n            this.changed();\n        }\n    };\n    return SimpleGeometry;\n}(Geometry));\n/**\n * @param {number} stride Stride.\n * @return {import(\"./GeometryLayout.js\").default} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n    var layout;\n    if (stride == 2) {\n        layout = GeometryLayout.XY;\n    }\n    else if 
 (stride == 3) {\n        layout = GeometryLayout.XYZ;\n    }\n    else if (stride == 4) {\n        layout = GeometryLayout.XYZM;\n    }\n    return /** @type {import(\"./GeometryLayout.js\").default} */ (layout);\n}\n/**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n    var stride;\n    if (layout == GeometryLayout.XY) {\n        stride = 2;\n    }\n    else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n        stride = 3;\n    }\n    else if (layout == GeometryLayout.XYZM) {\n        stride = 4;\n    }\n    return /** @type {number} */ (stride);\n}\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_d
 est) {\n    var flatCoordinates = simpleGeometry.getFlatCoordinates();\n    if (!flatCoordinates) {\n        return null;\n    }\n    else {\n        var stride = simpleGeometry.getStride();\n        return transform2D(flatCoordinates, 0, flatCoordinates.length, stride, transform, opt_dest);\n    }\n}\nexport default SimpleGeometry;\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport { lerp, squaredDistance as squaredDx } from '../../math.js';\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(flatCo
 ordinates, offset1, offset2, stride, x, y, closestPoint) {\n    var x1 = flatCoordinates[offset1];\n    var y1 = flatCoordinates[offset1 + 1];\n    var dx = flatCoordinates[offset2] - x1;\n    var dy = flatCoordinates[offset2 + 1] - y1;\n    var offset;\n    if (dx === 0 && dy === 0) {\n        offset = offset1;\n    }\n    else {\n        var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            offset = offset2;\n        }\n        else if (t > 0) {\n            for (var i = 0; i < stride; ++i) {\n                closestPoint[i] = lerp(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t);\n            }\n            closestPoint.length = stride;\n            return;\n        }\n        else {\n            offset = offset1;\n        }\n    }\n    for (var i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[offset + i];\n    }\n    closestPoint.length = stride;\n}\n/**\n * Return the squared of the largest distance b
 etween any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    for (offset += stride; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        var squaredDelta = squaredDx(x1, y1, x2, y2);\n        if (squaredDelta > max) {\n            max = squaredDelta;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number
 } max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n        offset = end;\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n        offset = ends[ends.length - 1];\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoord
 inates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    if (offset == end) {\n        return minSquaredDistance;\n    }\n    var i, squaredDistance;\n    if (maxDelta === 0) {\n        // All points are identical, so just test the first point.\n        squaredDistance = squaredDx(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n        if (squaredDistance < minSquaredDistance) {\n            for 
 (i = 0; i < stride; ++i) {\n                closestPoint[i] = flatCoordinates[offset + i];\n            }\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    }\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    var index = offset + stride;\n    while (index < end) {\n        assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n        squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = tmpPoint[i];\n            }\n            closestPoint.length = stride;\n            index += stride;\n        }\n        else {\n            // Skip ahead multiple points, because we know that all the skipped\n            // points cannot be any closer than the 
 closest point we have found so\n            // far.  We know this because we know how close the current point is, how\n            // close the closest point we have found so far is, and the maximum\n            // distance between consecutive points.  For example, if we're currently\n            // at distance 10, the best we've found so far is 3, and that the maximum\n            // distance between consecutive points is 2, then we'll need to skip at\n            // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n            // finding a closer point.  We use Math.max(..., 1) to ensure that we\n            // always advance at least one point, to avoid an infinite loop.\n            index +=\n                stride *\n                    Math.max(((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n                        maxDelta) |\n                        0, 1);\n        }\n    }\n    if (isRing) {\n        // Check the closing segment.\n       
  assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n        squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = tmpPoint[i];\n            }\n            closestPoint.length = stride;\n        }\n    }\n    return minSquaredDistance;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nex
 port function assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        minSquaredDistance = assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = end;\n    }\n    return minSquaredDistance;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary 
 point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        minSquaredDistance = assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = ends[ends.length - 1];\n    }\n    return minSquaredDistance;\n}\n//# sourceMappingURL=closest.js.map","/**\n * @module ol/geom/flat/deflate\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoo
 rdinates, offset, coordinate, stride) {\n    for (var i = 0, ii = coordinate.length; i < ii; ++i) {\n        flatCoordinates[offset++] = coordinate[i];\n    }\n    return offset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(flatCoordinates, offset, coordinates, stride) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        var coordinate = coordinates[i];\n        for (var j = 0; j < stride; ++j) {\n            flatCoordinates[offset++] = coordinate[j];\n        }\n    }\n    return offset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stri
 de Stride.\n * @param {Array<number>=} opt_ends Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {\n    var ends = opt_ends ? opt_ends : [];\n    var i = 0;\n    for (var j = 0, jj = coordinatess.length; j < jj; ++j) {\n        var end = deflateCoordinates(flatCoordinates, offset, coordinatess[j], stride);\n        ends[i++] = end;\n        offset = end;\n    }\n    ends.length = i;\n    return ends;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>=} opt_endss Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) {\n    var endss = opt_endss ? opt_endss : [];\n  
   var i = 0;\n    for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {\n        var ends = deflateCoordinatesArray(flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n        endss[i++] = ends;\n        offset = ends[ends.length - 1];\n    }\n    endss.length = i;\n    return endss;\n}\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       document
 ation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\nimport { squaredDistance, squaredSegmentDistance } from '../../math.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coo
 rdinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n    var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined\n        ? opt_simplifiedFlatCoordinates\n        : [];\n    if (!highQuality) {\n        end = radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        flatCoordinates = simplifiedFlatCoordinates;\n        offset = 0;\n        stride = 2;\n    }\n    simplifiedFlatCoordinates.length = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance,
  simplifiedFlatCoordinates, 0);\n    return simplifiedFlatCoordinates;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    var n = (end - offset) / stride;\n    if (n < 3) {\n        for (; offset < end; offset += stride) {\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    /** @type {Array<num
 ber>} */\n    var markers = new Array(n);\n    markers[0] = 1;\n    markers[n - 1] = 1;\n    /** @type {Array<number>} */\n    var stack = [offset, end - stride];\n    var index = 0;\n    while (stack.length > 0) {\n        var last = stack.pop();\n        var first = stack.pop();\n        var maxSquaredDistance = 0;\n        var x1 = flatCoordinates[first];\n        var y1 = flatCoordinates[first + 1];\n        var x2 = flatCoordinates[last];\n        var y2 = flatCoordinates[last + 1];\n        for (var i = first + stride; i < last; i += stride) {\n            var x = flatCoordinates[i];\n            var y = flatCoordinates[i + 1];\n            var squaredDistance_1 = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n            if (squaredDistance_1 > maxSquaredDistance) {\n                index = i;\n                maxSquaredDistance = squaredDistance_1;\n            }\n        }\n        if (maxSquaredDistance > squaredTolerance) {\n            markers[(index - offset) / stride] 
 = 1;\n            if (first + stride < index) {\n                stack.push(first, index);\n            }\n            if (index + stride < last) {\n                stack.push(index, last);\n            }\n        }\n    }\n    for (var i = 0; i < n; ++i) {\n        if (markers[i]) {\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + i * stride];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + i * stride + 1];\n        }\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplif
 ied ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        simplifiedOffset = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified e
 ndss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(flatCoordinates, offset, endss, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        var simplifiedEnds = [];\n        simplifiedOffset = douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n
  * @return {number} Simplified offset.\n */\nexport function radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    if (end <= offset + stride) {\n        // zero or one point, no simplification possible, so copy and return\n        for (; offset < end; offset += stride) {\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    // copy first point\n    simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n    var x2 = x1;\n    var y2 = y1;\n    for (offset += stride; offset < end; offset += stride) {\n        x2 = flatCoordinates[offset];\n        y2 = flatCoordinates[offset + 1];\n        
 if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n            // copy point at offset\n            simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n            simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n            x1 = x2;\n            y1 = y2;\n        }\n    }\n    if (x2 != x1 || y2 != y1) {\n        // copy last point\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n    return tolerance * Math.round(value / tolerance);\n}\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded.  This effectively preserves\n * topology as the simplification of 
 any subsection of a line string is\n * independent of the rest of the line string.  This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons.  This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    // do nothing if the line is empty\n    if (offset == end) {\n        return simplifiedOffset;\n    }\n    // snap the first coordin
 ate (P1)\n    var x1 = snap(flatCoordinates[offset], tolerance);\n    var y1 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    // add the first coordinate to the output\n    simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n    // find the next coordinate that does not snap to the same value as the first\n    // coordinate (P2)\n    var x2, y2;\n    do {\n        x2 = snap(flatCoordinates[offset], tolerance);\n        y2 = snap(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        if (offset == end) {\n            // all coordinates snap to the same value, the line collapses to a point\n            // push the last snapped value anyway to ensure that the output contains\n            // at least two points\n            // FIXME should we really return at least two points anyway?\n            simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n            simplifiedFlatCoordin
 ates[simplifiedOffset++] = y2;\n            return simplifiedOffset;\n        }\n    } while (x2 == x1 && y2 == y1);\n    while (offset < end) {\n        // snap the next coordinate (P3)\n        var x3 = snap(flatCoordinates[offset], tolerance);\n        var y3 = snap(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        // skip P3 if it is equal to P2\n        if (x3 == x2 && y3 == y2) {\n            continue;\n        }\n        // calculate the delta between P1 and P2\n        var dx1 = x2 - x1;\n        var dy1 = y2 - y1;\n        // calculate the delta between P3 and P1\n        var dx2 = x3 - x1;\n        var dy2 = y3 - y1;\n        // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n        // P1 in the same direction then P2 is on the straight line between P1 and\n        // P3\n        if (dx1 * dy2 == dy1 * dx2 &&\n            ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n            ((dy1 < 0 && dy2 <
  dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {\n            // discard P2 and set P2 = P3\n            x2 = x3;\n            y2 = y3;\n            continue;\n        }\n        // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n        // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n        // and continue with P1 = P2 and P2 = P3\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n        x1 = x2;\n        y1 = y2;\n        x2 = x3;\n        y2 = y3;\n    }\n    // add the last point (P2)\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Arra
 y<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        simplifiedOffset = quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n
  *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(flatCoordinates, offset, endss, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        var simplifiedEnds = [];\n        simplifiedOffset = quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n//# sourceMappingURL=simplify.js.map","/**\n * @module ol/geom/flat/inflate\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @para
 m {Array<import(\"../../coordinate.js\").Coordinate>=} opt_coordinates Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {\n    var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        coordinates[i++] = flatCoordinates.slice(j, j + stride);\n    }\n    coordinates.length = i;\n    return coordinates;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>=} opt_coordinatess Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {
 \n    var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n    var i = 0;\n    for (var j = 0, jj = ends.length; j < jj; ++j) {\n        var end = ends[j];\n        coordinatess[i++] = inflateCoordinates(flatCoordinates, offset, end, stride, coordinatess[i]);\n        offset = end;\n    }\n    coordinatess.length = i;\n    return coordinatess;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>=} opt_coordinatesss\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {\n    var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n    var i = 0;\n    for (var j = 0
 , jj = endss.length; j < jj; ++j) {\n        var ends = endss[j];\n        coordinatesss[i++] = inflateCoordinatesArray(flatCoordinates, offset, ends, stride, coordinatesss[i]);\n        offset = ends[ends.length - 1];\n    }\n    coordinatesss.length = i;\n    return coordinatesss;\n}\n//# sourceMappingURL=inflate.js.map","/**\n * @module ol/geom/flat/area\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n    var twiceArea = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        twiceArea += y1 * x2 - x1 * y2;\n        x1 = x2;\n        y1 = y2;\n    }\n    return twiceArea / 2;\n}
 \n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n    var area = 0;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        area += linearRing(flatCoordinates, offset, end, stride);\n        offset = end;\n    }\n    return area;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n    var area = 0;\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        area += linearRings(flatCoordinates, offset, ends, stride);\n        offset = ends[ends.length - 1];\
 n    }\n    return area;\n}\n//# sourceMappingURL=area.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/LinearRing\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { def
 lateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { linearRing as linearRingArea } from './flat/area.js';\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nvar LinearRing = /** @class */ (function (_super) {\n    __extends(LinearRing, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function LinearRing(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {numbe
 r}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!LinearRing} Clone.\n     * @api\n     */\n    LinearRing.prototype.clone = function () {\n        return new LinearRing(this.flatCoordinates.slice(), this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    LinearRing.prototype.
 closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Return the area of the linear ring on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    LinearRing.prototype.getArea = function () {\n        return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the coordinates of the linear rin
 g.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    LinearRing.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LinearRing} Simplified LinearRing.\n     * @protected\n     */\n    LinearRing.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    LinearRing.prototype.getType = functi
 on () {\n        return GeometryType.LINEAR_RING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    LinearRing.prototype.intersectsExtent = function (extent) {\n        return false;\n    };\n    /**\n     * Set the coordinates of the linear ring.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    LinearRing.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\
 n    return LinearRing;\n}(SimpleGeometry));\nexport default LinearRing;\n//# sourceMappingURL=LinearRing.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Point\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { containsXY, createOrUpdateFromCoordinate } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { squaredDis
 tance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nvar Point = /** @class */ (function (_super) {\n    __extends(Point, _super);\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function Point(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        _this.setCoordinates(coordinates, opt_layout);\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Point} Clone.\n     * @api\n     */\n    Point.prototype.clone = function () {\n        var point = new Point(this.flatCoordinates.slice(), this.layout);\n        return point;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum s
 quared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Point.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        var flatCoordinates = this.flatCoordinates;\n        var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);\n        if (squaredDistance < minSquaredDistance) {\n            var stride = this.stride;\n            for (var i = 0; i < stride; ++i) {\n                closestPoint[i] = flatCoordinates[i];\n            }\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    };\n    /**\n     * Return the coordinate of the point.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n     * @api\n     */\n    Point.prototype.getCoordinates = function () {\n        return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n    };\n    /**\n     * @param {import(
 \"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Point.prototype.computeExtent = function (extent) {\n        return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Point.prototype.getType = function () {\n        return GeometryType.POINT;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Point.prototype.intersectsExtent = function (extent) {\n        return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n    };\n    /**\n     * @param {!Array<*>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\
 ").default=} opt_layout Layout.\n     * @api\n     */\n    Point.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 0);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinate(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return Point;\n}(SimpleGeometry));\nexport default Point;\n//# sourceMappingURL=Point.js.map","/**\n * @module ol/geom/flat/contains\n */\nimport { forEachCorner } from '../../extent.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {\n    var outside = forEachCor
 ner(extent, \n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */\n    function (coordinate) {\n        return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n    });\n    return !outside;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) {\n    // http://geomalgorithms.com/a03-_inclusion.html\n    // Copyright 2000 softSurfer, 2012 Dan Sunday\n    // This code may be freely used and modified for any purpose\n    // providing that this copyright notice is included with it.\n    // SoftSurfer makes no warranty for this code, and cannot be held\n    // liable for 
 any real or imagined damage resulting from its use.\n    // Users of this code must verify correctness for their application.\n    var wn = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        if (y1 <= y) {\n            if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n                wn++;\n            }\n        }\n        else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n            wn--;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    return wn !== 0;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRing
 sContainsXY(flatCoordinates, offset, ends, stride, x, y) {\n    if (ends.length === 0) {\n        return false;\n    }\n    if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n        return false;\n    }\n    for (var i = 1, ii = ends.length; i < ii; ++i) {\n        if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {\n    if (endss.length === 0) {\n        return false;\n    }\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (linearRingsContainsXY(flatCoordi
 nates, offset, ends, stride, x, y)) {\n            return true;\n        }\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport { linearRingsContainsXY } from './contains.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */
 \nexport function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) {\n    var i, ii, x, x1, x2, y1, y2;\n    var y = flatCenters[flatCentersOffset + 1];\n    /** @type {Array<number>} */\n    var intersections = [];\n    // Calculate intersections with the horizontal line\n    for (var r = 0, rr = ends.length; r < rr; ++r) {\n        var end = ends[r];\n        x1 = flatCoordinates[end - stride];\n        y1 = flatCoordinates[end - stride + 1];\n        for (i = offset; i < end; i += stride) {\n            x2 = flatCoordinates[i];\n            y2 = flatCoordinates[i + 1];\n            if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n                x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n                intersections.push(x);\n            }\n            x1 = x2;\n            y1 = y2;\n        }\n    }\n    // Find the longest segment of the horizontal line that has its center point\n    // inside the linear ring.\n   
  var pointX = NaN;\n    var maxSegmentLength = -Infinity;\n    intersections.sort(numberSafeCompareFunction);\n    x1 = intersections[0];\n    for (i = 1, ii = intersections.length; i < ii; ++i) {\n        x2 = intersections[i];\n        var segmentLength = Math.abs(x2 - x1);\n        if (segmentLength > maxSegmentLength) {\n            x = (x1 + x2) / 2;\n            if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n                pointX = x;\n                maxSegmentLength = segmentLength;\n            }\n        }\n        x1 = x2;\n    }\n    if (isNaN(pointX)) {\n        // There is no horizontal line that has its center point inside the linear\n        // ring.  Use the center of the the linear ring's extent.\n        pointX = flatCenters[flatCentersOffset];\n    }\n    if (opt_dest) {\n        opt_dest.push(pointX, y, maxSegmentLength);\n        return opt_dest;\n    }\n    else {\n        return [pointX, y, maxSegmentLength];\n    }\n}\n/**\n * @p
 aram {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) {\n    var interiorPoints = [];\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        interiorPoints = getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n        offset = ends[ends.length - 1];\n    }\n    return interiorPoints;\n}\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/geom/flat/segments\n */\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback r
 eturns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n    var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n    var point2 = [];\n    var ret;\n    for (; offset + stride < end; offset += stride) {\n        point2[0] = flatCoordinates[offset + stride];\n        point2[1] = flatCoordinates[offset + stride + 1];\n        ret = callback(point1, point2);\n        if (ret) {\n            return ret;\n        }\n        point1[0] = point2[0];\n        point1[1] = point2
 [1];\n    }\n    return false;\n}\n//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport { containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment, } from '../../extent.js';\nimport { forEach as forEachSegment } from './segments.js';\nimport { linearRingContainsExtent, linearRingContainsXY } from './contains.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(flatCoordinates, offset, end, stride, extent) {\n    var coordinatesExtent = extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);\n    if (!intersects(extent, coordinatesExtent)) {\n        return false;\n    }\n    if (containsExtent(extent, coordi
 natesExtent)) {\n        return true;\n    }\n    if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n        return true;\n    }\n    if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n        return true;\n    }\n    return forEachSegment(flatCoordinates, offset, end, stride, \n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n     * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function (point1, point2) {\n        return intersectsSegment(extent, point1, point2);\n    });\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geomet
 ry and the extent intersect.\n */\nexport function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        if (intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)) {\n            return true;\n        }\n        offset = ends[i];\n    }\n    return false;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {\n    if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {\n        return true;\n    }\n    if (linearRing
 ContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {\n        return true;\n    }\n    return false;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {\n    if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n        return false;\n    }\n    if (ends.length === 1) {\n        return true;\n    }\n    for (var i = 1, ii = ends.length; i < ii; ++i) 
 {\n        if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n            if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)) {\n            return true;\n        }\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n//# sourceMapping
 URL=intersectsextent.js.map","/**\n * @module ol/geom/flat/reverse\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n    while (offset < end - stride) {\n        for (var i = 0; i < stride; ++i) {\n            var tmp = flatCoordinates[offset + i];\n            flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n            flatCoordinates[end - stride + i] = tmp;\n        }\n        offset += stride;\n        end -= stride;\n    }\n}\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport { coordinates as reverseCoordinates } from './reverse.js';\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is c
 lockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n    // https://stackoverflow.com/a/1180256/2389327\n    // https://en.wikipedia.org/wiki/Curve_orientation#Orientation_of_a_simple_polygon\n    var firstVertexRepeated = true;\n    for (var i = 0; i < stride; ++i) {\n        if (flatCoordinates[offset + i] !== flatCoordinates[end - stride + i]) {\n            firstVertexRepeated = false;\n            break;\n        }\n    }\n    if (firstVertexRepeated) {\n        end -= stride;\n    }\n    var iMinVertex = findCornerVertex(flatCoordinates, offset, end, stride);\n    // Orientation matrix:\n    //     [ 1  xa  ya ]\n    // O = | 1  xb  yb |\n    //     [ 1  xc  yc ]\n    var iPreviousVertex = iMinVertex - stride;\
 n    if (iPreviousVertex < offset) {\n        iPreviousVertex = end - stride;\n    }\n    var iNextVertex = iMinVertex + stride;\n    if (iNextVertex >= end) {\n        iNextVertex = offset;\n    }\n    var aX = flatCoordinates[iPreviousVertex];\n    var aY = flatCoordinates[iPreviousVertex + 1];\n    var bX = flatCoordinates[iMinVertex];\n    var bY = flatCoordinates[iMinVertex + 1];\n    var cX = flatCoordinates[iNextVertex];\n    var cY = flatCoordinates[iNextVertex + 1];\n    var determinant = bX * cY + aX * bY + aY * cX - (aY * bX + bY * cX + aX * cY);\n    return determinant < 0;\n}\n// Find vertex along one edge of bounding box.\n// In this case, we find smallest y; in case of tie also smallest x.\nfunction findCornerVertex(flatCoordinates, offset, end, stride) {\n    var iMinVertex = -1;\n    var minY = Infinity;\n    var minXAtMinY = Infinity;\n    for (var i = offset; i < end; i += stride) {\n        var x = flatCoordinates[i];\n        var y = flatCoordinates[i + 1];\n   
      if (y > minY) {\n            continue;\n        }\n        if (y == minY) {\n            if (x >= minXAtMinY) {\n                continue;\n            }\n        }\n        // Minimum so far.\n        iMinVertex = i;\n        minY = y;\n        minXAtMinY = x;\n    }\n    return iMinVertex;\n}\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(flatCoordinates, offset, ends, stride,
  opt_right) {\n    var right = opt_right !== undefined ? opt_right : false;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n        if (i === 0) {\n            if ((right && isClockwise) || (!right && !isClockwise)) {\n                return false;\n            }\n        }\n        else {\n            if ((right && !isClockwise) || (!right && isClockwise)) {\n                return false;\n            }\n        }\n        offset = end;\n    }\n    return true;\n}\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexe
 s.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)) {\n            return false;\n        }\n        if (ends.length) {\n            offset = ends[ends.length - 1];\n        }\n    }\n    return true;\n}\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @p
 aram {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) {\n    var right = opt_right !== undefined ? opt_right : false;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n        var reverse = i === 0\n            ? (right && isClockwise) || (!right && !isClockwise)\n            : (right && !isClockwise) || (!right && isClockwise);\n        if (reverse) {\n            reverseCoordinates(flatCoordinates, offset, end, stride);\n        }\n        offset = end;\n    }\n    return offset;\n}\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exter
 ior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        offset = orientLinearRings(flatCoordinates, offset, endss[i], stride, opt_right);\n    }\n    return offset;\n}\n//# sourceMappingURL=orient.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n 
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Polygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY, getCenter } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray } from './flat/interiorpoint.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';
 \nimport { intersectsLinearRingArray } from './flat/intersectsextent.js';\nimport { linearRingsAreOriented, orientLinearRings } from './flat/orient.js';\nimport { linearRings as linearRingsArea } from './flat/area.js';\nimport { linearRingsContainsXY } from './flat/contains.js';\nimport { modulo } from '../math.js';\nimport { quantizeArray } from './flat/simplify.js';\nimport { offset as sphereOffset } from '../sphere.js';\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /** @class */ (function (_super) {\n    __extends(Polygon, _super);\n    /**\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n     *     Array of linear rings that define the polygon. The first linear ring of the\n     *     array defines the outer-boundary or surface of the polygon. Each subsequent\n     *     linear ring defines a hole in the surface of the polygon. A linear ring is\n     *     an array of vertices' coordinates where the 
 first coordinate and the last are\n     *     equivalent. (For internal use, flat coordinates in combination with\n     *     `opt_layout` and `opt_ends` are also accepted.)\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).\n     */\n    function Polygon(coordinates, opt_layout, opt_ends) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.ends_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatInteriorPointRevision_ = -1;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.flatInteriorPoint_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {numbe
 r}\n         */\n        _this.maxDeltaRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.orientedRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.orientedFlatCoordinates_ = null;\n        if (opt_layout !== undefined && opt_ends) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.ends_ = opt_ends;\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed linear ring to this polygon.\n     * @param {LinearRing} linearRing Linear ring.\n     * @api\n     */\n    Polygon.prototype.appendLinearRing = function (linearRing) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = linearRing
 .getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n        }\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Polygon} Clone.\n     * @api\n     */\n    Polygon.prototype.clone = function () {\n        return new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Polygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        
 }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Polygon.prototype.containsXY = function (x, y) {\n        return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n    };\n    /**\n     * Return the area of the polygon on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    Polygon.prototype.getArea = function () {\n        return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n    };\n    /
 **\n     * Get the coordinate array for this geometry.  This array has the structure\n     * of a GeoJSON coordinate array for polygons.\n     *\n     * @param {boolean=} opt_right Orient coordinates according to the right-hand\n     *     rule (counter-clockwise for exterior and clockwise for interior rings).\n     *     If `false`, coordinates will be oriented according to the left-hand rule\n     *     (clockwise for exterior and counter-clockwise for interior rings).\n     *     By default, coordinate orientation will depend on how the geometry was\n     *     constructed.\n     * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n     * @api\n     */\n    Polygon.prototype.getCoordinates = function (opt_right) {\n        var flatCoordinates;\n        if (opt_right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);\n        }\
 n        else {\n            flatCoordinates = this.flatCoordinates;\n        }\n        return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n    };\n    /**\n     * @return {Array<number>} Ends.\n     */\n    Polygon.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    /**\n     * @return {Array<number>} Interior point.\n     */\n    Polygon.prototype.getFlatInteriorPoint = function () {\n        if (this.flatInteriorPointRevision_ != this.getRevision()) {\n            var flatCenter = getCenter(this.getExtent());\n            this.flatInteriorPoint_ = getInteriorPointOfArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0);\n            this.flatInteriorPointRevision_ = this.getRevision();\n        }\n        return this.flatInteriorPoint_;\n    };\n    /**\n     * Return an interior point of the polygon.\n     * @return {Point} Interior point as XYM coordinate, where M is the\n     * length of the horizon
 tal intersection that the point belongs to.\n     * @api\n     */\n    Polygon.prototype.getInteriorPoint = function () {\n        return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n    };\n    /**\n     * Return the number of rings of the polygon,  this includes the exterior\n     * ring and any interior rings.\n     *\n     * @return {number} Number of rings.\n     * @api\n     */\n    Polygon.prototype.getLinearRingCount = function () {\n        return this.ends_.length;\n    };\n    /**\n     * Return the Nth linear ring of the polygon geometry. Return `null` if the\n     * given index is out of range.\n     * The exterior linear ring is available at index `0` and the interior rings\n     * at index `1` and beyond.\n     *\n     * @param {number} index Index.\n     * @return {LinearRing} Linear ring.\n     * @api\n     */\n    Polygon.prototype.getLinearRing = function (index) {\n        if (index < 0 || this.ends_.length <= index) {\n            return null;\n 
        }\n        return new LinearRing(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n    };\n    /**\n     * Return the linear rings of the polygon.\n     * @return {Array<LinearRing>} Linear rings.\n     * @api\n     */\n    Polygon.prototype.getLinearRings = function () {\n        var layout = this.layout;\n        var flatCoordinates = this.flatCoordinates;\n        var ends = this.ends_;\n        var linearRings = [];\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);\n            linearRings.push(linearRing);\n            offset = end;\n        }\n        return linearRings;\n    };\n    /**\n     * @return {Array<number>} Oriented flat coordinates.\n     */\n    Polygon.prototype.getOrientedFlatCoordinates = function () {\n        if (this.orientedRevision_ != this.get
 Revision()) {\n            var flatCoordinates = this.flatCoordinates;\n            if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n                this.orientedFlatCoordinates_ = flatCoordinates;\n            }\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = orientLinearRings(this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n            }\n            this.orientedRevision_ = this.getRevision();\n        }\n        return this.orientedFlatCoordinates_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {Polygon} Simplified Polygon.\n     * @protected\n     */\n    Polygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEnds = [];\n        simplifiedFlatCoordinates.length = quantizeArray(this.flatCoordinates, 0, 
 this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Polygon.prototype.getType = function () {\n        return GeometryType.POLYGON;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Polygon.prototype.intersectsExtent = function (extent) {\n        return intersectsLinearRingArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the polygon.\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinate
 s.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    Polygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 2);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n        this.changed();\n    };\n    return Polygon;\n}(SimpleGeometry));\nexport default Polygon;\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n *     the polygon vertices.\n * @param {number=} opt_n Optional number of vertices for the resulting\n *     polygon. Default is `32`.\n * @p
 aram {number=} opt_sphereRadius Optional radius for the sphere (defaults to\n *     the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n    var n = opt_n ? opt_n : 32;\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    for (var i = 0; i < n; ++i) {\n        extend(flatCoordinates, sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius));\n    }\n    flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n    return new Polygon(flatCoordinates, GeometryLayout.XY, [\n        flatCoordinates.length,\n    ]);\n}\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var max
 Y = extent[3];\n    var flatCoordinates = [\n        minX,\n        minY,\n        minX,\n        maxY,\n        maxX,\n        maxY,\n        maxX,\n        minY,\n        minX,\n        minY,\n    ];\n    return new Polygon(flatCoordinates, GeometryLayout.XY, [\n        flatCoordinates.length,\n    ]);\n}\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number=} opt_sides Number of sides of the polygon. Default is 32.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n    var sides = opt_sides ? opt_sides : 32;\n    var stride = circle.getStride();\n    var layout = circle.getLayout();\n    var center = circle.getCenter();\n    var arrayLength = stride * (sides + 1);\n    var flatCoordinates = new Array(arrayLength);\n    for (
 var i = 0; i < arrayLength; i += stride) {\n        flatCoordinates[i] = 0;\n        flatCoordinates[i + 1] = 0;\n        for (var j = 2; j < stride; j++) {\n            flatCoordinates[i + j] = center[j];\n        }\n    }\n    var ends = [flatCoordinates.length];\n    var polygon = new Polygon(flatCoordinates, layout, ends);\n    makeRegular(polygon, center, circle.getRadius(), opt_angle);\n    return polygon;\n}\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n    var flatCoordinates = polygon.getFlatCoordinates();\n    var stride = polygon.getStride();\n    var sides = flatCoord
 inates.length / stride - 1;\n    var startAngle = opt_angle ? opt_angle : 0;\n    for (var i = 0; i <= sides; ++i) {\n        var offset = i * stride;\n        var angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n        flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n        flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n    }\n    polygon.changed();\n}\n//# sourceMappingURL=Polygon.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.
 prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Geolocation\n */\nimport BaseEvent from './events/Event.js';\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport EventType from './events/EventType.js';\nimport { circular as circularPolygon } from './geom/Polygon.js';\nimport { get as getProjection, getTransformFromProjections, identityTransform, } from './proj.js';\nimport { toRadians } from './math.js';\n/**\n * @enum {string}\n */\nvar Property = {\n    ACCURACY: 'accuracy',\n    ACCURACY_GEOMETRY: 'accuracyGeometry',\n    ALTITUDE: 'altitude',\n    ALTITUDE_ACCURACY: 'altitudeAccuracy',\n    HEADING: 'heading',\n    POSITION: 'position',\n    PROJECTION: 'projection',\n    SPEED: 'speed',\n    TRACKING: 'tracking',\n    TRACKING_OPTIONS: 'trackingOptions',\n};\n/**\n * @classdesc\n * Events emitted on Geolocation error.\n */\nvar GeolocationError = /** @class */ (function (_super) {\n    __extends(GeolocationError, _super);\n    /**\n     
 * @param {PositionError} error error object.\n     */\n    function GeolocationError(error) {\n        var _this = _super.call(this, EventType.ERROR) || this;\n        /**\n         * @type {number}\n         */\n        _this.code = error.code;\n        /**\n         * @type {string}\n         */\n        _this.message = error.message;\n        return _this;\n    }\n    return GeolocationError;\n}(BaseEvent));\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To
  get notified of position changes, register a listener for the generic\n * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n *     var geolocation = new Geolocation({\n *       // take the projection to use from the map's view\n *       projection: view.getProjection()\n *     });\n *     // listen to changes in position\n *     geolocation.on('change', function(evt) {\n *       window.console.log(geolocation.getPosition());\n *     });\n *\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar Geolocation = /** @class */ (function (_super) {\n    __extends(Geolocation, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Geolocation(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /**\n         * The unprojected (EPSG:4326) device position.\n         * @private\n         * @type {?import(\"./coordinate.js\").Coord
 inate}\n         */\n        _this.position_ = null;\n        /**\n         * @private\n         * @type {import(\"./proj.js\").TransformFunction}\n         */\n        _this.transform_ = identityTransform;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.watchId_ = undefined;\n        _this.addEventListener(getChangeEventType(Property.PROJECTION), _this.handleProjectionChanged_);\n        _this.addEventListener(getChangeEventType(Property.TRACKING), _this.handleTrackingChanged_);\n        if (options.projection !== undefined) {\n            _this.setProjection(options.projection);\n        }\n        if (options.trackingOptions !== undefined) {\n            _this.setTrackingOptions(options.trackingOptions);\n        }\n        _this.setTracking(options.tracking !== undefined ? options.tracking : false);\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    Geolocation.prototype.disposeInternal = function () {\n     
    this.setTracking(false);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * @private\n     */\n    Geolocation.prototype.handleProjectionChanged_ = function () {\n        var projection = this.getProjection();\n        if (projection) {\n            this.transform_ = getTransformFromProjections(getProjection('EPSG:4326'), projection);\n            if (this.position_) {\n                this.set(Property.POSITION, this.transform_(this.position_));\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    Geolocation.prototype.handleTrackingChanged_ = function () {\n        if ('geolocation' in navigator) {\n            var tracking = this.getTracking();\n            if (tracking && this.watchId_ === undefined) {\n                this.watchId_ = navigator.geolocation.watchPosition(this.positionChange_.bind(this), this.positionError_.bind(this), this.getTrackingOptions());\n            }\n            else if (!tracking && this.watchId_ !==
  undefined) {\n                navigator.geolocation.clearWatch(this.watchId_);\n                this.watchId_ = undefined;\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {Position} position position event.\n     */\n    Geolocation.prototype.positionChange_ = function (position) {\n        var coords = position.coords;\n        this.set(Property.ACCURACY, coords.accuracy);\n        this.set(Property.ALTITUDE, coords.altitude === null ? undefined : coords.altitude);\n        this.set(Property.ALTITUDE_ACCURACY, coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy);\n        this.set(Property.HEADING, coords.heading === null ? undefined : toRadians(coords.heading));\n        if (!this.position_) {\n            this.position_ = [coords.longitude, coords.latitude];\n        }\n        else {\n            this.position_[0] = coords.longitude;\n            this.position_[1] = coords.latitude;\n        }\n        var projectedPosition = this.t
 ransform_(this.position_);\n        this.set(Property.POSITION, projectedPosition);\n        this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n        var geometry = circularPolygon(this.position_, coords.accuracy);\n        geometry.applyTransform(this.transform_);\n        this.set(Property.ACCURACY_GEOMETRY, geometry);\n        this.changed();\n    };\n    /**\n     * @private\n     * @param {PositionError} error error object.\n     */\n    Geolocation.prototype.positionError_ = function (error) {\n        this.dispatchEvent(new GeolocationError(error));\n    };\n    /**\n     * Get the accuracy of the position in meters.\n     * @return {number|undefined} The accuracy of the position measurement in\n     *     meters.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAccuracy = function () {\n        return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n    };\n    /**\n     * Get a geometry of the position accura
 cy.\n     * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAccuracyGeometry = function () {\n        return /** @type {?import(\"./geom/Polygon.js\").default} */ (this.get(Property.ACCURACY_GEOMETRY) || null);\n    };\n    /**\n     * Get the altitude associated with the position.\n     * @return {number|undefined} The altitude of the position in meters above mean\n     *     sea level.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAltitude = function () {\n        return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n    };\n    /**\n     * Get the altitude accuracy of the position.\n     * @return {number|undefined} The accuracy of the altitude measurement in\n     *     meters.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getAltitudeAccuracy = function () {\n        return /** @type {number|undefined} */ 
 (this.get(Property.ALTITUDE_ACCURACY));\n    };\n    /**\n     * Get the heading as radians clockwise from North.\n     * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n     * is set to `true` in the tracking options.\n     * @return {number|undefined} The heading of the device in radians from north.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getHeading = function () {\n        return /** @type {number|undefined} */ (this.get(Property.HEADING));\n    };\n    /**\n     * Get the position of the device.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n     *     in the current projection.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getPosition = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n    };\n    /**\n     * Get the projection associated with the 
 position.\n     * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n     *     reported in.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getProjection = function () {\n        return /** @type {import(\"./proj/Projection.js\").default|undefined} */ (this.get(Property.PROJECTION));\n    };\n    /**\n     * Get the speed in meters per second.\n     * @return {number|undefined} The instantaneous speed of the device in meters\n     *     per second.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getSpeed = function () {\n        return /** @type {number|undefined} */ (this.get(Property.SPEED));\n    };\n    /**\n     * Determine if the device location is being tracked.\n     * @return {boolean} The device location is being tracked.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getTracking = function () {\n        return /** @type {boolean} */ (this.get(Property.TRACKING));\n  
   };\n    /**\n     * Get the tracking options.\n     * See http://www.w3.org/TR/geolocation-API/#position-options.\n     * @return {PositionOptions|undefined} PositionOptions as defined by\n     *     the [HTML5 Geolocation spec\n     *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.getTrackingOptions = function () {\n        return /** @type {PositionOptions|undefined} */ (this.get(Property.TRACKING_OPTIONS));\n    };\n    /**\n     * Set the projection to use for transforming the coordinates.\n     * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n     *     reported in.\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.setProjection = function (projection) {\n        this.set(Property.PROJECTION, getProjection(projection));\n    };\n    /**\n     * Enable or disable tracking.\n     * @param {boolean} tracking Enable tracking.\
 n     * @observable\n     * @api\n     */\n    Geolocation.prototype.setTracking = function (tracking) {\n        this.set(Property.TRACKING, tracking);\n    };\n    /**\n     * Set the tracking options.\n     * See http://www.w3.org/TR/geolocation-API/#position-options.\n     * @param {PositionOptions} options PositionOptions as defined by the\n     *     [HTML5 Geolocation spec\n     *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n     * @observable\n     * @api\n     */\n    Geolocation.prototype.setTrackingOptions = function (options) {\n        this.set(Property.TRACKING_OPTIONS, options);\n    };\n    return Geolocation;\n}(BaseObject));\nexport default Geolocation;\n//# sourceMappingURL=Geolocation.js.map","/**\n * @module ol/Kinetic\n */\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = /** @class */ (function () {\n    /**\n     * @param {number} decay Rate of decay (must be negativ
 e).\n     * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n     * @param {number} delay Delay to consider to calculate the kinetic\n     *     initial values (milliseconds).\n     */\n    function Kinetic(decay, minVelocity, delay) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.decay_ = decay;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minVelocity_ = minVelocity;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.delay_ = delay;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.points_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        this.angle_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.initialVelocity_ = 0;\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    Kinetic.prototype.begin = f
 unction () {\n        this.points_.length = 0;\n        this.angle_ = 0;\n        this.initialVelocity_ = 0;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     */\n    Kinetic.prototype.update = function (x, y) {\n        this.points_.push(x, y, Date.now());\n    };\n    /**\n     * @return {boolean} Whether we should do kinetic animation.\n     */\n    Kinetic.prototype.end = function () {\n        if (this.points_.length < 6) {\n            // at least 2 points are required (i.e. there must be at least 6 elements\n            // in the array)\n            return false;\n        }\n        var delay = Date.now() - this.delay_;\n        var lastIndex = this.points_.length - 3;\n        if (this.points_[lastIndex + 2] < delay) {\n            // the last tracked point is too old, which means that the user stopped\n            // panning before releasing the map\n            return false;\n        }\n        // get the first point which still falls into th
 e delay time\n        var firstIndex = lastIndex - 3;\n        while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n            firstIndex -= 3;\n        }\n        var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n        // we don't want a duration of 0 (divide by zero)\n        // we also make sure the user panned for a duration of at least one frame\n        // (1/60s) to compute sane displacement values\n        if (duration < 1000 / 60) {\n            return false;\n        }\n        var dx = this.points_[lastIndex] - this.points_[firstIndex];\n        var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n        this.angle_ = Math.atan2(dy, dx);\n        this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n        return this.initialVelocity_ > this.minVelocity_;\n    };\n    /**\n     * @return {number} Total distance travelled (pixels).\n     */\n    Kinetic.prototype.getDistance = function () {\n        r
 eturn (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n    };\n    /**\n     * @return {number} Angle of the kinetic panning animation (radians).\n     */\n    Kinetic.prototype.getAngle = function () {\n        return this.angle_;\n    };\n    return Kinetic;\n}());\nexport default Kinetic;\n//# sourceMappingURL=Kinetic.js.map","/**\n * @module ol/color\n */\nimport { assert } from './asserts.js';\nimport { clamp } from './math.js';\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n/**\n * Regular expression for matching potentia
 l named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n    if (typeof color === 'string') {\n        return color;\n    }\n    else {\n        return toString(color);\n    }\n}\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n    var el = document.createElement('div');\n    el.style.color = color;\n    if (el.style.color !== '') {\n        document.body.appendChild(el);\n        var rgb = getComputedStyle(el).color;\n        document.body.removeChild(el);\n        return rgb;\n    }\n    else {\n        return '';\n    }\n}\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (function () {\n    // We 
 maintain a small cache of parsed strings.  To provide cheap LRU-like\n    // semantics, whenever the cache grows too large we simply delete an\n    // arbitrary 25% of the entries.\n    /**\n     * @const\n     * @type {number}\n     */\n    var MAX_CACHE_SIZE = 1024;\n    /**\n     * @type {Object<string, Color>}\n     */\n    var cache = {};\n    /**\n     * @type {number}\n     */\n    var cacheSize = 0;\n    return (\n    /**\n     * @param {string} s String.\n     * @return {Color} Color.\n     */\n    function (s) {\n        var color;\n        if (cache.hasOwnProperty(s)) {\n            color = cache[s];\n        }\n        else {\n            if (cacheSize >= MAX_CACHE_SIZE) {\n                var i = 0;\n                for (var key in cache) {\n                    if ((i++ & 3) === 0) {\n                        delete cache[key];\n                        --cacheSize;\n                    }\n                }\n            }\n            color = fromStringInternal_(s);\n    
         cache[s] = color;\n            ++cacheSize;\n        }\n        return color;\n    });\n})();\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n    if (Array.isArray(color)) {\n        return color;\n    }\n    else {\n        return fromString(color);\n    }\n}\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n    var r, g, b, a, color;\n    if (NAMED_COLOR_RE_.exec(s)) {\n        s = fromNamed(s);\n    }\n    if (HEX_COLOR_RE_.exec(s)) {\n        // hex\n        var n = s.length - 1; // number of hex digits\n        var d = // number of digits per channel\n         void 0; // number of digits per channel\n        if (n <= 4) {\n            d = 1;\n        }\n        else {\n            d = 2;\n        }\
 n        var hasAlpha = n === 4 || n === 8;\n        r = parseInt(s.substr(1 + 0 * d, d), 16);\n        g = parseInt(s.substr(1 + 1 * d, d), 16);\n        b = parseInt(s.substr(1 + 2 * d, d), 16);\n        if (hasAlpha) {\n            a = parseInt(s.substr(1 + 3 * d, d), 16);\n        }\n        else {\n            a = 255;\n        }\n        if (d == 1) {\n            r = (r << 4) + r;\n            g = (g << 4) + g;\n            b = (b << 4) + b;\n            if (hasAlpha) {\n                a = (a << 4) + a;\n            }\n        }\n        color = [r, g, b, a / 255];\n    }\n    else if (s.indexOf('rgba(') == 0) {\n        // rgba()\n        color = s.slice(5, -1).split(',').map(Number);\n        normalize(color);\n    }\n    else if (s.indexOf('rgb(') == 0) {\n        // rgb()\n        color = s.slice(4, -1).split(',').map(Number);\n        color.push(1);\n        normalize(color);\n    }\n    else {\n        assert(false, 14); // Invalid color\n    }\n    return color;\n}\n/
 **\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n    color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n    color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n    color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n    color[3] = clamp(color[3], 0, 1);\n    return color;\n}\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n    var r = color[0];\n    if (r != (r | 0)) {\n        r = (r + 0.5) | 0;\n    }\n    var g = color[1];\n    if (g != (g | 0)) {\n        g = (g + 0.5) | 0;\n    }\n    var b = color[2];\n    if (b != (b | 0)) {\n        b = (b + 0.5) | 0;\n    }\n    var a = color[3] === undefined ? 1 : color[3];\n    return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport
  function isStringColor(s) {\n    if (NAMED_COLOR_RE_.test(s)) {\n        s = fromNamed(s);\n    }\n    return (HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0);\n}\n//# sourceMappingURL=color.js.map","/**\n * @module ol/style/IconImageCache\n */\nimport { asString } from '../color.js';\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nvar IconImageCache = /** @class */ (function () {\n    function IconImageCache() {\n        /**\n         * @type {!Object<string, import(\"./IconImage.js\").default>}\n         * @private\n         */\n        this.cache_ = {};\n        /**\n         * @type {number}\n         * @private\n         */\n        this.cacheSize_ = 0;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.maxCacheSize_ = 32;\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    IconImageCache.prototype.clear = function () {\n       
  this.cache_ = {};\n        this.cacheSize_ = 0;\n    };\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    IconImageCache.prototype.canExpireCache = function () {\n        return this.cacheSize_ > this.maxCacheSize_;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    IconImageCache.prototype.expire = function () {\n        if (this.canExpireCache()) {\n            var i = 0;\n            for (var key in this.cache_) {\n                var iconImage = this.cache_[key];\n                if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n                    delete this.cache_[key];\n                    --this.cacheSize_;\n                }\n            }\n        }\n    };\n    /**\n     * @param {string} src Src.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../color.js\").Color} color Color.\n     * @return {import(\"./IconImage.js\").default} Icon image.\n     */\n    IconImageCache.prototype.get = function (src, 
 crossOrigin, color) {\n        var key = getKey(src, crossOrigin, color);\n        return key in this.cache_ ? this.cache_[key] : null;\n    };\n    /**\n     * @param {string} src Src.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../color.js\").Color} color Color.\n     * @param {import(\"./IconImage.js\").default} iconImage Icon image.\n     */\n    IconImageCache.prototype.set = function (src, crossOrigin, color, iconImage) {\n        var key = getKey(src, crossOrigin, color);\n        this.cache_[key] = iconImage;\n        ++this.cacheSize_;\n    };\n    /**\n     * Set the cache size of the icon cache. Default is `32`. Change this value when\n     * your map uses more than 32 different icon images and you are not caching icon\n     * styles on the application level.\n     * @param {number} maxCacheSize Cache max size.\n     * @api\n     */\n    IconImageCache.prototype.setSize = function (maxCacheSize) {\n        this.maxCacheSize_ = maxCacheSize;
 \n        this.expire();\n    };\n    return IconImageCache;\n}());\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n    var colorString = color ? asString(color) : 'null';\n    return crossOrigin + ':' + src + ':' + colorString;\n}\nexport default IconImageCache;\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport var shared = new IconImageCache();\n//# sourceMappingURL=IconImageCache.js.map","/**\n * @module ol/layer/Property\n */\n/**\n * @enum {string}\n */\nexport default {\n    OPACITY: 'opacity',\n    VISIBLE: 'visible',\n    EXTENT: 'extent',\n    Z_INDEX: 'zIndex',\n    MAX_RESOLUTION: 'maxResolution',\n    MIN_RESOLUTION: 'minResolution',\n    MAX_ZOOM: 'maxZoom',\n    MIN_ZOOM: 'minZoom',\n    SOURCE: 'source',\n};\n//#
  sourceMappingURL=Property.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport { abstract } from '../util.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS c
 lass name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {numbe
 r} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nvar BaseLayer = /** @class */ (function (_super) {\n    __extends(BaseLayer, _super);\n    /**\n     * @param {Options} options Layer options.\n     */\n    function BaseLayer(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Object<string, *>}\n         */\n        var properties = assign({}, options);\n        properties[LayerProperty.OPACITY] =\n            options.opacity !== undefined ? options.opacity : 1;\n        assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); 
 // Layer opacity must be a number\n        properties[LayerProperty.VISIBLE] =\n            options.visible !== undefined ? options.visible : true;\n        properties[LayerProperty.Z_INDEX] = options.zIndex;\n        properties[LayerProperty.MAX_RESOLUTION] =\n            options.maxResolution !== undefined ? options.maxResolution : Infinity;\n        properties[LayerProperty.MIN_RESOLUTION] =\n            options.minResolution !== undefined ? options.minResolution : 0;\n        properties[LayerProperty.MIN_ZOOM] =\n            options.minZoom !== undefined ? options.minZoom : -Infinity;\n        properties[LayerProperty.MAX_ZOOM] =\n            options.maxZoom !== undefined ? options.maxZoom : Infinity;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.className_ =\n            properties.className !== undefined ? options.className : 'ol-layer';\n        delete properties.className;\n        _this.setProperties(properties);\n        /**\n    
      * @type {import(\"./Layer.js\").State}\n         * @private\n         */\n        _this.state_ = null;\n        return _this;\n    }\n    /**\n     * @return {string} CSS class name.\n     */\n    BaseLayer.prototype.getClassName = function () {\n        return this.className_;\n    };\n    /**\n     * This method is not meant to be called by layers or layer renderers because the state\n     * is incorrect if the layer is included in a layer group.\n     *\n     * @param {boolean=} opt_managed Layer is managed.\n     * @return {import(\"./Layer.js\").State} Layer state.\n     */\n    BaseLayer.prototype.getLayerState = function (opt_managed) {\n        /** @type {import(\"./Layer.js\").State} */\n        var state = this.state_ ||\n            /** @type {?} */ ({\n                layer: this,\n                managed: opt_managed === undefined ? true : opt_managed,\n            });\n        var zIndex = this.getZIndex();\n        state.opacity = clamp(Math.round(this.getOpacity
 () * 100) / 100, 0, 1);\n        state.sourceState = this.getSourceState();\n        state.visible = this.getVisible();\n        state.extent = this.getExtent();\n        state.zIndex =\n            zIndex !== undefined ? zIndex : state.managed === false ? Infinity : 0;\n        state.maxResolution = this.getMaxResolution();\n        state.minResolution = Math.max(this.getMinResolution(), 0);\n        state.minZoom = this.getMinZoom();\n        state.maxZoom = this.getMaxZoom();\n        this.state_ = state;\n        return state;\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be\n     *     modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    BaseLayer.prototype.getLayersArray = function (opt_array) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer\n     
 *     states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    BaseLayer.prototype.getLayerStatesArray = function (opt_states) {\n        return abstract();\n    };\n    /**\n     * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n     * will be visible regardless of extent.\n     * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getExtent = function () {\n        return /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(LayerProperty.EXTENT));\n    };\n    /**\n     * Return the maximum resolution of the layer.\n     * @return {number} The maximum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMaxResolution = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n    };\n    /**\n     * Retu
 rn the minimum resolution of the layer.\n     * @return {number} The minimum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMinResolution = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n    };\n    /**\n     * Return the minimum zoom level of the layer.\n     * @return {number} The minimum zoom level of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMinZoom = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n    };\n    /**\n     * Return the maximum zoom level of the layer.\n     * @return {number} The maximum zoom level of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMaxZoom = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n    };\n    /**\n     * Return the opacity of the layer (between 0 and 1).\n     * @return {number} The opacity of t
 he layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getOpacity = function () {\n        return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n    };\n    /**\n     * @abstract\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    BaseLayer.prototype.getSourceState = function () {\n        return abstract();\n    };\n    /**\n     * Return the visibility of the layer (`true` or `false`).\n     * @return {boolean} The visibility of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getVisible = function () {\n        return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n    };\n    /**\n     * Return the Z-index of the layer, which is used to order layers before\n     * rendering. The default Z-index is 0.\n     * @return {number} The Z-index of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getZIndex = function () {\n        return /** @type {number
 } */ (this.get(LayerProperty.Z_INDEX));\n    };\n    /**\n     * Set the extent at which the layer is visible.  If `undefined`, the layer\n     * will be visible at all extents.\n     * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setExtent = function (extent) {\n        this.set(LayerProperty.EXTENT, extent);\n    };\n    /**\n     * Set the maximum resolution at which the layer is visible.\n     * @param {number} maxResolution The maximum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMaxResolution = function (maxResolution) {\n        this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n    };\n    /**\n     * Set the minimum resolution at which the layer is visible.\n     * @param {number} minResolution The minimum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMinResolution = f
 unction (minResolution) {\n        this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n    };\n    /**\n     * Set the maximum zoom (exclusive) at which the layer is visible.\n     * Note that the zoom levels for layer visibility are based on the\n     * view zoom level, which may be different from a tile source zoom level.\n     * @param {number} maxZoom The maximum zoom of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMaxZoom = function (maxZoom) {\n        this.set(LayerProperty.MAX_ZOOM, maxZoom);\n    };\n    /**\n     * Set the minimum zoom (inclusive) at which the layer is visible.\n     * Note that the zoom levels for layer visibility are based on the\n     * view zoom level, which may be different from a tile source zoom level.\n     * @param {number} minZoom The minimum zoom of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMinZoom = function (minZoom) {\n        this.set(LayerProperty.MIN_ZOOM, minZo
 om);\n    };\n    /**\n     * Set the opacity of the layer, allowed values range from 0 to 1.\n     * @param {number} opacity The opacity of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setOpacity = function (opacity) {\n        assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n        this.set(LayerProperty.OPACITY, opacity);\n    };\n    /**\n     * Set the visibility of the layer (`true` or `false`).\n     * @param {boolean} visible The visibility of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setVisible = function (visible) {\n        this.set(LayerProperty.VISIBLE, visible);\n    };\n    /**\n     * Set Z-index of the layer, which is used to order layers before rendering.\n     * The default Z-index is 0.\n     * @param {number} zindex The z-index of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setZIndex = function (zindex) {\n        this.set(LayerPrope
 rty.Z_INDEX, zindex);\n    };\n    /**\n     * Clean up.\n     */\n    BaseLayer.prototype.disposeInternal = function () {\n        if (this.state_) {\n            this.state_.layer = null;\n            this.state_ = null;\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    return BaseLayer;\n}(BaseObject));\nexport default BaseLayer;\n//# sourceMappingURL=Base.js.map","/**\n * @module ol/render/EventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered before a layer is rendered.\n     * @event module:ol/render/Event~RenderEvent#prerender\n     * @api\n     */\n    PRERENDER: 'prerender',\n    /**\n     * Triggered after a layer is rendered.\n     * @event module:ol/render/Event~RenderEvent#postrender\n     * @api\n     */\n    POSTRENDER: 'postrender',\n    /**\n     * Triggered before layers are rendered.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#precompose\n   
   * @api\n     */\n    PRECOMPOSE: 'precompose',\n    /**\n     * Triggered after all layers are rendered.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#postcompose\n     * @api\n     */\n    POSTCOMPOSE: 'postcompose',\n    /**\n     * Triggered when rendering is complete, i.e. all sources and tiles have\n     * finished loading for the current viewport, and all tiles are faded in.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#rendercomplete\n     * @api\n     */\n    RENDERCOMPLETE: 'rendercomplete',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/source/State\n */\n/**\n * @enum {string}\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\nexport default {\n    UNDEFINED: 'undefined',\n    LOADING: 'loading',\n    READY: 'ready',\n    ERROR: 'error',\n};\n//# sourceMappingURL=State.js.map","var __extends = (this && th
 is.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { getChangeEventType } from '../Object.js';\nimport { listen, unlistenBy
 Key } from '../events.js';\n/**\n * @typedef {function(import(\"../PluggableMap.js\").FrameState):HTMLElement} RenderFunction\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolutio
 n] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../source/Source.js\").default} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after
  the decimal point.\n * @property {import(\"../source/State.js\").default} sourceState\n * @property {boolean} visible\n * @property {boolean} managed\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {number} zIndex\n * @property {number} maxResolution\n * @property {number} minResolution\n * @property {number} minZoom\n * @property {number} maxZoom\n */\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is be added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components\n * like {@link module:
 ol/interaction/Select~Select} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * Please note that for performance reasons several layers might get rendered to\n * the same HTML element, which will cause {@link module:ol/Map~Map#forEachLayerAtPixel} to\n * give false positives. To avoid this, apply different `className` properties to the\n * layers at creation time.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n *\n * @template {import(\"../source/Source.js\").default} SourceType\n * @api\n */\nvar Layer = /** @class */ (function (_super) {\n    __extends(Layer, _super);\n    /**\n     * @param {Options} options Layer options.\n     */\n    function Layer(options) {\n        var _this = this;\n        var baseOpti
 ons = assign({}, options);\n        delete baseOptions.source;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.mapPrecomposeKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.mapRenderKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.sourceChangeKey_ = null;\n        /**\n         * @private\n         * @type {import(\"../renderer/Layer.js\").default}\n         */\n        _this.renderer_ = null;\n        // Overwrite default render method with a custom one\n        if (options.render) {\n            _this.render = options.render;\n        }\n        if (options.map) {\n            _this.setMap(options.map);\n        }\n        _this.addEventListener(getChangeEventType(LayerProperty.SOURCE), _this.ha
 ndleSourcePropertyChange_);\n        var source = options.source\n            ? /** @type {SourceType} */ (options.source)\n            : null;\n        _this.setSource(source);\n        return _this;\n    }\n    /**\n     * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    Layer.prototype.getLayersArray = function (opt_array) {\n        var array = opt_array ? opt_array : [];\n        array.push(this);\n        return array;\n    };\n    /**\n     * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    Layer.prototype.getLayerStatesArray = function (opt_states) {\n        var states = opt_states ? opt_states : [];\n        states.push(this.getLayerState());\n        return states;\n    };\n    /**\n
      * Get the layer source.\n     * @return {SourceType} The layer source (or `null` if not yet set).\n     * @observable\n     * @api\n     */\n    Layer.prototype.getSource = function () {\n        return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n    };\n    /**\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    Layer.prototype.getSourceState = function () {\n        var source = this.getSource();\n        return !source ? SourceState.UNDEFINED : source.getState();\n    };\n    /**\n     * @private\n     */\n    Layer.prototype.handleSourceChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    Layer.prototype.handleSourcePropertyChange_ = function () {\n        if (this.sourceChangeKey_) {\n            unlistenByKey(this.sourceChangeKey_);\n            this.sourceChangeKey_ = null;\n        }\n        var source = this.getSource();\n        if (source) {\n            this.source
 ChangeKey_ = listen(source, EventType.CHANGE, this.handleSourceChange_, this);\n        }\n        this.changed();\n    };\n    /**\n     * @param {import(\"../pixel\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    Layer.prototype.getFeatures = function (pixel) {\n        return this.renderer_.getFeatures(pixel);\n    };\n    /**\n     * In charge to manage the rendering of the layer. One layer type is\n     * bounded with one layer renderer.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target which the renderer may (but need not) use\n     * for rendering its content.\n     * @return {HTMLElement} The rendered element.\n     */\n    Layer.prototype.render = function (frameState, target) {\n        var layerRenderer = this.getRenderer();\n        if (layerRenderer.prepareFrame(frameState)) {\n        
     return layerRenderer.renderFrame(frameState, target);\n        }\n    };\n    /**\n     * Sets the layer to be rendered on top of other layers on a map. The map will\n     * not manage this layer in its layers collection, and the callback in\n     * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This\n     * is useful for temporary layers. To remove an unmanaged layer from the map,\n     * use `#setMap(null)`.\n     *\n     * To add the layer to a map and have it managed by the map, use\n     * {@link module:ol/Map#addLayer} instead.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Layer.prototype.setMap = function (map) {\n        if (this.mapPrecomposeKey_) {\n            unlistenByKey(this.mapPrecomposeKey_);\n            this.mapPrecomposeKey_ = null;\n        }\n        if (!map) {\n            this.changed();\n        }\n        if (this.mapRenderKey_) {\n            unlistenByKey(this.mapRenderKey_);\n   
          this.mapRenderKey_ = null;\n        }\n        if (map) {\n            this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function (evt) {\n                var renderEvent = /** @type {import(\"../render/Event.js\").default} */ (evt);\n                var layerStatesArray = renderEvent.frameState.layerStatesArray;\n                var layerState = this.getLayerState(false);\n                // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.\n                assert(!layerStatesArray.some(function (arrayLayerState) {\n                    return arrayLayerState.layer === layerState.layer;\n                }), 67);\n                layerStatesArray.push(layerState);\n            }, this);\n            this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n            this.changed();\n        }\n    };\n    /**\n     * Set the layer source.\n     * @param {SourceType} source The layer source.\n  
    * @observable\n     * @api\n     */\n    Layer.prototype.setSource = function (source) {\n        this.set(LayerProperty.SOURCE, source);\n    };\n    /**\n     * Get the renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} The layer renderer.\n     */\n    Layer.prototype.getRenderer = function () {\n        if (!this.renderer_) {\n            this.renderer_ = this.createRenderer();\n        }\n        return this.renderer_;\n    };\n    /**\n     * @return {boolean} The layer has a renderer.\n     */\n    Layer.prototype.hasRenderer = function () {\n        return !!this.renderer_;\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    Layer.prototype.createRenderer = function () {\n        return null;\n    };\n    /**\n     * Clean up.\n     */\n    Layer.prototype.disposeInternal = function () {\n        this.setSource(null);\n     
    _super.prototype.disposeInternal.call(this);\n    };\n    return Layer;\n}(BaseLayer));\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n    if (!layerState.visible) {\n        return false;\n    }\n    var resolution = viewState.resolution;\n    if (resolution < layerState.minResolution ||\n        resolution >= layerState.maxResolution) {\n        return false;\n    }\n    var zoom = viewState.zoom;\n    return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\nexport default Layer;\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/render/VectorContext\n */\n/**\n * @classdesc\n * Context for drawing geometries.  A vector context is
  available on render\n * events and does not need to be constructed directly.\n * @api\n */\nvar VectorContext = /** @class */ (function () {\n    function VectorContext() {\n    }\n    /**\n     * Render a geometry with a custom renderer.\n     *\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {Function} renderer Renderer.\n     */\n    VectorContext.prototype.drawCustom = function (geometry, feature, renderer) { };\n    /**\n     * Render a geometry.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n     */\n    VectorContext.prototype.drawGeometry = function (geometry) { };\n    /**\n     * Set the rendering style.\n     *\n     * @param {import(\"../style/Style.js\").default} style The rendering style.\n     */\n    VectorContext.prototype.setStyle = function (style) { };\n    /**\n     * @param {import(\"../geo
 m/Circle.js\").default} circleGeometry Circle geometry.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     */\n    VectorContext.prototype.drawCircle = function (circleGeometry, feature) { };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"../style/Style.js\").default} style Style.\n     */\n    VectorContext.prototype.drawFeature = function (feature, style) { };\n    /**\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     */\n    VectorContext.prototype.drawGeometryCollection = function (geometryCollectionGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.proto
 type.drawLineString = function (lineStringGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiLineString = function (multiLineStringGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiPoint = function (multiPointGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiPolygon = function (multiPolygonGeometry, feature
 ) { };\n    /**\n     * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawPoint = function (pointGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawPolygon = function (polygonGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawText = function (geometry, feature) { };\n    /**\n     * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../style/Stroke.j
 s\").default} strokeStyle Stroke style.\n     */\n    VectorContext.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) { };\n    /**\n     * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n     * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n     */\n    VectorContext.prototype.setImageStyle = function (imageStyle, opt_declutterGroup) { };\n    /**\n     * @param {import(\"../style/Text.js\").default} textStyle Text style.\n     * @param {import(\"./canvas.js\").DeclutterGroups=} opt_declutterGroups Declutter.\n     */\n    VectorContext.prototype.setTextStyle = function (textStyle, opt_declutterGroups) { };\n    return VectorContext;\n}());\nexport default VectorContext;\n//# sourceMappingURL=VectorContext.js.map","/**\n * @module ol/colorlike\n */\nimport { toString } from './color.js';\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a 
 color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n    if (Array.isArray(color)) {\n        return toString(color);\n    }\n    else {\n        return color;\n    }\n}\n//# sourceMappingURL=colorlike.js.map","/**\n * @module ol/has\n */\nvar ua = typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n    ? navigator.userAgent.toLowerCase()\n    : '';\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport var FIREFOX = ua.inde
 xOf('firefox') !== -1;\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport var MAC = ua.indexOf('macintosh') !== -1;\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport var DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport var WORKER_OFFSCREEN_CANVAS = typeof WorkerGlobalScope !== 'undefined' &&\n    typeof Offscree
 nCanvas !== 'undefined' &&\n    self instanceof WorkerGlobalScope; //eslint-disable-line\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport var IMAGE_DECODE = typeof Image !== 'undefined' && Image.prototype.decode;\n/**\n * @type {boolean}\n */\nexport var PASSIVE_EVENT_LISTENERS = (function () {\n    var passive = false;\n    try {\n        var options = Object.defineProperty({}, 'passive', {\n            get: function () {\n                passive = true;\n            },\n        });\n        window.addEventListener('_', null, options);\n        window.removeEventListener('_', null, options);\n    }\n    catch (error) {\n        // passive not supported\n    }\n    return passive;\n})();\n//# sourceMappingURL=has.js.map","import { WORKER_OFFSCREEN_CANVAS } from './has.js';\n/**\n * @module ol/dom\n */\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number=} opt_width Canva
 s width.\n * @param {number=} opt_height Canvas height.\n * @param {Array<HTMLCanvasElement>=} opt_canvasPool Canvas pool to take existing canvas from.\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) {\n    var canvas = opt_canvasPool && opt_canvasPool.length\n        ? opt_canvasPool.shift()\n        : WORKER_OFFSCREEN_CANVAS\n            ? new OffscreenCanvas(opt_width || 300, opt_height || 300)\n            : document.createElement('canvas');\n    if (opt_width) {\n        canvas.width = opt_width;\n    }\n    if (opt_height) {\n        canvas.height = opt_height;\n    }\n    //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n    return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLEleme
 nt} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n    var width = element.offsetWidth;\n    var style = getComputedStyle(element);\n    width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n    return width;\n}\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n    var height = element.offsetHeight;\n    var style = getComputedStyle(element);\n    height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n    return height;\n}\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n    var parent = oldNode.parentNode;\n    if (parent) {\n        parent.replaceChild(ne
 wNode, oldNode);\n    }\n}\n/**\n * @param {Node} node The node to remove.\n * @returns {Node} The node that was removed or null.\n */\nexport function removeNode(node) {\n    return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n    while (node.lastChild) {\n        node.removeChild(node.lastChild);\n    }\n}\n/**\n * Transform the children of a parent node so they match the\n * provided list of children.  This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n    var oldChildren = node.childNodes;\n    for (var i = 0; true; ++i) {\n        var oldChild 
 = oldChildren[i];\n        var newChild = children[i];\n        // check if our work is done\n        if (!oldChild && !newChild) {\n            break;\n        }\n        // check if children match\n        if (oldChild === newChild) {\n            continue;\n        }\n        // check if a new child needs to be added\n        if (!oldChild) {\n            node.appendChild(newChild);\n            continue;\n        }\n        // check if an old child needs to be removed\n        if (!newChild) {\n            node.removeChild(oldChild);\n            --i;\n            continue;\n        }\n        // reorder\n        node.insertBefore(newChild, oldChild);\n    }\n}\n//# sourceMappingURL=dom.js.map","/**\n * @module ol/css\n */\n/**\n * @typedef {Object} FontParameters\n * @property {string} style\n * @property {string} variant\n * @property {string} weight\n * @property {string} size\n * @property {string} lineHeight\n * @property {string} family\n * @property {Array<string>} famili
 es\n */\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_SELECTABLE = 'ol-selectable';\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSELECTABLE = 'ol-unselectable';\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_COLLAPSED = 'ol-collapsed';\n/**\n * From http://stackoverflow.com/questions/10
 135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nvar fontRegEx = new RegExp([\n    '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n    '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n    '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n    '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n    '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n].join(''), 'i');\nvar fontRegExMatchIndex = [\n    'style',\n    'variant',\n    'weight',\n    'size',\n    'lineHeight',\n    'family',\n];\n/**\n * Get the list of font families from a font spec.  Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters} The font parameters (or null if the input spec is invalid).\n */\nexport var g
 etFontParameters = function (fontSpec) {\n    var match = fontSpec.match(fontRegEx);\n    if (!match) {\n        return null;\n    }\n    var style = /** @type {FontParameters} */ ({\n        lineHeight: 'normal',\n        size: '1.2em',\n        style: 'normal',\n        weight: 'normal',\n        variant: 'normal',\n    });\n    for (var i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n        var value = match[i + 1];\n        if (value !== undefined) {\n            style[fontRegExMatchIndex[i]] = value;\n        }\n    }\n    style.families = style.family.split(/,\\s?/);\n    return style;\n};\n//# sourceMappingURL=css.js.map","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport EventTarget from '../events/Target.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../has.js';\nimport { clear } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getFontParameters } from '../css.js';\nimport { toString } from '../tran
 sform.js';\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n/**\n * @typedef Label\n * @property {number} width\n * @property {number} height\n * @property {Array<string|number>} contextInstructions\n */\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {CanvasLineCap} [currentLineCap]\n * @property {Array<number>} currentLineDash\n * @property {number} [currentLineDashOffset]\n * @property {CanvasLineJoin} [currentLineJoin]\n * @property {number} [currentLineWidth]\n * @property {number} [currentMiterLimit]\n * @property {number} [lastStroke]\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {CanvasLineCap} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number
 } [lineDashOffset]\n * @property {CanvasLineJoin} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\n/**\n * @typedef {Object} TextState\n * @property {string} font\n * @property {string} [textAlign]\n * @property {string} textBaseline\n * @property {string} [placement]\n * @property {number} [maxAngle]\n * @property {boolean} [overflow]\n * @property {import(\"../style/Fill.js\").default} [backgroundFill]\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke]\n * @property {import(\"../size.js\").Size} [scale]\n * @property {Array<number>} [padding]\n */\n/**\n * Container for decluttered replay instr
 uctions that need to be rendered or\n * omitted together, i.e. when styles render both an image and text, or for the\n * characters that form text along lines. The basic elements of this array are\n * `[minX, minY, maxX, maxY, count]`, where the first four entries are the\n * rendered extent of the group in pixel space. `count` is the number of styles\n * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.\n * In addition to these four elements, declutter instruction arrays (i.e. the\n * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array.\n * @typedef {Array<*>} DeclutterGroup\n */\n/**\n * Declutter groups for support of multi geometries.\n * @typedef {Array<DeclutterGroup>} DeclutterGroups\n */\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultFillStyle = '#000';\n/**\n * @const\n * @type {CanvasLineCap}\n
  */\nexport var defaultLineCap = 'round';\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultLineDash = [];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport var defaultLineJoin = 'round';\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultStrokeStyle = '#000';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextAlign = 'center';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n/**\n * @type {BaseObject}\n */\nexport var checkedFonts = new BaseObject();\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link mod
 ule:ol/structs/LRUCache#setSize}.\n * Deprecated - there is no label cache any more.\n * @type {?}\n * @api\n * @deprecated\n */\nexport var labelCache = new EventTarget();\nlabelCache.setSize = function () {\n    console.warn('labelCache is deprecated.'); //eslint-disable-line\n};\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n/**\n * @type {string}\n */\nvar measureFont;\n/**\n * @type {!Object<string, number>}\n */\nexport var textHeights = {};\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var registerFont = (function () {\n    var retries = 100;\n    var size = '32px ';\n    var referenceFonts = ['monospace', 'serif'];\n    var len = referenceFonts.length;\n    var text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n    var interval, referenceWidth;\n    /**\n     * @param {string} fontStyle Css font-style\n     * @param {string} fontWeight Css font-weight\n     * @param {*} fontFamily C
 ss font-family\n     * @return {boolean} Font with style and weight is available\n     */\n    function isAvailable(fontStyle, fontWeight, fontFamily) {\n        var available = true;\n        for (var i = 0; i < len; ++i) {\n            var referenceFont = referenceFonts[i];\n            referenceWidth = measureTextWidth(fontStyle + ' ' + fontWeight + ' ' + size + referenceFont, text);\n            if (fontFamily != referenceFont) {\n                var width = measureTextWidth(fontStyle +\n                    ' ' +\n                    fontWeight +\n                    ' ' +\n                    size +\n                    fontFamily +\n                    ',' +\n                    referenceFont, text);\n                // If width and referenceWidth are the same, then the fallback was used\n                // instead of the font we wanted, so the font is not available.\n                available = available && width != referenceWidth;\n            }\n        }\n        if (avail
 able) {\n            return true;\n        }\n        return false;\n    }\n    function check() {\n        var done = true;\n        var fonts = checkedFonts.getKeys();\n        for (var i = 0, ii = fonts.length; i < ii; ++i) {\n            var font = fonts[i];\n            if (checkedFonts.get(font) < retries) {\n                if (isAvailable.apply(this, font.split('\\n'))) {\n                    clear(textHeights);\n                    // Make sure that loaded fonts are picked up by Safari\n                    measureContext = null;\n                    measureFont = undefined;\n                    checkedFonts.set(font, retries);\n                }\n                else {\n                    checkedFonts.set(font, checkedFonts.get(font) + 1, true);\n                    done = false;\n                }\n            }\n        }\n        if (done) {\n            clearInterval(interval);\n            interval = undefined;\n        }\n    }\n    return function (fontSpec) {\n    
     var font = getFontParameters(fontSpec);\n        if (!font) {\n            return;\n        }\n        var families = font.families;\n        for (var i = 0, ii = families.length; i < ii; ++i) {\n            var family = families[i];\n            var key = font.style + '\\n' + font.weight + '\\n' + family;\n            if (checkedFonts.get(key) === undefined) {\n                checkedFonts.set(key, retries, true);\n                if (!isAvailable(font.style, font.weight, family)) {\n                    checkedFonts.set(key, 0, true);\n                    if (interval === undefined) {\n                        interval = setInterval(check, 32);\n                    }\n                }\n            }\n        }\n    };\n})();\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport var measureTextHeight = (function () {\n    /**\n     * @type {HTMLDivElement}\n     */\n    var div;\n    var heights = textHeights
 ;\n    return function (fontSpec) {\n        var height = heights[fontSpec];\n        if (height == undefined) {\n            if (WORKER_OFFSCREEN_CANVAS) {\n                var font = getFontParameters(fontSpec);\n                var metrics = measureText(fontSpec, 'Žg');\n                var lineHeight = isNaN(Number(font.lineHeight))\n                    ? 1.2\n                    : Number(font.lineHeight);\n                textHeights[fontSpec] =\n                    lineHeight *\n                        (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n            }\n            else {\n                if (!div) {\n                    div = document.createElement('div');\n                    div.innerHTML = 'M';\n                    div.style.margin = '0 !important';\n                    div.style.padding = '0 !important';\n                    div.style.position = 'absolute !important';\n                    div.style.left = '-99999px !important';\n        
         }\n                div.style.font = fontSpec;\n                document.body.appendChild(div);\n                height = div.offsetHeight;\n                heights[fontSpec] = height;\n                document.body.removeChild(div);\n            }\n        }\n        return height;\n    };\n})();\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n    if (!measureContext) {\n        measureContext = createCanvasContext2D(1, 1);\n    }\n    if (font != measureFont) {\n        measureContext.font = font;\n        measureFont = measureContext.font;\n    }\n    return measureContext.measureText(text);\n}\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n    return measureText(font, text).width;\n}\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {
 string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @returns {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n    if (text in cache) {\n        return cache[text];\n    }\n    var width = measureTextWidth(font, text);\n    cache[text] = width;\n    return width;\n}\n/**\n * @param {string} font Font to use for measuring.\n * @param {Array<string>} lines Lines to measure.\n * @param {Array<number>} widths Array will be populated with the widths of\n * each line.\n * @return {number} Width of the whole text.\n */\nexport function measureTextWidths(font, lines, widths) {\n    var numLines = lines.length;\n    var width = 0;\n    for (var i = 0; i < numLines; ++i) {\n        var currentWidth = measureTextWidth(font, lines[i]);\n        width = Math.max(width, currentWidth);\n        widths.push(currentWidth);\n    }\n    return width;\n}\n/**\n * @param {CanvasRenderingContext2D} 
 context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n    if (rotation !== 0) {\n        context.translate(offsetX, offsetY);\n        context.rotate(rotation);\n        context.translate(-offsetX, -offsetY);\n    }\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) 
 {\n    context.save();\n    if (opacity !== 1) {\n        context.globalAlpha *= opacity;\n    }\n    if (transform) {\n        context.setTransform.apply(context, transform);\n    }\n    if ( /** @type {*} */(labelOrImage).contextInstructions) {\n        // label\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n    }\n    else if (scale[0] < 0 || scale[1] < 0) {\n        // flipped image\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        context.drawImage(\n        /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, 0, 0, w, h);\n    }\n    else {\n        // if image not flipped translate and scale can be avoided\n        context.drawImage(\n        /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, x, y, w * scale[0], h * scal
 e[1]);\n    }\n    context.restore();\n}\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n    var contextInstructions = label.contextInstructions;\n    for (var i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n        if (Array.isArray(contextInstructions[i + 1])) {\n            context[contextInstructions[i]].apply(context, contextInstructions[i + 1]);\n        }\n        else {\n            context[contextInstructions[i]] = contextInstructions[i + 1];\n        }\n    }\n}\n/**\n * @type {HTMLCanvasElement}\n * @private\n */\nvar createTransformStringCanvas = null;\n/**\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @return {string} CSS transform.\n */\nexport function createTransformString(transform) {\n    if (WORKER_OFFSCREEN_CANVAS) {\n        return toString(transform);\n    }\n    else {\n        if (!createTransformStringCanvas) {\n    
         createTransformStringCanvas = createCanvasContext2D(1, 1).canvas;\n        }\n        createTransformStringCanvas.style.transform = toString(transform);\n        return createTransformStringCanvas.style.transform;\n    }\n}\n//# sourceMappingURL=canvas.js.map","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.con
 structor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorContext from '../VectorContext.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { defaultFillStyle, defaultFont, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextAlign, defaultTextBaseline, } from '../canvas.js';\nimport { equals } from '../../array.js';\nimport { intersects } from '../../extent.js';\nimport { transform2D } from '../../geom/flat/transform.js';\nimport { transformGeom2D } from '../../geom/SimpleGeometry.js';\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas co
 ntext.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nvar CanvasImmediateRenderer = /** @class */ (function (_super) {\n    __extends(CanvasImmediateRenderer, _super);\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {number=} opt_squaredTolerance Optional squared tolerance for simplification.\n     * @param {import(\"../../proj.js\").TransformFunction=} opt_userTransform Transform from user to view projection.\n     */\n    function CanvasImmediateRenderer(context, pixelRati
 o, extent, transform, viewRotation, opt_squaredTolerance, opt_userTransform) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context_ = context;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.extent_ = extent;\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.transform_ = transform;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.viewRotation_ = viewRotation;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.squaredTolerance_ = opt_squaredTolerance;\n        /**\n         * @private\n         * @type {import(\"../../proj.js\").TransformFunction
 }\n         */\n        _this.userTransform_ = opt_userTransform;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.contextFillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.contextStrokeState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").TextState}\n         */\n        _this.contextTextState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.fillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.strokeState_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number}\n      
    */\n        _this.imageAnchorX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageAnchorY_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageHeight_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOpacity_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOriginX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOriginY_ = 0;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.imageRotateWithView_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageRotation_ = 0;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        _this.imageScale_ = [0, 0];\n        /**\n         * @private\n         * @type {n
 umber}\n         */\n        _this.imageWidth_ = 0;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = '';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetY_ = 0;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.textRotateWithView_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textRotation_ = 0;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        _this.textScale_ = [0, 0];\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.textFillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.textStro
 keState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").TextState}\n         */\n        _this.textState_ = null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.pixelCoordinates_ = [];\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tmpLocalTransform_ = createTransform();\n        return _this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.drawImages_ = function (flatCoordinates, offset, end, stride) {\n        if (!this.image_) {\n            return;\n        }\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, 2, this.transform_, this.pixelCoordinates_);\n        var context = this.context_
 ;\n        var localTransform = this.tmpLocalTransform_;\n        var alpha = context.globalAlpha;\n        if (this.imageOpacity_ != 1) {\n            context.globalAlpha = alpha * this.imageOpacity_;\n        }\n        var rotation = this.imageRotation_;\n        if (this.imageRotateWithView_) {\n            rotation += this.viewRotation_;\n        }\n        for (var i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n            var x = pixelCoordinates[i] - this.imageAnchorX_;\n            var y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n            if (rotation !== 0 ||\n                this.imageScale_[0] != 1 ||\n                this.imageScale_[1] != 1) {\n                var centerX = x + this.imageAnchorX_;\n                var centerY = y + this.imageAnchorY_;\n                composeTransform(localTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n                context.setTransform.apply(context, localTransform);\n                context.tra
 nslate(centerX, centerY);\n                context.scale(this.imageScale_[0], this.imageScale_[1]);\n                context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, -this.imageAnchorX_, -this.imageAnchorY_, this.imageWidth_, this.imageHeight_);\n                context.setTransform(1, 0, 0, 1, 0, 0);\n            }\n            else {\n                context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, x, y, this.imageWidth_, this.imageHeight_);\n            }\n        }\n        if (this.imageOpacity_ != 1) {\n            context.globalAlpha = alpha;\n        }\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.drawText_ = function (flatCoordinates, offset, end, st
 ride) {\n        if (!this.textState_ || this.text_ === '') {\n            return;\n        }\n        if (this.textFillState_) {\n            this.setContextFillState_(this.textFillState_);\n        }\n        if (this.textStrokeState_) {\n            this.setContextStrokeState_(this.textStrokeState_);\n        }\n        this.setContextTextState_(this.textState_);\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        var context = this.context_;\n        var rotation = this.textRotation_;\n        if (this.textRotateWithView_) {\n            rotation += this.viewRotation_;\n        }\n        for (; offset < end; offset += stride) {\n            var x = pixelCoordinates[offset] + this.textOffsetX_;\n            var y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n            if (rotation !== 0 ||\n                this.textScale_[0] != 1 ||\n                this.textScale_[1] != 1) {\n             
    var localTransform = composeTransform(this.tmpLocalTransform_, x, y, 1, 1, rotation, -x, -y);\n                context.setTransform.apply(context, localTransform);\n                context.translate(x, y);\n                context.scale(this.textScale_[0], this.textScale_[1]);\n                if (this.textStrokeState_) {\n                    context.strokeText(this.text_, 0, 0);\n                }\n                if (this.textFillState_) {\n                    context.fillText(this.text_, 0, 0);\n                }\n                context.setTransform(1, 0, 0, 1, 0, 0);\n            }\n            else {\n                if (this.textStrokeState_) {\n                    context.strokeText(this.text_, x, y);\n                }\n                if (this.textFillState_) {\n                    context.fillText(this.text_, x, y);\n                }\n            }\n        }\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offs
 et Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @param {boolean} close Close.\n     * @private\n     * @return {number} end End.\n     */\n    CanvasImmediateRenderer.prototype.moveToLineTo_ = function (flatCoordinates, offset, end, stride, close) {\n        var context = this.context_;\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n        var length = pixelCoordinates.length;\n        if (close) {\n            length -= 2;\n        }\n        for (var i = 2; i < length; i += 2) {\n            context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n        }\n        if (close) {\n            context.closePath();\n        }\n        return end;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<numbe
 r>} ends Ends.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} End.\n     */\n    CanvasImmediateRenderer.prototype.drawRings_ = function (flatCoordinates, offset, ends, stride) {\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, true);\n        }\n        return offset;\n    };\n    /**\n     * Render a circle geometry into the canvas.  Rendering is immediate and uses\n     * the current fill and stroke styles.\n     *\n     * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawCircle = function (geometry) {\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.fillState_ || this.strokeState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n       
      if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var pixelCoordinates = transformGeom2D(geometry, this.transform_, this.pixelCoordinates_);\n            var dx = pixelCoordinates[2] - pixelCoordinates[0];\n            var dy = pixelCoordinates[3] - pixelCoordinates[1];\n            var radius = Math.sqrt(dx * dx + dy * dy);\n            var context = this.context_;\n            context.beginPath();\n            context.arc(pixelCoordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            this.drawText_(geometry.getCenter(), 0, 2, 2);\n        }\n    };\n    /**\n     * Set the rendering style.  Note that since this is an immediate rendering API,\n     * any `zIndex` on the provided s
 tyle will be ignored.\n     *\n     * @param {import(\"../../style/Style.js\").default} style The rendering style.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.setStyle = function (style) {\n        this.setFillStrokeStyle(style.getFill(), style.getStroke());\n        this.setImageStyle(style.getImage());\n        this.setTextStyle(style.getText());\n    };\n    /**\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     */\n    CanvasImmediateRenderer.prototype.setTransform = function (transform) {\n        this.transform_ = transform;\n    };\n    /**\n     * Render a geometry into the canvas.  Call\n     * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style.\n     *\n     * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawGeometry = function (geometry) {\n        var type
  = geometry.getType();\n        switch (type) {\n            case GeometryType.POINT:\n                this.drawPoint(\n                /** @type {import(\"../../geom/Point.js\").default} */ (geometry));\n                break;\n            case GeometryType.LINE_STRING:\n                this.drawLineString(\n                /** @type {import(\"../../geom/LineString.js\").default} */ (geometry));\n                break;\n            case GeometryType.POLYGON:\n                this.drawPolygon(\n                /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_POINT:\n                this.drawMultiPoint(\n                /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_LINE_STRING:\n                this.drawMultiLineString(\n                /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry));\n  
               break;\n            case GeometryType.MULTI_POLYGON:\n                this.drawMultiPolygon(\n                /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry));\n                break;\n            case GeometryType.GEOMETRY_COLLECTION:\n                this.drawGeometryCollection(\n                /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry));\n                break;\n            case GeometryType.CIRCLE:\n                this.drawCircle(\n                /** @type {import(\"../../geom/Circle.js\").default} */ (geometry));\n                break;\n            default:\n        }\n    };\n    /**\n     * Render a feature into the canvas.  Note that any `zIndex` on the provided\n     * style will be ignored - features are rendered immediately in the order that\n     * this method is called.  If you need `zIndex` support, you should be using an\n     * {@link module:ol/layer/Vector~VectorLayer} instead.\n     *\n 
     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {import(\"../../style/Style.js\").default} style Style.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawFeature = function (feature, style) {\n        var geometry = style.getGeometryFunction()(feature);\n        if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        this.setStyle(style);\n        this.drawGeometry(geometry);\n    };\n    /**\n     * Render a GeometryCollection to the canvas.  Rendering is immediate and\n     * uses the current styles appropriate for each geometry in the collection.\n     *\n     * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n     */\n    CanvasImmediateRenderer.prototype.drawGeometryCollection = function (geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            
 this.drawGeometry(geometries[i]);\n        }\n    };\n    /**\n     * Render a Point geometry into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawPoint = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/Point.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        if (this.image_) {\n            this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n        if (this.text_ !== '') {\n            this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n    };\n    /**\n     * Render a MultiPoint geometry  into 
 the canvas.  Rendering is immediate and\n     * uses the current style.\n     *\n     * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiPoint = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        if (this.image_) {\n            this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n        if (this.text_ !== '') {\n            this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n    };\n    /**\n     * Render a LineString into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @
 param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawLineString = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_) {\n            this.setContextStrokeState_(this.strokeState_);\n            var context = this.context_;\n            var flatCoordinates = geometry.getFlatCoordinates();\n            context.beginPath();\n            this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length, geometry.getStride(), false);\n            context.stroke();\n        }\n        if (this.text_ !== '') {\n            var flatMidpoint = geometry.getFlatMidpoint();\n      
       this.drawText_(flatMidpoint, 0, 2, 2);\n        }\n    };\n    /**\n     * Render a MultiLineString geometry into the canvas.  Rendering is immediate\n     * and uses the current style.\n     *\n     * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiLineString = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var geometryExtent = geometry.getExtent();\n        if (!intersects(this.extent_, geometryExtent)) {\n            return;\n        }\n        if (this.strokeState_) {\n            this.setContextStrokeState_(this.strokeState_);\n            var context = this.context_;\n            var flatCoordinates = geometry.getFlatCoordinates();\n       
      var offset = 0;\n            var ends = /** @type {Array<number>} */ (geometry.getEnds());\n            var stride = geometry.getStride();\n            context.beginPath();\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, false);\n            }\n            context.stroke();\n        }\n        if (this.text_ !== '') {\n            var flatMidpoints = geometry.getFlatMidpoints();\n            this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n        }\n    };\n    /**\n     * Render a Polygon geometry into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawPolygon = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../
 ../geom/Polygon.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_ || this.fillState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var context = this.context_;\n            context.beginPath();\n            this.drawRings_(geometry.getOrientedFlatCoordinates(), 0, \n            /** @type {Array<number>} */ (geometry.getEnds()), geometry.getStride());\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            var flatInteriorPoint = geometr
 y.getFlatInteriorPoint();\n            this.drawText_(flatInteriorPoint, 0, 2, 2);\n        }\n    };\n    /**\n     * Render MultiPolygon geometry into the canvas.  Rendering is immediate and\n     * uses the current style.\n     * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiPolygon = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_ || this.fillState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n         
    }\n            var context = this.context_;\n            var flatCoordinates = geometry.getOrientedFlatCoordinates();\n            var offset = 0;\n            var endss = geometry.getEndss();\n            var stride = geometry.getStride();\n            context.beginPath();\n            for (var i = 0, ii = endss.length; i < ii; ++i) {\n                var ends = endss[i];\n                offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n            }\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            var flatInteriorPoints = geometry.getFlatInteriorPoints();\n            this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n     * @private\n     */\n    CanvasImmediateRe
 nderer.prototype.setContextFillState_ = function (fillState) {\n        var context = this.context_;\n        var contextFillState = this.contextFillState_;\n        if (!contextFillState) {\n            context.fillStyle = fillState.fillStyle;\n            this.contextFillState_ = {\n                fillStyle: fillState.fillStyle,\n            };\n        }\n        else {\n            if (contextFillState.fillStyle != fillState.fillStyle) {\n                contextFillState.fillStyle = fillState.fillStyle;\n                context.fillStyle = fillState.fillStyle;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextStrokeState_ = function (strokeState) {\n        var context = this.context_;\n        var contextStrokeState = this.contextStrokeState_;\n        if (!contextStrokeState) {\n            context.lineCap = strokeState.lineCap;\n
             if (context.setLineDash) {\n                context.setLineDash(strokeState.lineDash);\n                context.lineDashOffset = strokeState.lineDashOffset;\n            }\n            context.lineJoin = strokeState.lineJoin;\n            context.lineWidth = strokeState.lineWidth;\n            context.miterLimit = strokeState.miterLimit;\n            context.strokeStyle = strokeState.strokeStyle;\n            this.contextStrokeState_ = {\n                lineCap: strokeState.lineCap,\n                lineDash: strokeState.lineDash,\n                lineDashOffset: strokeState.lineDashOffset,\n                lineJoin: strokeState.lineJoin,\n                lineWidth: strokeState.lineWidth,\n                miterLimit: strokeState.miterLimit,\n                strokeStyle: strokeState.strokeStyle,\n            };\n        }\n        else {\n            if (contextStrokeState.lineCap != strokeState.lineCap) {\n                contextStrokeState.lineCap = strokeState.lineCap
 ;\n                context.lineCap = strokeState.lineCap;\n            }\n            if (context.setLineDash) {\n                if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n                    context.setLineDash((contextStrokeState.lineDash = strokeState.lineDash));\n                }\n                if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n                    contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n                    context.lineDashOffset = strokeState.lineDashOffset;\n                }\n            }\n            if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n                contextStrokeState.lineJoin = strokeState.lineJoin;\n                context.lineJoin = strokeState.lineJoin;\n            }\n            if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n                contextStrokeState.lineWidth = strokeState.lineWidth;\n                context.lineWidth = strokeSta
 te.lineWidth;\n            }\n            if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n                contextStrokeState.miterLimit = strokeState.miterLimit;\n                context.miterLimit = strokeState.miterLimit;\n            }\n            if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n                contextStrokeState.strokeStyle = strokeState.strokeStyle;\n                context.strokeStyle = strokeState.strokeStyle;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").TextState} textState Text state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextTextState_ = function (textState) {\n        var context = this.context_;\n        var contextTextState = this.contextTextState_;\n        var textAlign = textState.textAlign\n            ? textState.textAlign\n            : defaultTextAlign;\n        if (!contextTextState) {\n            context.font = textState.font;\n           
  context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n            context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n            this.contextTextState_ = {\n                font: textState.font,\n                textAlign: textAlign,\n                textBaseline: textState.textBaseline,\n            };\n        }\n        else {\n            if (contextTextState.font != textState.font) {\n                contextTextState.font = textState.font;\n                context.font = textState.font;\n            }\n            if (contextTextState.textAlign != textAlign) {\n                contextTextState.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n                context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n            }\n            if (contextTextState.textBaseline != textState.textBaseline) {\n                contextTextState.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n        
         context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n            }\n        }\n    };\n    /**\n     * Set the fill and stroke style for subsequent draw operations.  To clear\n     * either fill or stroke styles, pass null for the appropriate parameter.\n     *\n     * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    CanvasImmediateRenderer.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) {\n        if (!fillStyle) {\n            this.fillState_ = null;\n        }\n        else {\n            var fillStyleColor = fillStyle.getColor();\n            this.fillState_ = {\n                fillStyle: asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle),\n            };\n        }\n        if (!strokeStyle) {\n            this.strokeState_ = null;\n        }\n        else {\n            var strokeStyleColo
 r = strokeStyle.getColor();\n            var strokeStyleLineCap = strokeStyle.getLineCap();\n            var strokeStyleLineDash = strokeStyle.getLineDash();\n            var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n            var strokeStyleLineJoin = strokeStyle.getLineJoin();\n            var strokeStyleWidth = strokeStyle.getWidth();\n            var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n            this.strokeState_ = {\n                lineCap: strokeStyleLineCap !== undefined\n                    ? strokeStyleLineCap\n                    : defaultLineCap,\n                lineDash: strokeStyleLineDash ? strokeStyleLineDash : defaultLineDash,\n                lineDashOffset: strokeStyleLineDashOffset\n                    ? strokeStyleLineDashOffset\n                    : defaultLineDashOffset,\n                lineJoin: strokeStyleLineJoin !== undefined\n                    ? strokeStyleLineJoin\n                    : defaultLineJoin,\n   
              lineWidth: this.pixelRatio_ *\n                    (strokeStyleWidth !== undefined\n                        ? strokeStyleWidth\n                        : defaultLineWidth),\n                miterLimit: strokeStyleMiterLimit !== undefined\n                    ? strokeStyleMiterLimit\n                    : defaultMiterLimit,\n                strokeStyle: asColorLike(strokeStyleColor ? strokeStyleColor : defaultStrokeStyle),\n            };\n        }\n    };\n    /**\n     * Set the image style for subsequent draw operations.  Pass null to remove\n     * the image style.\n     *\n     * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n     */\n    CanvasImmediateRenderer.prototype.setImageStyle = function (imageStyle) {\n        if (!imageStyle) {\n            this.image_ = null;\n        }\n        else {\n            var imageSize = imageStyle.getSize();\n            if (!imageSize) {\n                this.image_ = null;\n            }\n       
      else {\n                var imageAnchor = imageStyle.getAnchor();\n                // FIXME pixel ratio\n                var imageImage = imageStyle.getImage(1);\n                var imageOrigin = imageStyle.getOrigin();\n                var imageScale = imageStyle.getScaleArray();\n                this.imageAnchorX_ = imageAnchor[0];\n                this.imageAnchorY_ = imageAnchor[1];\n                this.imageHeight_ = imageSize[1];\n                this.image_ = imageImage;\n                this.imageOpacity_ = imageStyle.getOpacity();\n                this.imageOriginX_ = imageOrigin[0];\n                this.imageOriginY_ = imageOrigin[1];\n                this.imageRotateWithView_ = imageStyle.getRotateWithView();\n                this.imageRotation_ = imageStyle.getRotation();\n                this.imageScale_ = [\n                    this.pixelRatio_ * imageScale[0],\n                    this.pixelRatio_ * imageScale[1],\n                ];\n                this.imag
 eWidth_ = imageSize[0];\n            }\n        }\n    };\n    /**\n     * Set the text style for subsequent draw operations.  Pass null to\n     * remove the text style.\n     *\n     * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n     */\n    CanvasImmediateRenderer.prototype.setTextStyle = function (textStyle) {\n        if (!textStyle) {\n            this.text_ = '';\n        }\n        else {\n            var textFillStyle = textStyle.getFill();\n            if (!textFillStyle) {\n                this.textFillState_ = null;\n            }\n            else {\n                var textFillStyleColor = textFillStyle.getColor();\n                this.textFillState_ = {\n                    fillStyle: asColorLike(textFillStyleColor ? textFillStyleColor : defaultFillStyle),\n                };\n            }\n            var textStrokeStyle = textStyle.getStroke();\n            if (!textStrokeStyle) {\n                this.textStrokeState_ = null;\n        
     }\n            else {\n                var textStrokeStyleColor = textStrokeStyle.getColor();\n                var textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n                var textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n                var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n                var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n                var textStrokeStyleWidth = textStrokeStyle.getWidth();\n                var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n                this.textStrokeState_ = {\n                    lineCap: textStrokeStyleLineCap !== undefined\n                        ? textStrokeStyleLineCap\n                        : defaultLineCap,\n                    lineDash: textStrokeStyleLineDash\n                        ? textStrokeStyleLineDash\n                        : defaultLineDash,\n                    lineDashOffset: textStrokeStyleLineDashOffset\n  
                       ? textStrokeStyleLineDashOffset\n                        : defaultLineDashOffset,\n                    lineJoin: textStrokeStyleLineJoin !== undefined\n                        ? textStrokeStyleLineJoin\n                        : defaultLineJoin,\n                    lineWidth: textStrokeStyleWidth !== undefined\n                        ? textStrokeStyleWidth\n                        : defaultLineWidth,\n                    miterLimit: textStrokeStyleMiterLimit !== undefined\n                        ? textStrokeStyleMiterLimit\n                        : defaultMiterLimit,\n                    strokeStyle: asColorLike(textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle),\n                };\n            }\n            var textFont = textStyle.getFont();\n            var textOffsetX = textStyle.getOffsetX();\n            var textOffsetY = textStyle.getOffsetY();\n            var textRotateWithView = textStyle.getRotateWithView();\n            var text
 Rotation = textStyle.getRotation();\n            var textScale = textStyle.getScaleArray();\n            var textText = textStyle.getText();\n            var textTextAlign = textStyle.getTextAlign();\n            var textTextBaseline = textStyle.getTextBaseline();\n            this.textState_ = {\n                font: textFont !== undefined ? textFont : defaultFont,\n                textAlign: textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n                textBaseline: textTextBaseline !== undefined\n                    ? textTextBaseline\n                    : defaultTextBaseline,\n            };\n            this.text_ = textText !== undefined ? textText : '';\n            this.textOffsetX_ =\n                textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n            this.textOffsetY_ =\n                textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n            this.textRotateWithView_ =\n                textRotateWithView !==
  undefined ? textRotateWithView : false;\n            this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n            this.textScale_ = [\n                this.pixelRatio_ * textScale[0],\n                this.pixelRatio_ * textScale[1],\n            ];\n        }\n    };\n    return CanvasImmediateRenderer;\n}(VectorContext));\nexport default CanvasImmediateRenderer;\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/render/canvas/BuilderType\n */\n/**\n * @enum {string}\n */\nexport default {\n    CIRCLE: 'Circle',\n    DEFAULT: 'Default',\n    IMAGE: 'Image',\n    LINE_STRING: 'LineString',\n    POLYGON: 'Polygon',\n    TEXT: 'Text',\n};\n//# sourceMappingURL=BuilderType.js.map","/**\n * @module ol/ImageState\n */\n/**\n * @enum {number}\n */\nexport default {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    ERROR: 3,\n    EMPTY: 4,\n};\n//# sourceMappingURL=ImageState.js.map","/**\n * @module ol/renderer/vector\n */\nimport BuilderType from '../rende
 r/canvas/BuilderType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ImageState from '../ImageState.js';\nimport { getUid } from '../util.js';\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n *                function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                         import(\"../style/Style.js\").default, Object): void>}\n */\nvar GEOMETRY_RENDERERS = {\n    'Point': renderPointGeometry,\n    'LineString': renderLineStringGeometry,\n    'Polygon': renderPolygonGeometry,\n    'MultiPoint': renderMultiPointGeometry,\n    'MultiLineString': renderMultiLineStringGeometry,\n    'MultiPolygon': renderMultiPolygonGeometry,\n    'GeometryCollection': renderGeometryCollectionGeometry,\n    'Circle': renderCircleGeometry,\n};\n/**\n * @param {import(\"..
 /Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n    return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n    var tolerance = getTolerance(resolution, pixelRatio);\n    return tolerance * tolerance;\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n    return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geomet
 ry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var circleReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.CIRCLE);\n        circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        circleReplay.drawCircle(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature F
 eature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n * @return {boolean} `true` if style is loading.\n * @template T\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, opt_transform) {\n    var loading = false;\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        var imageState = imageStyle.getImageState();\n        if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n            imageStyle.unlistenImageChange(listener);\n        }\n        else {\n            if (imageState == ImageState.IDLE) {\n                imageStyle.load();\n            }\n            imageState = imageStyle.getImageState();\n            imageStyle.l
 istenImageChange(listener);\n            loading = true;\n        }\n    }\n    renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform);\n    return loading;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform) {\n    var geometry = style.getGeometryFunction()(feature);\n    if (!geometry) {\n        return;\n    }\n    var simplifiedGeometry = geometry.simplifyTransformed(squaredTolerance, opt_transform);\n    var renderer = style.getRenderer();\n    if (renderer) {\n        renderGeometry(replayGroup, simplifiedGeometry, style, 
 feature);\n    }\n    else {\n        var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n        geometryRenderer(replayGroup, simplifiedGeometry, style, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n    if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n        var geometries = /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            renderGeometry(replayGroup, geometries[i], style, feature);\n        }\n        return;\n    }\n    var replay = replayGroup
 .getBuilder(style.getZIndex(), BuilderType.DEFAULT);\n    replay.drawCustom(\n    /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer());\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {\n    var geometries = geometry.getGeometriesArray();\n    var i, ii;\n    for (i = 0, ii = geometries.length; i < ii; ++i) {\n        var geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n        geometryRenderer(replayGroup, geometries[i], style, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Li
 neString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderLineStringGeometry(builderGroup, geometry, style, feature) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.LINE_STRING);\n        lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {imp
 ort(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiLineStringGeometry(builderGroup, geometry, style, feature) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.LINE_STRING);\n        lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawMultiLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGrou
 p Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderMultiPolygonGeometry(builderGroup, geometry, style, feature) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (strokeStyle || fillStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.POLYGON);\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawMultiPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").
 default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPointGeometry(builderGroup, geometry, style, feature) {\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.IMAGE);\n        imageReplay.setImageStyle(imageStyle, builderGroup.addDeclutter(false));\n        imageReplay.drawPoint(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(!!imageStyle));\n        textReplay
 .drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiPointGeometry(builderGroup, geometry, style, feature) {\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.IMAGE);\n        imageReplay.setImageStyle(imageStyle, builderGroup.addDeclutter(false));\n        imageReplay.drawMultiPoint(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), Builder
 Type.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(!!imageStyle));\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.POLYGON);\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle) {\n        var textRe
 play = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n        textReplay.drawText(geometry, feature);\n    }\n}\n//# sourceMappingURL=vector.js.map","/**\n * @module ol/render\n */\nimport CanvasImmediateRenderer from './render/canvas/Immediate.js';\nimport { DEVICE_PIXEL_RATIO } from './has.js';\nimport { apply as applyTransform, create as createTransform, multiply as multiplyTransform, scale as scaleTransform, } from './transform.js';\nimport { getSquaredTolerance } from './renderer/vector.js';\nimport { getTransformFromProjections, getUserProjection } from './proj.js';\n/**\n * @typedef {Object} State\n * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.\n * @property {import(\"./Feature.js\").FeatureLike} feature\n * @property {import(\"./geom/SimpleGeometry.js\").default} geometry\n * @property {number} pixelRatio Pixel ratio used by the 
 layer renderer.\n * @property {number} resolution Resolution that the render batch was created and optimized for.\n * This is not the view's resolution that is being rendered.\n * @property {number} rotation Rotation of the rendered layer in radians.\n */\n/**\n * A function to be used when sorting features before rendering.\n * It takes two instances of {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and returns a `{number}`.\n *\n * @typedef {function(import(\"./Feature.js\").FeatureLike, import(\"./Feature.js\").FeatureLike):number} OrderFunction\n */\n/**\n * @typedef {Object} ToContextOptions\n * @property {import(\"./size.js\").Size} [size] Desired size of the canvas in css\n * pixels. When provided, both canvas and css size will be set according to the\n * `pixelRatio`. If not provided, the current canvas and css sizes will not be\n * altered.\n * @property {number} [pixelRatio=window.devicePixelRatio] Pixel ratio (canvas\n * pixel to css pixel ratio) for th
 e canvas.\n */\n/**\n * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries\n * to the context's canvas.\n *\n * The units for geometry coordinates are css pixels relative to the top left\n * corner of the canvas element.\n * ```js\n * import {toContext} from 'ol/render';\n * import Fill from 'ol/style/Fill';\n * import Polygon from 'ol/geom/Polygon';\n *\n * var canvas = document.createElement('canvas');\n * var render = toContext(canvas.getContext('2d'),\n *     { size: [100, 100] });\n * render.setFillStrokeStyle(new Fill({ color: blue }));\n * render.drawPolygon(\n *     new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));\n * ```\n *\n * @param {CanvasRenderingContext2D} context Canvas context.\n * @param {ToContextOptions=} opt_options Options.\n * @return {CanvasImmediateRenderer} Canvas Immediate.\n * @api\n */\nexport function toContext(context, opt_options) {\n    var canvas = context.canvas;\n    var options = opt_options ? opt_options : {};\n
     var pixelRatio = options.pixelRatio || DEVICE_PIXEL_RATIO;\n    var size = options.size;\n    if (size) {\n        canvas.width = size[0] * pixelRatio;\n        canvas.height = size[1] * pixelRatio;\n        canvas.style.width = size[0] + 'px';\n        canvas.style.height = size[1] + 'px';\n    }\n    var extent = [0, 0, canvas.width, canvas.height];\n    var transform = scaleTransform(createTransform(), pixelRatio, pixelRatio);\n    return new CanvasImmediateRenderer(context, pixelRatio, extent, transform, 0);\n}\n/**\n * Gets a vector context for drawing to the event's canvas.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @returns {CanvasImmediateRenderer} Vector context.\n * @api\n */\nexport function getVectorContext(event) {\n    var frameState = event.frameState;\n    var transform = multiplyTransform(event.inversePixelTransform.slice(), frameState.coordinateToPixelTransform);\n    var squaredTolerance = getSquaredTolerance(frameState.viewStat
 e.resolution, frameState.pixelRatio);\n    var userTransform;\n    var userProjection = getUserProjection();\n    if (userProjection) {\n        userTransform = getTransformFromProjections(userProjection, frameState.viewState.projection);\n    }\n    return new CanvasImmediateRenderer(event.context, frameState.pixelRatio, frameState.extent, transform, frameState.viewState.rotation, squaredTolerance, userTransform);\n}\n/**\n * Gets the pixel of the event's canvas context from the map viewport's CSS pixel.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @param {import(\"./pixel.js\").Pixel} pixel CSS pixel relative to the top-left\n * corner of the map viewport.\n * @returns {import(\"./pixel.js\").Pixel} Pixel on the event's canvas context.\n * @api\n */\nexport function getRenderPixel(event, pixel) {\n    var result = pixel.slice(0);\n    applyTransform(event.inversePixelTransform.slice(), result);\n    return result;\n}\n/**\n * @param {import(\"./Plugga
 bleMap.js\").FrameState} frameState Frame state.\n * @param {?} declutterTree Declutter tree.\n * @returns {?} Declutter tree.\n */\nexport function renderDeclutterItems(frameState, declutterTree) {\n    if (declutterTree) {\n        declutterTree.clear();\n    }\n    var items = frameState.declutterItems;\n    for (var z = items.length - 1; z >= 0; --z) {\n        var item = items[z];\n        var zIndexItems = item.items;\n        for (var i = 0, ii = zIndexItems.length; i < ii; i += 3) {\n            declutterTree = zIndexItems[i].renderDeclutter(zIndexItems[i + 1], zIndexItems[i + 2], item.opacity, declutterTree);\n        }\n    }\n    items.length = 0;\n    return declutterTree;\n}\n//# sourceMappingURL=render.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            func
 tion (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport { TRUE } from '../functions.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, makeInverse } from '../transform.js';\nimport { getWidth } from '../extent.js';\nimport { shared as iconImageCache } from '../style/IconImageCache.js';\nimport { inView } from '../layer/Layer.js';\nimport { renderDeclutterItems } from '../render.js';\nimport { wrapX } from '../coordinate.js';\n/**\n * @abstract\n */\nvar MapRenderer = /** @class */ (function (_super) {\n    __extends(MapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.
 js\").default} map Map.\n     */\n    function MapRenderer(map) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = map;\n        /**\n         * @private\n         */\n        _this.declutterTree_ = null;\n        return _this;\n    }\n    /**\n     * @abstract\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        abstract();\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @protected\n     */\n    MapRenderer.prototype.calculateMatrices2D = function (frameState) {\n        var viewState = frameState.viewState;\n        var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n        va
 r pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n        composeTransform(coordinateToPixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / viewState.resolution, -1 / viewState.resolution, -viewState.rotation, -viewState.center[0], -viewState.center[1]);\n        makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {function(this: S, import(\"../Feature.js\").FeatureLike,\n     *     import(\"../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {S} thisArg Value to use as `this` when executing `callback`.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} laye
 rFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n     * @return {T|undefined} Callback result.\n     * @template S,T,U\n     */\n    MapRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, callback, thisArg, layerFilter, thisArg2) {\n        var result;\n        var viewState = frameState.viewState;\n        /**\n         * @param {boolean} managed Managed layer.\n         * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         * @return {?} Callback result.\n         */\n        function forEachFeatureAtCoordinate(managed, feature, layer) {\n            return callback.call(thisArg, feature
 , managed ? layer : null);\n        }\n        var projection = viewState.projection;\n        var translatedCoordinate = wrapX(coordinate.slice(), projection);\n        var offsets = [[0, 0]];\n        if (projection.canWrapX() && checkWrapped) {\n            var projectionExtent = projection.getExtent();\n            var worldWidth = getWidth(projectionExtent);\n            offsets.push([-worldWidth, 0], [worldWidth, 0]);\n        }\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        var declutteredFeatures;\n        if (this.declutterTree_) {\n            declutteredFeatures = this.declutterTree_.all().map(function (entry) {\n                return entry.value;\n            });\n        }\n        var tmpCoord = [];\n        for (var i = 0; i < offsets.length; i++) {\n            for (var j = numLayers - 1; j >= 0; --j) {\n                var layerState = layerStates[j];\n                var layer = /** @type {import(\"../
 layer/Layer.js\").default} */ (layerState.layer);\n                if (layer.hasRenderer() &&\n                    inView(layerState, viewState) &&\n                    layerFilter.call(thisArg2, layer)) {\n                    var layerRenderer = layer.getRenderer();\n                    var source = layer.getSource();\n                    if (layerRenderer && source) {\n                        var coordinates = source.getWrapX()\n                            ? translatedCoordinate\n                            : coordinate;\n                        var callback_1 = forEachFeatureAtCoordinate.bind(null, layerState.managed);\n                        tmpCoord[0] = coordinates[0] + offsets[i][0];\n                        tmpCoord[1] = coordinates[1] + offsets[i][1];\n                        result = layerRenderer.forEachFeatureAtCoordinate(tmpCoord, frameState, hitTolerance, callback_1, declutteredFeatures);\n                    }\n                    if (result) {\n                     
    return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {function(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    MapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        return abst
 ract();\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n     * @return {boolean} Is there a feature at the given coordinate?\n     * @template U\n     */\n    MapRenderer.prototype.hasFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, layerFilter, thisArg) {\n        var hasFeature = this.forEachFeatureAtCoordinate(c
 oordinate, frameState, hitTolerance, checkWrapped, TRUE, this, layerFilter, thisArg);\n        return hasFeature !== undefined;\n    };\n    /**\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     */\n    MapRenderer.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Render.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.renderFrame = function (frameState) {\n        this.declutterTree_ = renderDeclutterItems(frameState, this.declutterTree_);\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    MapRenderer.prototype.scheduleExpireIconCache = function (frameState) {\n        if (iconImageCache.canExpireCache()) {\n            frameState.postRenderFunctions.push(expireIconCache);\n        }\n    };\n    return MapRenderer;\n}(Disposable));\n/**\n * @param {import(\"../PluggableMap.js\"
 ).default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n    iconImageCache.expire();\n}\nexport default MapRenderer;\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/render/Event\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Event from '../events/Event.js';\nvar RenderEvent = /** @class */ (function (_super) {\n    __extends(Rende
 rEvent, _super);\n    /**\n     * @param {import(\"./EventType.js\").default} type Type.\n     * @param {import(\"../transform.js\").Transform=} opt_inversePixelTransform Transform for\n     *     CSS pixels to rendered pixels.\n     * @param {import(\"../PluggableMap.js\").FrameState=} opt_frameState Frame state.\n     * @param {?CanvasRenderingContext2D=} opt_context Context.\n     */\n    function RenderEvent(type, opt_inversePixelTransform, opt_frameState, opt_context) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n         * to rendered pixels on this event's `context`.\n         * @type {import(\"../transform.js\").Transform|undefined}\n         * @api\n         */\n        _this.inversePixelTransform = opt_inversePixelTransform;\n        /**\n         * An object representing the current render frame state.\n         * @type {import(\"../PluggableMap.js\").FrameS
 tate|undefined}\n         * @api\n         */\n        _this.frameState = opt_frameState;\n        /**\n         * Canvas context. Not available when the event is dispatched by the map. Only available\n         * when a Canvas renderer is used, null otherwise.\n         * @type {CanvasRenderingContext2D|null|undefined}\n         * @api\n         */\n        _this.context = opt_context;\n        return _this;\n    }\n    return RenderEvent;\n}(Event));\nexport default RenderEvent;\n//# sourceMappingURL=Event.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constr
 uctor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { checkedFonts } from '../render/canvas.js';\nimport { inView } from '../layer/Layer.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { replaceChildren } from '../dom.js';\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CompositeMapRenderer = /** @class */ (function (_super) {\n    __extends(CompositeMapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function CompositeMapRenderer(map) {\n        var _this = _super.call(this, map) || th
 is;\n        /**\n         * @type {import(\"../events.js\").EventsKey}\n         */\n        _this.fontChangeListenerKey_ = listen(checkedFonts, ObjectEventType.PROPERTYCHANGE, map.redrawText.bind(map));\n        /**\n         * @private\n         * @type {HTMLDivElement}\n         */\n        _this.element_ = document.createElement('div');\n        var style = _this.element_.style;\n        style.position = 'absolute';\n        style.width = '100%';\n        style.height = '100%';\n        style.zIndex = '0';\n        _this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n        var container = map.getViewport();\n        container.insertBefore(_this.element_, container.firstChild || null);\n        /**\n         * @private\n         * @type {Array<HTMLElement>}\n         */\n        _this.children_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = true;\n        return _this;\n    }\n    /**\n     * @param 
 {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        var map = this.getMap();\n        if (map.hasListener(type)) {\n            var event_1 = new RenderEvent(type, undefined, frameState);\n            map.dispatchEvent(event_1);\n        }\n    };\n    CompositeMapRenderer.prototype.disposeInternal = function () {\n        unlistenByKey(this.fontChangeListenerKey_);\n        this.element_.parentNode.removeChild(this.element_);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Render.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.renderFrame = function (frameState) {\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                this.element_.style.displa
 y = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        this.calculateMatrices2D(frameState);\n        this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n        var layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n            return a.zIndex - b.zIndex;\n        });\n        var viewState = frameState.viewState;\n        this.children_.length = 0;\n        var previousElement = null;\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            frameState.layerIndex = i;\n            if (!inView(layerState, viewState) ||\n                (layerState.sourceState != SourceState.READY &&\n                    layerState.sourceState != SourceState.UNDEFINED)) {\n                continue;\n            }\n            var layer = layerState.layer;\n            var element = layer.render(frameState, previousElement);\n     
        if (!element) {\n                continue;\n            }\n            if (element !== previousElement) {\n                this.children_.push(element);\n                previousElement = element;\n            }\n        }\n        _super.prototype.renderFrame.call(this, frameState);\n        replaceChildren(this.element_, this.children_);\n        this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n        if (!this.renderedVisible_) {\n            this.element_.style.display = '';\n            this.renderedVisible_ = true;\n        }\n        this.scheduleExpireIconCache(frameState);\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {functio
 n(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CompositeMapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        var viewState = frameState.viewState;\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        for (var i = numLayers - 1; i >= 0; --i) {\n            var layerState = layerStates[i];\n            var layer = layerState.layer;\n            if (layer.hasRenderer() &&\n                inView(layerState, viewState) &&\n                layerFilter(layer)) {\n                var layerRenderer = layer.getRenderer();\n                var data = layerRenderer.getDa
 taAtPixel(pixel, frameState, hitTolerance);\n                if (data) {\n                    var result = callback(layer, data);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    return CompositeMapRenderer;\n}(MapRenderer));\nexport default CompositeMapRenderer;\n//# sourceMappingURL=Composite.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype =
  b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Group\n */\nimport BaseLayer from './Base.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport SourceState from '../source/State.js';\nimport { assert } from '../asserts.js';\nimport { assign, clear } from '../obj.js';\nimport { getChangeEventType } from '../Object.js';\nimport { getIntersection } from '../extent.js';\nimport { getUid } from '../util.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer 
 rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(
 \"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    LAYERS: 'layers',\n};\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @api\n */\nvar LayerGroup = /** @class */ (function (_super) {\n    __extends(LayerGroup, _super);\n    /**\n     * @param {Options=} opt_options Layer options.\n     */\n    function LayerGroup(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var baseOptions = /** @type {Options} */ (assign({}, options));\n        delete baseOptions.layers;\n        var layers = options.layers;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         */\n    
     _this.layersListenerKeys_ = [];\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n         */\n        _this.listenerKeys_ = {};\n        _this.addEventListener(getChangeEventType(Property.LAYERS), _this.handleLayersChanged_);\n        if (layers) {\n            if (Array.isArray(layers)) {\n                layers = new Collection(layers.slice(), { unique: true });\n            }\n            else {\n                assert(typeof ( /** @type {?} */(layers).getArray) === 'function', 43); // Expected `layers` to be an array or a `Collection`\n            }\n        }\n        else {\n            layers = new Collection(undefined, { unique: true });\n        }\n        _this.setLayers(layers);\n        return _this;\n    }\n    /**\n     * @private\n     */\n    LayerGroup.prototype.handleLayerChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    LayerGroup.prototype.handleLaye
 rsChanged_ = function () {\n        this.layersListenerKeys_.forEach(unlistenByKey);\n        this.layersListenerKeys_.length = 0;\n        var layers = this.getLayers();\n        this.layersListenerKeys_.push(listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this), listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this));\n        for (var id in this.listenerKeys_) {\n            this.listenerKeys_[id].forEach(unlistenByKey);\n        }\n        clear(this.listenerKeys_);\n        var layersArray = layers.getArray();\n        for (var i = 0, ii = layersArray.length; i < ii; i++) {\n            var layer = layersArray[i];\n            this.listenerKeys_[getUid(layer)] = [\n                listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n                listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n            ];\n        }\n        this.changed();\n    };\n    /**\n     * @param {import(\"../Collection.
 js\").CollectionEvent} collectionEvent CollectionEvent.\n     * @private\n     */\n    LayerGroup.prototype.handleLayersAdd_ = function (collectionEvent) {\n        var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n        this.listenerKeys_[getUid(layer)] = [\n            listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n            listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n        ];\n        this.changed();\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n     * @private\n     */\n    LayerGroup.prototype.handleLayersRemove_ = function (collectionEvent) {\n        var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n        var key = getUid(layer);\n        this.listenerKeys_[key].forEach(unlistenByKey);\n        delete this.listenerKeys_[key];\n        this.changed();\n    };\n    /**\n     * Return
 s the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n     * in this group.\n     * @return {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} Collection of\n     *   {@link module:ol/layer/Base layers} that are part of this group.\n     * @observable\n     * @api\n     */\n    LayerGroup.prototype.getLayers = function () {\n        return /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(Property.LAYERS));\n    };\n    /**\n     * Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n     * in this group.\n     * @param {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} layers Collection of\n     *   {@link module:ol/layer/Base layers} that are part of this group.\n     * @observable\n     * @api\n     */\n    LayerGroup.prototype.setLayers = function (layers) {\n        this.set(Property.LAYERS, layers);\n    };\n    /*
 *\n     * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    LayerGroup.prototype.getLayersArray = function (opt_array) {\n        var array = opt_array !== undefined ? opt_array : [];\n        this.getLayers().forEach(function (layer) {\n            layer.getLayersArray(array);\n        });\n        return array;\n    };\n    /**\n     * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    LayerGroup.prototype.getLayerStatesArray = function (opt_states) {\n        var states = opt_states !== undefined ? opt_states : [];\n        var pos = states.length;\n        this.getLayers().forEach(function (layer) {\n            layer.getLayerStatesArray(states);\n        });\n        var ownLayerState = this.
 getLayerState();\n        for (var i = pos, ii = states.length; i < ii; i++) {\n            var layerState = states[i];\n            layerState.opacity *= ownLayerState.opacity;\n            layerState.visible = layerState.visible && ownLayerState.visible;\n            layerState.maxResolution = Math.min(layerState.maxResolution, ownLayerState.maxResolution);\n            layerState.minResolution = Math.max(layerState.minResolution, ownLayerState.minResolution);\n            layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n            layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n            if (ownLayerState.extent !== undefined) {\n                if (layerState.extent !== undefined) {\n                    layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);\n                }\n                else {\n                    layerState.extent = ownLayerState.extent;\n                }\n            }\n     
    }\n        return states;\n    };\n    /**\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    LayerGroup.prototype.getSourceState = function () {\n        return SourceState.READY;\n    };\n    return LayerGroup;\n}(BaseLayer));\nexport default LayerGroup;\n//# sourceMappingURL=Group.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event
 .js';\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.\n */\nvar MapEvent = /** @class */ (function (_super) {\n    __extends(MapEvent, _super);\n    /**\n     * @param {string} type Event type.\n     * @param {import(\"./PluggableMap.js\").default} map Map.\n     * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n     */\n    function MapEvent(type, map, opt_frameState) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The map where the event occurred.\n         * @type {import(\"./PluggableMap.js\").default}\n         * @api\n         */\n        _this.map = map;\n        /**\n         * The frame state at the time of the event.\n         * @type {?import(\"./PluggableMap.js\").FrameState}\n         * @api\n         */\n        _this.frameState = opt_frameState !== undefined ? opt_frameState : null;
 \n        return _this;\n    }\n    return MapEvent;\n}(Event));\nexport default MapEvent;\n//# sourceMappingURL=MapEvent.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.\n
  * @template {UIEvent} EVENT\n */\nvar MapBrowserEvent = /** @class */ (function (_super) {\n    __extends(MapBrowserEvent, _super);\n    /**\n     * @param {string} type Event type.\n     * @param {import(\"./PluggableMap.js\").default} map Map.\n     * @param {EVENT} originalEvent Original event.\n     * @param {boolean=} opt_dragging Is the map currently being dragged?\n     * @param {?import(\"./PluggableMap.js\").FrameState=} opt_frameState Frame state.\n     */\n    function MapBrowserEvent(type, map, originalEvent, opt_dragging, opt_frameState) {\n        var _this = _super.call(this, type, map, opt_frameState) || this;\n        /**\n         * The original browser event.\n         * @const\n         * @type {EVENT}\n         * @api\n         */\n        _this.originalEvent = originalEvent;\n        /**\n         * The map pixel relative to the viewport corresponding to the original browser event.\n         * @type {?import(\"./pixel.js\").Pixel}\n         */\n        _this.p
 ixel_ = null;\n        /**\n         * The coordinate in the user projection corresponding to the original browser event.\n         * @type {?import(\"./coordinate.js\").Coordinate}\n         */\n        _this.coordinate_ = null;\n        /**\n         * Indicates if the map is currently being dragged. Only set for\n         * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n         *\n         * @type {boolean}\n         * @api\n         */\n        _this.dragging = opt_dragging !== undefined ? opt_dragging : false;\n        return _this;\n    }\n    Object.defineProperty(MapBrowserEvent.prototype, \"pixel\", {\n        /**\n         * The map pixel relative to the viewport corresponding to the original event.\n         * @type {import(\"./pixel.js\").Pixel}\n         * @api\n         */\n        get: function () {\n            if (!this.pixel_) {\n                this.pixel_ = this.map.getEventPixel(this.originalEvent);\n            }\n            return this.pixel_;\
 n        },\n        set: function (pixel) {\n            this.pixel_ = pixel;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MapBrowserEvent.prototype, \"coordinate\", {\n        /**\n         * The coordinate corresponding to the original browser event.  This will be in the user\n         * projection if one is set.  Otherwise it will be in the view projection.\n         * @type {import(\"./coordinate.js\").Coordinate}\n         * @api\n         */\n        get: function () {\n            if (!this.coordinate_) {\n                this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n            }\n            return this.coordinate_;\n        },\n        set: function (coordinate) {\n            this.coordinate_ = coordinate;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Prevents the default browser action.\n     * See https://developer.mozilla.org/en-US/docs/Web/API
 /event.preventDefault.\n     * @api\n     */\n    MapBrowserEvent.prototype.preventDefault = function () {\n        _super.prototype.preventDefault.call(this);\n        this.originalEvent.preventDefault();\n    };\n    /**\n     * Prevents further propagation of the current event.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n     * @api\n     */\n    MapBrowserEvent.prototype.stopPropagation = function () {\n        _super.prototype.stopPropagation.call(this);\n        this.originalEvent.stopPropagation();\n    };\n    return MapBrowserEvent;\n}(MapEvent));\nexport default MapBrowserEvent;\n//# sourceMappingURL=MapBrowserEvent.js.map","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n    /**\n     * A true single click with no dragging and no double click. Note that this\n     * event is delayed by 250 ms to ensure that it 
 is not a double click.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n     * @api\n     */\n    SINGLECLICK: 'singleclick',\n    /**\n     * A click with no dragging. A double click will fire two of this.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n     * @api\n     */\n    CLICK: EventType.CLICK,\n    /**\n     * A true double click, with no dragging.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n     * @api\n     */\n    DBLCLICK: EventType.DBLCLICK,\n    /**\n     * Triggered when a pointer is dragged.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n     * @api\n     */\n    POINTERDRAG: 'pointerdrag',\n    /**\n     * Triggered when a pointer is moved. Note that on touch devices this is\n     * triggered when the map is panned, so is not the same as mousemove.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n     * @api\n     */\n    POINTERMOVE: 'pointermove',\n    POINTER
 DOWN: 'pointerdown',\n    POINTERUP: 'pointerup',\n    POINTEROVER: 'pointerover',\n    POINTEROUT: 'pointerout',\n    POINTERENTER: 'pointerenter',\n    POINTERLEAVE: 'pointerleave',\n    POINTERCANCEL: 'pointercancel',\n};\n//# sourceMappingURL=MapBrowserEventType.js.map","/**\n * @module ol/pointer/EventType\n */\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n    POINTERMOVE: 'pointermove',\n    POINTERDOWN: 'pointerdown',\n    POINTERUP: 'pointerup',\n    POINTEROVER: 'pointerover',\n    POINTEROUT: 'pointerout',\n    POINTERENTER: 'pointerenter',\n    POINTERLEAVE: 'pointerleave',\n    POINTERCANCEL: 'pointercancel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/MapBrowserEventHandler\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) 
 ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport { DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS } from './has.js';\nimport { listen, unlistenByKey } from './events.js';\nvar MapBrowserEventHandler = /** @class */ (function (_super) {\n    __extends(MapBrowserEventHandler, _super);\n    /**\n     * @param {import(\"./PluggableMap.js\").default} map The map with the viewport to listen to events on.\n     * @param {nu
 mber=} moveTolerance The minimal distance the pointer must travel to trigger a move.\n     */\n    function MapBrowserEventHandler(map, moveTolerance) {\n        var _this = _super.call(this, map) || this;\n        /**\n         * This is the element that we will listen to the real events on.\n         * @type {import(\"./PluggableMap.js\").default}\n         * @private\n         */\n        _this.map_ = map;\n        /**\n         * @type {any}\n         * @private\n         */\n        _this.clickTimeoutId_;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.dragging_ = false;\n        /**\n         * @type {!Array<import(\"./events.js\").EventsKey>}\n         * @private\n         */\n        _this.dragListenerKeys_ = [];\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.moveTolerance_ = moveTolerance\n            ? moveTolerance * DEVICE_PIXEL_RATIO\n            : DEVICE_PIXEL_RATIO;\n        /**\n     
     * The most recent \"down\" type event (or null if none have occurred).\n         * Set on pointerdown.\n         * @type {PointerEvent}\n         * @private\n         */\n        _this.down_ = null;\n        var element = _this.map_.getViewport();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.activePointers_ = 0;\n        /**\n         * @type {!Object<number, boolean>}\n         * @private\n         */\n        _this.trackedTouches_ = {};\n        _this.element_ = element;\n        /**\n         * @type {?import(\"./events.js\").EventsKey}\n         * @private\n         */\n        _this.pointerdownListenerKey_ = listen(element, PointerEventType.POINTERDOWN, _this.handlePointerDown_, _this);\n        /**\n         * @type {PointerEvent}\n         * @private\n         */\n        _this.originalPointerMoveEvent_;\n        /**\n         * @type {?import(\"./events.js\").EventsKey}\n         * @private\n         */\n        _this.relayedLi
 stenerKey_ = listen(element, PointerEventType.POINTERMOVE, _this.relayEvent_, _this);\n        /**\n         * @private\n         */\n        _this.boundHandleTouchMove_ = _this.handleTouchMove_.bind(_this);\n        _this.element_.addEventListener(EventType.TOUCHMOVE, _this.boundHandleTouchMove_, PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n        return _this;\n    }\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.emulateClick_ = function (pointerEvent) {\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.CLICK, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        if (this.clickTimeoutId_ !== undefined) {\n            // double-click\n            clearTimeout(this.clickTimeoutId_);\n            this.clickTimeoutId_ = undefined;\n            newEvent = new MapBrowserEvent(MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);\n            this.di
 spatchEvent(newEvent);\n        }\n        else {\n            // click\n            this.clickTimeoutId_ = setTimeout(function () {\n                this.clickTimeoutId_ = undefined;\n                var newEvent = new MapBrowserEvent(MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);\n                this.dispatchEvent(newEvent);\n            }.bind(this), 250);\n        }\n    };\n    /**\n     * Keeps track on how many pointers are currently active.\n     *\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.updateActivePointers_ = function (pointerEvent) {\n        var event = pointerEvent;\n        if (event.type == MapBrowserEventType.POINTERUP ||\n            event.type == MapBrowserEventType.POINTERCANCEL) {\n            delete this.trackedTouches_[event.pointerId];\n        }\n        else if (event.type == MapBrowserEventType.POINTERDOWN) {\n            this.trackedTouches_[event.pointer
 Id] = true;\n        }\n        this.activePointers_ = Object.keys(this.trackedTouches_).length;\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerUp_ = function (pointerEvent) {\n        this.updateActivePointers_(pointerEvent);\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERUP, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        // We emulate click events on left mouse button click, touch contact, and pen\n        // contact. isMouseActionButton returns true in these cases (evt.button is set\n        // to 0).\n        // See http://www.w3.org/TR/pointerevents/#button-states\n        // We only fire click, singleclick, and doubleclick if nobody has called\n        // event.stopPropagation() or event.preventDefault().\n        if (!newEvent.propagationStopped &&\n            !this.dragging_ &&\n            this.isMouseActionButt
 on_(pointerEvent)) {\n            this.emulateClick_(this.down_);\n        }\n        if (this.activePointers_ === 0) {\n            this.dragListenerKeys_.forEach(unlistenByKey);\n            this.dragListenerKeys_.length = 0;\n            this.dragging_ = false;\n            this.down_ = null;\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @return {boolean} If the left mouse button was pressed.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.isMouseActionButton_ = function (pointerEvent) {\n        return pointerEvent.button === 0;\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerDown_ = function (pointerEvent) {\n        this.updateActivePointers_(pointerEvent);\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);
 \n        this.down_ = pointerEvent;\n        if (this.dragListenerKeys_.length === 0) {\n            this.dragListenerKeys_.push(listen(document, MapBrowserEventType.POINTERMOVE, this.handlePointerMove_, this), listen(document, MapBrowserEventType.POINTERUP, this.handlePointerUp_, this), \n            /* Note that the listener for `pointercancel is set up on\n             * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n             * the `pointerup` and `pointermove` listeners.\n             *\n             * The reason for this is the following: `TouchSource.vacuumTouches_()`\n             * issues `pointercancel` events, when there was no `touchend` for a\n             * `touchstart`. Now, let's say a first `touchstart` is registered on\n             * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n             * But `documentPointerEventHandler_` doesn't know about the first\n             * `touchstart`. If there is no `touchend` for
  the `touchstart`, we can\n             * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n             * only registered there.\n             */\n            listen(this.element_, MapBrowserEventType.POINTERCANCEL, this.handlePointerUp_, this));\n            if (this.element_.getRootNode &&\n                this.element_.getRootNode() !== document) {\n                this.dragListenerKeys_.push(listen(this.element_.getRootNode(), MapBrowserEventType.POINTERUP, this.handlePointerUp_, this));\n            }\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerMove_ = function (pointerEvent) {\n        // Between pointerdown and pointerup, pointermove events are triggered.\n        // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n        // moved a significant distance.\n        if (this.isMoving_(pointerEvent)) {\
 n            this.dragging_ = true;\n            var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent, this.dragging_);\n            this.dispatchEvent(newEvent);\n        }\n    };\n    /**\n     * Wrap and relay a pointer event.  Note that this requires that the type\n     * string for the MapBrowserEvent matches the PointerEvent type.\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.relayEvent_ = function (pointerEvent) {\n        this.originalPointerMoveEvent_ = pointerEvent;\n        var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n        this.dispatchEvent(new MapBrowserEvent(pointerEvent.type, this.map_, pointerEvent, dragging));\n    };\n    /**\n     * Flexible handling of a `touch-action: none` css equivalent: because calling\n     * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n     * and zooming, we als
 o listen for `touchmove` and call `preventDefault()` on it\n     * when an interaction (currently `DragPan` handles the event.\n     * @param {TouchEvent} event Event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handleTouchMove_ = function (event) {\n        // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n        // may not be initialized yet when we get here on a platform without native pointer events.\n        if (!this.originalPointerMoveEvent_ ||\n            this.originalPointerMoveEvent_.defaultPrevented) {\n            event.preventDefault();\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @return {boolean} Is moving.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.isMoving_ = function (pointerEvent) {\n        return (this.dragging_ ||\n            Math.abs(pointerEvent.clientX - this.down_.clientX) >\n                this.moveTolerance_ ||\n 
            Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_);\n    };\n    /**\n     * Clean up.\n     */\n    MapBrowserEventHandler.prototype.disposeInternal = function () {\n        if (this.relayedListenerKey_) {\n            unlistenByKey(this.relayedListenerKey_);\n            this.relayedListenerKey_ = null;\n        }\n        this.element_.removeEventListener(EventType.TOUCHMOVE, this.boundHandleTouchMove_);\n        if (this.pointerdownListenerKey_) {\n            unlistenByKey(this.pointerdownListenerKey_);\n            this.pointerdownListenerKey_ = null;\n        }\n        this.dragListenerKeys_.forEach(unlistenByKey);\n        this.dragListenerKeys_.length = 0;\n        this.element_ = null;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return MapBrowserEventHandler;\n}(EventTarget));\nexport default MapBrowserEventHandler;\n//# sourceMappingURL=MapBrowserEventHandler.js.map","/**\n * @module ol/MapEventType\n */\n/**\n * 
 @enum {string}\n */\nexport default {\n    /**\n     * Triggered after a map frame is rendered.\n     * @event module:ol/MapEvent~MapEvent#postrender\n     * @api\n     */\n    POSTRENDER: 'postrender',\n    /**\n     * Triggered when the map starts moving.\n     * @event module:ol/MapEvent~MapEvent#movestart\n     * @api\n     */\n    MOVESTART: 'movestart',\n    /**\n     * Triggered after the map is moved.\n     * @event module:ol/MapEvent~MapEvent#moveend\n     * @api\n     */\n    MOVEEND: 'moveend',\n};\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/MapProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    LAYERGROUP: 'layergroup',\n    SIZE: 'size',\n    TARGET: 'target',\n    VIEW: 'view',\n};\n//# sourceMappingURL=MapProperty.js.map","/**\n * @module ol/structs/PriorityQueue\n */\nimport { assert } from '../asserts.js';\nimport { clear } from '../obj.js';\n/**\n * @type {number}\n */\nexport var DROP = Infinity;\n/**\n * @classdesc\n * Priority qu
 eue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html\n * and http://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nvar PriorityQueue = /** @class */ (function () {\n    /**\n     * @param {function(T): number} priorityFunction Priority function.\n     * @param {function(T): string} keyFunction Key function.\n     */\n    function PriorityQueue(priorityFunction, keyFunction) {\n        /**\n         * @type {function(T): number}\n         * @private\n         */\n        this.priorityFunction_ = priorityFunction;\n        /**\n         * @type {function(T): string}\n         * @private\n         */\n        this.keyFunction_ = keyFunction;\n        /**\n         * @type {Array<T>}\n         * @private\n         */\n        this.elements_ = [];\n        /**\n         * @type {Array<number>}\n         * @
 private\n         */\n        this.priorities_ = [];\n        /**\n         * @type {!Object<string, boolean>}\n         * @private\n         */\n        this.queuedElements_ = {};\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    PriorityQueue.prototype.clear = function () {\n        this.elements_.length = 0;\n        this.priorities_.length = 0;\n        clear(this.queuedElements_);\n    };\n    /**\n     * Remove and return the highest-priority element. O(log N).\n     * @return {T} Element.\n     */\n    PriorityQueue.prototype.dequeue = function () {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var element = elements[0];\n        if (elements.length == 1) {\n            elements.length = 0;\n            priorities.length = 0;\n        }\n        else {\n            elements[0] = elements.pop();\n            priorities[0] = priorities.pop();\n            this.siftUp_(0);\n        }\n        var elementKey = t
 his.keyFunction_(element);\n        delete this.queuedElements_[elementKey];\n        return element;\n    };\n    /**\n     * Enqueue an element. O(log N).\n     * @param {T} element Element.\n     * @return {boolean} The element was added to the queue.\n     */\n    PriorityQueue.prototype.enqueue = function (element) {\n        assert(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue\n        var priority = this.priorityFunction_(element);\n        if (priority != DROP) {\n            this.elements_.push(element);\n            this.priorities_.push(priority);\n            this.queuedElements_[this.keyFunction_(element)] = true;\n            this.siftDown_(0, this.elements_.length - 1);\n            return true;\n        }\n        return false;\n    };\n    /**\n     * @return {number} Count.\n     */\n    PriorityQueue.prototype.getCount = function () {\n        return this.elements_.length;\n    };\n
     /**\n     * Gets the index of the left child of the node at the given index.\n     * @param {number} index The index of the node to get the left child for.\n     * @return {number} The index of the left child.\n     * @private\n     */\n    PriorityQueue.prototype.getLeftChildIndex_ = function (index) {\n        return index * 2 + 1;\n    };\n    /**\n     * Gets the index of the right child of the node at the given index.\n     * @param {number} index The index of the node to get the right child for.\n     * @return {number} The index of the right child.\n     * @private\n     */\n    PriorityQueue.prototype.getRightChildIndex_ = function (index) {\n        return index * 2 + 2;\n    };\n    /**\n     * Gets the index of the parent of the node at the given index.\n     * @param {number} index The index of the node to get the parent for.\n     * @return {number} The index of the parent.\n     * @private\n     */\n    PriorityQueue.prototype.getParentIndex_ = function (index) {\n
         return (index - 1) >> 1;\n    };\n    /**\n     * Make this a heap. O(N).\n     * @private\n     */\n    PriorityQueue.prototype.heapify_ = function () {\n        var i;\n        for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n            this.siftUp_(i);\n        }\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    PriorityQueue.prototype.isEmpty = function () {\n        return this.elements_.length === 0;\n    };\n    /**\n     * @param {string} key Key.\n     * @return {boolean} Is key queued.\n     */\n    PriorityQueue.prototype.isKeyQueued = function (key) {\n        return key in this.queuedElements_;\n    };\n    /**\n     * @param {T} element Element.\n     * @return {boolean} Is queued.\n     */\n    PriorityQueue.prototype.isQueued = function (element) {\n        return this.isKeyQueued(this.keyFunction_(element));\n    };\n    /**\n     * @param {number} index The index of the node to move down.\n     * @private\n     */\n    PriorityQu
 eue.prototype.siftUp_ = function (index) {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var count = elements.length;\n        var element = elements[index];\n        var priority = priorities[index];\n        var startIndex = index;\n        while (index < count >> 1) {\n            var lIndex = this.getLeftChildIndex_(index);\n            var rIndex = this.getRightChildIndex_(index);\n            var smallerChildIndex = rIndex < count && priorities[rIndex] < priorities[lIndex]\n                ? rIndex\n                : lIndex;\n            elements[index] = elements[smallerChildIndex];\n            priorities[index] = priorities[smallerChildIndex];\n            index = smallerChildIndex;\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n        this.siftDown_(startIndex, index);\n    };\n    /**\n     * @param {number} startIndex The index of the root.\n     * @param {number} index The index of t
 he node to move up.\n     * @private\n     */\n    PriorityQueue.prototype.siftDown_ = function (startIndex, index) {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var element = elements[index];\n        var priority = priorities[index];\n        while (index > startIndex) {\n            var parentIndex = this.getParentIndex_(index);\n            if (priorities[parentIndex] > priority) {\n                elements[index] = elements[parentIndex];\n                priorities[index] = priorities[parentIndex];\n                index = parentIndex;\n            }\n            else {\n                break;\n            }\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    PriorityQueue.prototype.reprioritize = function () {\n        var priorityFunction = this.priorityFunction_;\n        var elements = this.elements_;\n        var priori
 ties = this.priorities_;\n        var index = 0;\n        var n = elements.length;\n        var element, i, priority;\n        for (i = 0; i < n; ++i) {\n            element = elements[i];\n            priority = priorityFunction(element);\n            if (priority == DROP) {\n                delete this.queuedElements_[this.keyFunction_(element)];\n            }\n            else {\n                priorities[index] = priority;\n                elements[index++] = element;\n            }\n        }\n        elements.length = index;\n        priorities.length = index;\n        this.heapify_();\n    };\n    return PriorityQueue;\n}());\nexport default PriorityQueue;\n//# sourceMappingURL=PriorityQueue.js.map","/**\n * @module ol/TileState\n */\n/**\n * @enum {number}\n */\nexport default {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    /**\n     * Indicates that tile loading failed\n     * @type {number}\n     */\n    ERROR: 3,\n    EMPTY: 4,\n};\n//# sourceMappingURL=TileState.
 js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, { DROP } from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\nvar TileQueue = /** @class */ (function (_super) {\n
     __extends(TileQueue, _super);\n    /**\n     * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n     * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n     */\n    function TileQueue(tilePriorityFunction, tileChangeCallback) {\n        var _this = _super.call(this, \n        /**\n         * @param {Array} element Element.\n         * @return {number} Priority.\n         */\n        function (element) {\n            return tilePriorityFunction.apply(null, element);\n        }, \n        /**\n         * @param {Array} element Element.\n         * @return {string} Key.\n         */\n        function (element) {\n            return /** @type {import(\"./Tile.js\").default} */ (element[0]).getKey();\n        }) || this;\n        /** @private */\n        _this.boundHandleTileChange_ = _this.handleTileChange.bind(_this);\n        /**\n         * @private\n         * @type {function(): ?}\n         */\n        _this.tileChange
 Callback_ = tileChangeCallback;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.tilesLoading_ = 0;\n        /**\n         * @private\n         * @type {!Object<string,boolean>}\n         */\n        _this.tilesLoadingKeys_ = {};\n        return _this;\n    }\n    /**\n     * @param {Array} element Element.\n     * @return {boolean} The element was added to the queue.\n     */\n    TileQueue.prototype.enqueue = function (element) {\n        var added = _super.prototype.enqueue.call(this, element);\n        if (added) {\n            var tile = element[0];\n            tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n        }\n        return added;\n    };\n    /**\n     * @return {number} Number of tiles loading.\n     */\n    TileQueue.prototype.getTilesLoading = function () {\n        return this.tilesLoading_;\n    };\n    /**\n     * @param {import(\"./events/Event.js\").default} event Event.\n     * @protected\n     
 */\n    TileQueue.prototype.handleTileChange = function (event) {\n        var tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n        var state = tile.getState();\n        if ((tile.hifi && state === TileState.LOADED) ||\n            state === TileState.ERROR ||\n            state === TileState.EMPTY) {\n            tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n            var tileKey = tile.getKey();\n            if (tileKey in this.tilesLoadingKeys_) {\n                delete this.tilesLoadingKeys_[tileKey];\n                --this.tilesLoading_;\n            }\n            this.tileChangeCallback_();\n        }\n    };\n    /**\n     * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n     * @param {number} maxNewLoads Maximum number of new tiles to load.\n     */\n    TileQueue.prototype.loadMoreTiles = function (maxTotalLoading, maxNewLoads) {\n        var newLoads = 0;\n        var state, tile, tileK
 ey;\n        while (this.tilesLoading_ < maxTotalLoading &&\n            newLoads < maxNewLoads &&\n            this.getCount() > 0) {\n            tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n            tileKey = tile.getKey();\n            state = tile.getState();\n            if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n                this.tilesLoadingKeys_[tileKey] = true;\n                ++this.tilesLoading_;\n                ++newLoads;\n                tile.load();\n            }\n        }\n    };\n    return TileQueue;\n}(PriorityQueue));\nexport default TileQueue;\n/**\n * @param {import('./PluggableMap.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\n
 export function getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) {\n    // Filter out tiles at higher zoom levels than the current zoom level, or that\n    // are outside the visible extent.\n    if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n        return DROP;\n    }\n    if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n        return DROP;\n    }\n    // Prioritize the highest zoom level tiles closest to the focus.\n    // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n    // Within a zoom level, tiles are prioritized by the distance in pixels between\n    // the center of the tile and the center of the viewport.  The factor of 65536\n    // means that the prioritization should behave as desired for tiles up to\n    // 65536 * Math.log(2) = 45426 pixels from the focus.\n    var center = frameState.viewState.center;\n    var deltaX = tileCenter[0] - center[0];\n    var deltaY = tileCenter[1]
  - center[1];\n    return (65536 * Math.log(tileResolution) +\n        Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution);\n}\n//# sourceMappingURL=TileQueue.js.map","/**\n * @module ol/ViewHint\n */\n/**\n * @enum {number}\n */\nexport default {\n    ANIMATING: 0,\n    INTERACTING: 1,\n};\n//# sourceMappingURL=ViewHint.js.map","/**\n * @module ol/ViewProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    CENTER: 'center',\n    RESOLUTION: 'resolution',\n    ROTATION: 'rotation',\n};\n//# sourceMappingURL=ViewProperty.js.map","/**\n * @module ol/centerconstraint\n */\nimport { clamp } from './math.js';\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean
 } smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n    return (\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n     */\n    function (center, resolution, size, opt_isMoving) {\n        if (center) {\n            var viewWidth = onlyCenter ? 0 : size[0] * resolution;\n            var viewHeight = onlyCenter ? 0 : size[1] * resolution;\n            var minX = extent[0] + viewWidth / 2;\n            var maxX = extent[2] - viewWidth / 2;\n            var minY = ex
 tent[1] + viewHeight / 2;\n            var maxY = extent[3] - viewHeight / 2;\n            // note: when zooming out of bounds, min and max values for x and y may\n            // end up inverted (min > max); this has to be accounted for\n            if (minX > maxX) {\n                minX = (maxX + minX) / 2;\n                maxX = minX;\n            }\n            if (minY > maxY) {\n                minY = (maxY + minY) / 2;\n                maxY = minY;\n            }\n            var x = clamp(center[0], minX, maxX);\n            var y = clamp(center[1], minY, maxY);\n            var ratio = 30 * resolution;\n            // during an interaction, allow some overscroll\n            if (opt_isMoving && smooth) {\n                x +=\n                    -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n                        ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n                y +=\n                    -ratio * Math.log(1 + Math.max(0, min
 Y - center[1]) / ratio) +\n                        ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n            }\n            return [x, y];\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n    return center;\n}\n//# sourceMappingURL=centerconstraint.js.map","/**\n * @module ol/resolutionconstraint\n */\nimport { clamp } from './math.js';\nimport { getHeight, getWidth } from './extent.js';\nimport { linearFindNearest } from './array.js';\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent=} maxExt
 ent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(resolution, maxExtent, viewportSize, showFullExtent) {\n    var xResolution = getWidth(maxExtent) / viewportSize[0];\n    var yResolution = getHeight(maxExtent) / viewportSize[1];\n    if (showFullExtent) {\n        return Math.min(resolution, Math.max(xResolution, yResolution));\n    }\n    return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n *  - at 1, ln(x) is 0\n *  - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bound
 s.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n    var result = Math.min(resolution, maxResolution);\n    var ratio = 50;\n    result *=\n        Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n            1;\n    if (minResolution) {\n        result = Math.max(result, minResolution);\n        result /=\n            Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n                ratio +\n                1;\n    }\n    return clamp(result, minResolution / 2, maxResolution * 2);\n}\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent M
 aximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(resolutions, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var maxResolution = resolutions[0];\n            var minResolution = resolutions[resolutions.length - 1];\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxRes
 olution;\n            // during interacting or animating, allow intermediary values\n            if (opt_isMoving) {\n                var smooth = opt_smooth !== undefined ? opt_smooth : true;\n                if (!smooth) {\n                    return clamp(resolution, minResolution, cappedMaxRes);\n                }\n                return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            var capped = Math.min(cappedMaxRes, resolution);\n            var z = Math.floor(linearFindNearest(resolutions, capped, direction));\n            if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n                return resolutions[z + 1];\n            }\n            return resolutions[z];\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number=} opt_minResolution Minimum resolution.\n * @param {bool
 ean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(power, maxResolution, opt_minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, op
 t_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            var minResolution = opt_minResolution !== undefined ? opt_minResolution : 0;\n            // during interacting or animating, allow intermediary values\n            if (opt_isMoving) {\n                var smooth = opt_smooth !== undefined ? opt_smooth : true;\n                if (!smooth) {\n                    return clamp(resolution, minResolution, cappedMaxRes);\n                }\n                return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            var tolerance = 1e-9;\n            var minZoomLevel = Math.ceil(Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance);\n            var offset = -direction * (0.5 - tolerance) + 0.5;\n            var capped = Math.min(cappedMaxRes, resolution);\n            var cappedZoomLevel = Math.floor(Math.log(maxResolution / capped) / Math.log(power) + offset);\n            var zoomLevel = Math
 .max(minZoomLevel, cappedZoomLevel);\n            var newResolution = maxResolution / Math.pow(power, zoomLevel);\n            return clamp(newResolution, minResolution, cappedMaxRes);\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean=} opt_smooth If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent=} opt_maxExtent Maximum allowed extent.\n * @param {boolean=} opt_showFullExtent If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(maxResolution, minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size
 } size Viewport size.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            var smooth = opt_smooth !== undefined ? opt_smooth : true;\n            if (!smooth || !opt_isMoving) {\n                return clamp(resolution, minResolution, cappedMaxRes);\n            }\n            return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n//# sourceMappingURL=resolutionconstraint.js.map","/**\n * @module ol/rotationconstraint\n */\nimport { toRadians } from './math.js';\n/**\n * @typedef {function((numbe
 r|undefined), boolean=): (number|undefined)} Type\n */\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n    if (rotation !== undefined) {\n        return 0;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n    if (rotation !== undefined) {\n        return rotation;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n    var theta = (2 * Math.PI) / n;\n    return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, opt_isMoving) {\n        if (opt_isMoving) {\n     
        return rotation;\n        }\n        if (rotation !== undefined) {\n            rotation = Math.floor(rotation / theta + 0.5) * theta;\n            return rotation;\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number=} opt_tolerance Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(opt_tolerance) {\n    var tolerance = opt_tolerance || toRadians(5);\n    return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean=} opt_isMoving True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, opt_isMoving) {\n        if (opt_isMoving) {\n            return rotation;\n        }\n        if (rotation !== undefined) {\n            if (Math.abs(rotation) <= tolerance) {\n                return 0;\n            }\n            else {\n                return rotation;\n            }\n        }\
 n        else {\n            return undefined;\n        }\n    });\n}\n//# sourceMappingURL=rotationconstraint.js.map","/**\n * @module ol/easing\n */\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n    return Math.pow(t, 3);\n}\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n    return 1 - easeIn(1 - t);\n}\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n    return 3 * t * t - 2 * t * t * t;\n}\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n    return t;\n}\n/**\n * Start
  slow, speed up, and at the very end slow down again.  This has the\n * same general behavior as {@link module:ol/easing~inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n    if (t < 0.5) {\n        return inAndOut(2 * t);\n    }\n    else {\n        return 1 - inAndOut(2 * (t - 0.5));\n    }\n}\n//# sourceMappingURL=easing.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? O
 bject.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport GeometryType from './geom/GeometryType.js';\nimport Units from './proj/Units.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport { DEFAULT_TILE_SIZE } from './tilegrid/common.js';\nimport { METERS_PER_UNIT, createProjection, fromUserCoordinate, fromUserExtent, getUserProjection, toUserCoordinate, toUserExtent, } from './proj.js';\nimport { VOID } from './functions.js';\nimport { add as addCoordinate, equals as coordinatesEqual, rotate as rotateCoordinate, } from './coordinate.js';\nimport { assert } from './asserts.js';\nimport { assign } from './obj.js';\nimport { none as centerNone, createExtent } from './centerconstraint.js';\nimport { clamp, modulo } from './math.js';\nimport { createMinMaxResolution } from './resolutionconstraint.js';\nimport { createSnapToN, createSnapToZero, disable
 , none as rotationNone, } from './rotationconstraint.js';\nimport { createSnapToPower, createSnapToResolutions, } from './resolutionconstraint.js';\nimport { easeOut } from './easing.js';\nimport { equals } from './coordinate.js';\nimport { getCenter, getForViewAndSize, getHeight, getWidth, isEmpty, } from './extent.js';\nimport { inAndOut } from './easing.js';\nimport { linearFindNearest } from './array.js';\nimport { fromExtent as polygonFromExtent } from './geom/Polygon.js';\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter]\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter]\n * @property {number} [sourceResolution]\n * @property {number} [targetResolution]\n * @property {number} [sourceRotation]\n * @property {number} [targetRotation]\n * @property {import(\"./coordinate.js\").Coordinate} [anchor]\n * @property {number} start\n * @property {number} duration\n * @property
  {boolean} complete\n * @property {function(number):number} easing\n * @property {function(boolean):void} callback\n */\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center\n * @property {import(\"./resolutionconstraint.js\").Type} resolution\n * @property {import(\"./rotationconstraint.js\").Type} rotation\n */\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into. Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number}
  [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n/**\n * @typedef {Object} ViewOptions\n * @property {impo
 rt(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this ext
 ent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint.  It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFacto
 r`.  If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`.  Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`.  Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge.  If `true` the map\n * may show multiple worlds 
 at low zoom levels.  Only used if the `projection` is\n * global.  Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zo
 om out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array<number>} [resolutions] Resolutions to determine the\n * resolution constraint. If set the `maxResolution`, `minResolution`,\n * `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoo
 m] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n */\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation.  If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n *
  @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center\n * @property {import(\"./proj/Projection.js\").default} projection\n * @property {number} resolution\n * @property {number} rotation\n * @property {number} zoom\n */\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coor
 dinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Spherical Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and 
 a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `
 setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `opt_anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation w
 ill be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nvar View = /** @class */ (function (_super) {\n    __extends(View, _super);\n    /**\n     * @param {ViewOptions=} opt_options View options.\n     */\n    function View(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = assign({}, opt_options);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.hints_ = [0, 0];\n        /**\n         * @private\n         * @type {Array<Array<Animation>>}\n         */\n        _this.animations_ = [];\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.updateAnimationKey_;\n        /**\n         * @private\n         * @const\n         * @type {import(\"./proj/Projection.js\").default}\n         */\n        _this.projection_ = createProjection(options.projection, 'EPSG:3857');\n        /**\n         * @private\n         * @typ
 e {import(\"./size.js\").Size}\n         */\n        _this.viewportSize_ = [100, 100];\n        /**\n         * @private\n         * @type {import(\"./coordinate.js\").Coordinate|undefined}\n         */\n        _this.targetCenter_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.targetResolution_;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.targetRotation_;\n        /**\n         * @private\n         * @type {import(\"./coordinate.js\").Coordinate|undefined}\n         */\n        _this.cancelAnchor_ = undefined;\n        if (options.center) {\n            options.center = fromUserCoordinate(options.center, _this.projection_);\n        }\n        if (options.extent) {\n            options.extent = fromUserExtent(options.extent, _this.projection_);\n        }\n        _this.applyOptions_(options);\n        return _this;\n    }\n    /**\n     * Set up the view with the give
 n options.\n     * @param {ViewOptions} options View options.\n     */\n    View.prototype.applyOptions_ = function (options) {\n        /**\n         * @type {Object<string, *>}\n         */\n        var properties = {};\n        var resolutionConstraintInfo = createResolutionConstraint(options);\n        /**\n         * @private\n         * @type {number}\n         */\n        this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minResolution_ = resolutionConstraintInfo.minResolution;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n        /**\n         * @private\n         * @type {Array<number>|undefined}\n         */\n        this.resolutions_ = options.resolutions;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minZoom_ = resolutionConstraintInfo.minZ
 oom;\n        var centerConstraint = createCenterConstraint(options);\n        var resolutionConstraint = resolutionConstraintInfo.constraint;\n        var rotationConstraint = createRotationConstraint(options);\n        /**\n         * @private\n         * @type {Constraints}\n         */\n        this.constraints_ = {\n            center: centerConstraint,\n            resolution: resolutionConstraint,\n            rotation: rotationConstraint,\n        };\n        this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n        this.setCenterInternal(options.center !== undefined ? options.center : null);\n        if (options.resolution !== undefined) {\n            this.setResolution(options.resolution);\n        }\n        else if (options.zoom !== undefined) {\n            this.setZoom(options.zoom);\n        }\n        this.setProperties(properties);\n        /**\n         * @private\n         * @type {ViewOptions}\n         */\n        this.options_ = options
 ;\n    };\n    /**\n     * Get an updated version of the view options used to construct the view.  The\n     * current resolution (or zoom), center, and rotation are applied to any stored\n     * options.  The provided options can be used to apply new min/max zoom or\n     * resolution limits.\n     * @param {ViewOptions} newOptions New options to be applied.\n     * @return {ViewOptions} New options updated with the current view state.\n     */\n    View.prototype.getUpdatedOptions_ = function (newOptions) {\n        var options = assign({}, this.options_);\n        // preserve resolution (or zoom)\n        if (options.resolution !== undefined) {\n            options.resolution = this.getResolution();\n        }\n        else {\n            options.zoom = this.getZoom();\n        }\n        // preserve center\n        options.center = this.getCenterInternal();\n        // preserve rotation\n        options.rotation = this.getRotation();\n        return assign({}, options, newOption
 s);\n    };\n    /**\n     * Animate the view.  The view's center, zoom (or resolution), and rotation\n     * can be animated for smooth transitions between view states.  For example,\n     * to animate the view to a new zoom level:\n     *\n     *     view.animate({zoom: view.getZoom() + 1});\n     *\n     * By default, the animation lasts one second and uses in-and-out easing.  You\n     * can customize this behavior by including `duration` (in milliseconds) and\n     * `easing` options (see {@link module:ol/easing}).\n     *\n     * To chain together multiple animations, call the method with multiple\n     * animation objects.  For example, to first zoom and then pan:\n     *\n     *     view.animate({zoom: 10}, {center: [0, 0]});\n     *\n     * If you provide a function as the last argument to the animate method, it\n     * will get called at the end of an animation series.  The callback will be\n     * called with `true` if the animation series completed on its own or `false`\
 n     * if it was cancelled.\n     *\n     * Animations are cancelled by user interactions (e.g. dragging the map) or by\n     * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n     * (or another method that calls one of these).\n     *\n     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n     *     options.  Multiple animations can be run in series by passing multiple\n     *     options objects.  To run multiple animations in parallel, call the method\n     *     multiple times.  An optional callback can be provided as a final\n     *     argument.  The callback will be called with a boolean indicating whether\n     *     the animation completed without being cancelled.\n     * @api\n     */\n    View.prototype.animate = function (var_args) {\n        if (this.isDef() && !this.getAnimating()) {\n            this.resolveConstraints(0);\n        }\n        var args = new Array(arguments.length);\n        for (var i = 0; i < 
 args.length; ++i) {\n            var options = arguments[i];\n            if (options.center) {\n                options = assign({}, options);\n                options.center = fromUserCoordinate(options.center, this.getProjection());\n            }\n            if (options.anchor) {\n                options = assign({}, options);\n                options.anchor = fromUserCoordinate(options.anchor, this.getProjection());\n            }\n            args[i] = options;\n        }\n        this.animateInternal.apply(this, args);\n    };\n    /**\n     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n     */\n    View.prototype.animateInternal = function (var_args) {\n        var animationCount = arguments.length;\n        var callback;\n        if (animationCount > 1 &&\n            typeof arguments[animationCount - 1] === 'function') {\n            callback = arguments[animationCount - 1];\n            --animationCount;\n        }\n        if (!th
 is.isDef()) {\n            // if view properties are not yet set, shortcut to the final state\n            var state = arguments[animationCount - 1];\n            if (state.center) {\n                this.setCenterInternal(state.center);\n            }\n            if (state.zoom !== undefined) {\n                this.setZoom(state.zoom);\n            }\n            if (state.rotation !== undefined) {\n                this.setRotation(state.rotation);\n            }\n            if (callback) {\n                animationCallback(callback, true);\n            }\n            return;\n        }\n        var start = Date.now();\n        var center = this.targetCenter_.slice();\n        var resolution = this.targetResolution_;\n        var rotation = this.targetRotation_;\n        var series = [];\n        for (var i = 0; i < animationCount; ++i) {\n            var options = /** @type {AnimationOptions} */ (arguments[i]);\n            var animation = {\n                start: start,\n   
              complete: false,\n                anchor: options.anchor,\n                duration: options.duration !== undefined ? options.duration : 1000,\n                easing: options.easing || inAndOut,\n                callback: callback,\n            };\n            if (options.center) {\n                animation.sourceCenter = center;\n                animation.targetCenter = options.center.slice();\n                center = animation.targetCenter;\n            }\n            if (options.zoom !== undefined) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = this.getResolutionForZoom(options.zoom);\n                resolution = animation.targetResolution;\n            }\n            else if (options.resolution) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = options.resolution;\n                resolution = animation.targetResolution;\n            }\n            
 if (options.rotation !== undefined) {\n                animation.sourceRotation = rotation;\n                var delta = modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n                animation.targetRotation = rotation + delta;\n                rotation = animation.targetRotation;\n            }\n            // check if animation is a no-op\n            if (isNoopAnimation(animation)) {\n                animation.complete = true;\n                // we still push it onto the series for callback handling\n            }\n            else {\n                start += animation.duration;\n            }\n            series.push(animation);\n        }\n        this.animations_.push(series);\n        this.setHint(ViewHint.ANIMATING, 1);\n        this.updateAnimations_();\n    };\n    /**\n     * Determine if the view is being animated.\n     * @return {boolean} The view is being animated.\n     * @api\n     */\n    View.prototype.getAnimating = function () {\n      
   return this.hints_[ViewHint.ANIMATING] > 0;\n    };\n    /**\n     * Determine if the user is interacting with the view, such as panning or zooming.\n     * @return {boolean} The view is being interacted with.\n     * @api\n     */\n    View.prototype.getInteracting = function () {\n        return this.hints_[ViewHint.INTERACTING] > 0;\n    };\n    /**\n     * Cancel any ongoing animations.\n     * @api\n     */\n    View.prototype.cancelAnimations = function () {\n        this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n        var anchor;\n        for (var i = 0, ii = this.animations_.length; i < ii; ++i) {\n            var series = this.animations_[i];\n            if (series[0].callback) {\n                animationCallback(series[0].callback, false);\n            }\n            if (!anchor) {\n                for (var j = 0, jj = series.length; j < jj; ++j) {\n                    var animation = series[j];\n                    if (!animation.complete) {\n 
                        anchor = animation.anchor;\n                        break;\n                    }\n                }\n            }\n        }\n        this.animations_.length = 0;\n        this.cancelAnchor_ = anchor;\n    };\n    /**\n     * Update all animations.\n     */\n    View.prototype.updateAnimations_ = function () {\n        if (this.updateAnimationKey_ !== undefined) {\n            cancelAnimationFrame(this.updateAnimationKey_);\n            this.updateAnimationKey_ = undefined;\n        }\n        if (!this.getAnimating()) {\n            return;\n        }\n        var now = Date.now();\n        var more = false;\n        for (var i = this.animations_.length - 1; i >= 0; --i) {\n            var series = this.animations_[i];\n            var seriesComplete = true;\n            for (var j = 0, jj = series.length; j < jj; ++j) {\n                var animation = series[j];\n                if (animation.complete) {\n                    continue;\n                }\n
                 var elapsed = now - animation.start;\n                var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n                if (fraction >= 1) {\n                    animation.complete = true;\n                    fraction = 1;\n                }\n                else {\n                    seriesComplete = false;\n                }\n                var progress = animation.easing(fraction);\n                if (animation.sourceCenter) {\n                    var x0 = animation.sourceCenter[0];\n                    var y0 = animation.sourceCenter[1];\n                    var x1 = animation.targetCenter[0];\n                    var y1 = animation.targetCenter[1];\n                    var x = x0 + progress * (x1 - x0);\n                    var y = y0 + progress * (y1 - y0);\n                    this.targetCenter_ = [x, y];\n                }\n                if (animation.sourceResolution && animation.targetResolution) {\n                    var res
 olution = progress === 1\n                        ? animation.targetResolution\n                        : animation.sourceResolution +\n                            progress *\n                                (animation.targetResolution - animation.sourceResolution);\n                    if (animation.anchor) {\n                        var size = this.getViewportSize_(this.getRotation());\n                        var constrainedResolution = this.constraints_.resolution(resolution, 0, size, true);\n                        this.targetCenter_ = this.calculateCenterZoom(constrainedResolution, animation.anchor);\n                    }\n                    this.targetResolution_ = resolution;\n                    this.applyTargetState_(true);\n                }\n                if (animation.sourceRotation !== undefined &&\n                    animation.targetRotation !== undefined) {\n                    var rotation = progress === 1\n                        ? modulo(animation.targetRotat
 ion + Math.PI, 2 * Math.PI) -\n                            Math.PI\n                        : animation.sourceRotation +\n                            progress *\n                                (animation.targetRotation - animation.sourceRotation);\n                    if (animation.anchor) {\n                        var constrainedRotation = this.constraints_.rotation(rotation, true);\n                        this.targetCenter_ = this.calculateCenterRotate(constrainedRotation, animation.anchor);\n                    }\n                    this.targetRotation_ = rotation;\n                }\n                this.applyTargetState_(true);\n                more = true;\n                if (!animation.complete) {\n                    break;\n                }\n            }\n            if (seriesComplete) {\n                this.animations_[i] = null;\n                this.setHint(ViewHint.ANIMATING, -1);\n                var callback = series[0].callback;\n                if (callback
 ) {\n                    animationCallback(callback, true);\n                }\n            }\n        }\n        // prune completed series\n        this.animations_ = this.animations_.filter(Boolean);\n        if (more && this.updateAnimationKey_ === undefined) {\n            this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this));\n        }\n    };\n    /**\n     * @param {number} rotation Target rotation.\n     * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n     */\n    View.prototype.calculateCenterRotate = function (rotation, anchor) {\n        var center;\n        var currentCenter = this.getCenterInternal();\n        if (currentCenter !== undefined) {\n            center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n            rotateCoordinate(center, rotation - this.getRotation());\n            addCoor
 dinate(center, anchor);\n        }\n        return center;\n    };\n    /**\n     * @param {number} resolution Target resolution.\n     * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n     */\n    View.prototype.calculateCenterZoom = function (resolution, anchor) {\n        var center;\n        var currentCenter = this.getCenterInternal();\n        var currentResolution = this.getResolution();\n        if (currentCenter !== undefined && currentResolution !== undefined) {\n            var x = anchor[0] -\n                (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n            var y = anchor[1] -\n                (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n            center = [x, y];\n        }\n        return center;\n    };\n    /**\n     * Returns the current viewport size.\n     * @private\n     * @param {numbe
 r=} opt_rotation Take into account the rotation of the viewport when giving the size\n     * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n     */\n    View.prototype.getViewportSize_ = function (opt_rotation) {\n        var size = this.viewportSize_;\n        if (opt_rotation) {\n            var w = size[0];\n            var h = size[1];\n            return [\n                Math.abs(w * Math.cos(opt_rotation)) +\n                    Math.abs(h * Math.sin(opt_rotation)),\n                Math.abs(w * Math.sin(opt_rotation)) +\n                    Math.abs(h * Math.cos(opt_rotation)),\n            ];\n        }\n        else {\n            return size;\n        }\n    };\n    /**\n     * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n     * to avoid performance hit and layout reflow.\n     * This should be done on map size change.\n     * Note: the constraints are not resolved during an a
 nimation to avoid stopping it\n     * @param {import(\"./size.js\").Size=} opt_size Viewport size; if undefined, [100, 100] is assumed\n     */\n    View.prototype.setViewportSize = function (opt_size) {\n        this.viewportSize_ = Array.isArray(opt_size)\n            ? opt_size.slice()\n            : [100, 100];\n        if (!this.getAnimating()) {\n            this.resolveConstraints(0);\n        }\n    };\n    /**\n     * Get the view center.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.getCenter = function () {\n        var center = this.getCenterInternal();\n        if (!center) {\n            return center;\n        }\n        return toUserCoordinate(center, this.getProjection());\n    };\n    /**\n     * Get the view center without transforming to user projection.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n     */\n    
 View.prototype.getCenterInternal = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(ViewProperty.CENTER));\n    };\n    /**\n     * @return {Constraints} Constraints.\n     */\n    View.prototype.getConstraints = function () {\n        return this.constraints_;\n    };\n    /**\n     * @return {boolean} Resolution constraint is set\n     */\n    View.prototype.getConstrainResolution = function () {\n        return this.options_.constrainResolution;\n    };\n    /**\n     * @param {Array<number>=} opt_hints Destination array.\n     * @return {Array<number>} Hint.\n     */\n    View.prototype.getHints = function (opt_hints) {\n        if (opt_hints !== undefined) {\n            opt_hints[0] = this.hints_[0];\n            opt_hints[1] = this.hints_[1];\n            return opt_hints;\n        }\n        else {\n            return this.hints_.slice();\n        }\n    };\n    /**\n     * Calculate the extent for the current view state
  and the passed size.\n     * The size is the pixel dimensions of the box into which the calculated extent\n     * should fit. In most cases you want to get the extent of the entire map,\n     * that is `map.getSize()`.\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size\n     * of the map that uses this view will be used.\n     * @return {import(\"./extent.js\").Extent} Extent.\n     * @api\n     */\n    View.prototype.calculateExtent = function (opt_size) {\n        var extent = this.calculateExtentInternal(opt_size);\n        return toUserExtent(extent, this.getProjection());\n    };\n    /**\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size of the\n     * first map that uses this view will be used.\n     * @return {import(\"./extent.js\").Extent} Extent.\n     */\n    View.prototype.calculateExtentInternal = function (opt_size) {\n        var size = opt_size || this.getViewportSize_();\n   
      var center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n        assert(center, 1); // The view center is not defined\n        var resolution = /** @type {!number} */ (this.getResolution());\n        assert(resolution !== undefined, 2); // The view resolution is not defined\n        var rotation = /** @type {!number} */ (this.getRotation());\n        assert(rotation !== undefined, 3); // The view rotation is not defined\n        return getForViewAndSize(center, resolution, rotation, size);\n    };\n    /**\n     * Get the maximum resolution of the view.\n     * @return {number} The maximum resolution of the view.\n     * @api\n     */\n    View.prototype.getMaxResolution = function () {\n        return this.maxResolution_;\n    };\n    /**\n     * Get the minimum resolution of the view.\n     * @return {number} The minimum resolution of the view.\n     * @api\n     */\n    View.prototype.getMinResolution = function () {\n        return th
 is.minResolution_;\n    };\n    /**\n     * Get the maximum zoom level for the view.\n     * @return {number} The maximum zoom level.\n     * @api\n     */\n    View.prototype.getMaxZoom = function () {\n        return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));\n    };\n    /**\n     * Set a new maximum zoom level for the view.\n     * @param {number} zoom The maximum zoom level.\n     * @api\n     */\n    View.prototype.setMaxZoom = function (zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({ maxZoom: zoom }));\n    };\n    /**\n     * Get the minimum zoom level for the view.\n     * @return {number} The minimum zoom level.\n     * @api\n     */\n    View.prototype.getMinZoom = function () {\n        return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));\n    };\n    /**\n     * Set a new minimum zoom level for the view.\n     * @param {number} zoom The minimum zoom level.\n     * @api\n     */\n    View.prototype.setM
 inZoom = function (zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({ minZoom: zoom }));\n    };\n    /**\n     * Set whether the view shoud allow intermediary zoom levels.\n     * @param {boolean} enabled Whether the resolution is constrained.\n     * @api\n     */\n    View.prototype.setConstrainResolution = function (enabled) {\n        this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: enabled }));\n    };\n    /**\n     * Get the view projection.\n     * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n     * @api\n     */\n    View.prototype.getProjection = function () {\n        return this.projection_;\n    };\n    /**\n     * Get the view resolution.\n     * @return {number|undefined} The resolution of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.getResolution = function () {\n        return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n    };\n    /**\n     * Get the
  resolutions for the view. This returns the array of resolutions\n     * passed to the constructor of the View, or undefined if none were given.\n     * @return {Array<number>|undefined} The resolutions of the view.\n     * @api\n     */\n    View.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * Get the resolution for a provided extent (in map units) and size (in pixels).\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n     * @return {number} The resolution at which the provided extent will render at\n     *     the given size.\n     * @api\n     */\n    View.prototype.getResolutionForExtent = function (extent, opt_size) {\n        return this.getResolutionForExtentInternal(fromUserExtent(extent, this.getProjection()), opt_size);\n    };\n    /**\n     * Get the resolution for a provided extent (in map units) and size (in pixels).\n     * @param {
 import(\"./extent.js\").Extent} extent Extent.\n     * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n     * @return {number} The resolution at which the provided extent will render at\n     *     the given size.\n     */\n    View.prototype.getResolutionForExtentInternal = function (extent, opt_size) {\n        var size = opt_size || this.getViewportSize_();\n        var xResolution = getWidth(extent) / size[0];\n        var yResolution = getHeight(extent) / size[1];\n        return Math.max(xResolution, yResolution);\n    };\n    /**\n     * Return a function that returns a value between 0 and 1 for a\n     * resolution. Exponential scaling is assumed.\n     * @param {number=} opt_power Power.\n     * @return {function(number): number} Resolution for value function.\n     */\n    View.prototype.getResolutionForValueFunction = function (opt_power) {\n        var power = opt_power || 2;\n        var maxResolution = this.getConstrainedResolution(this.maxResolution_);\
 n        var minResolution = this.minResolution_;\n        var max = Math.log(maxResolution / minResolution) / Math.log(power);\n        return (\n        /**\n         * @param {number} value Value.\n         * @return {number} Resolution.\n         */\n        function (value) {\n            var resolution = maxResolution / Math.pow(power, value * max);\n            return resolution;\n        });\n    };\n    /**\n     * Get the view rotation.\n     * @return {number} The rotation of the view in radians.\n     * @observable\n     * @api\n     */\n    View.prototype.getRotation = function () {\n        return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n    };\n    /**\n     * Return a function that returns a resolution for a value between\n     * 0 and 1. Exponential scaling is assumed.\n     * @param {number=} opt_power Power.\n     * @return {function(number): number} Value for resolution function.\n     */\n    View.prototype.getValueForResolutionFunction = functi
 on (opt_power) {\n        var logPower = Math.log(opt_power || 2);\n        var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n        var minResolution = this.minResolution_;\n        var max = Math.log(maxResolution / minResolution) / logPower;\n        return (\n        /**\n         * @param {number} resolution Resolution.\n         * @return {number} Value.\n         */\n        function (resolution) {\n            var value = Math.log(maxResolution / resolution) / logPower / max;\n            return value;\n        });\n    };\n    /**\n     * @return {State} View state.\n     */\n    View.prototype.getState = function () {\n        var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n        var projection = this.getProjection();\n        var resolution = /** @type {number} */ (this.getResolution());\n        var rotation = this.getRotation();\n        return {\n            center: center.slice(0),\n            
 projection: projection !== undefined ? projection : null,\n            resolution: resolution,\n            rotation: rotation,\n            zoom: this.getZoom(),\n        };\n    };\n    /**\n     * Get the current zoom level. This method may return non-integer zoom levels\n     * if the view does not constrain the resolution, or if an interaction or\n     * animation is underway.\n     * @return {number|undefined} Zoom.\n     * @api\n     */\n    View.prototype.getZoom = function () {\n        var zoom;\n        var resolution = this.getResolution();\n        if (resolution !== undefined) {\n            zoom = this.getZoomForResolution(resolution);\n        }\n        return zoom;\n    };\n    /**\n     * Get the zoom level for a resolution.\n     * @param {number} resolution The resolution.\n     * @return {number|undefined} The zoom level for the provided resolution.\n     * @api\n     */\n    View.prototype.getZoomForResolution = function (resolution) {\n        var offset = th
 is.minZoom_ || 0;\n        var max, zoomFactor;\n        if (this.resolutions_) {\n            var nearest = linearFindNearest(this.resolutions_, resolution, 1);\n            offset = nearest;\n            max = this.resolutions_[nearest];\n            if (nearest == this.resolutions_.length - 1) {\n                zoomFactor = 2;\n            }\n            else {\n                zoomFactor = max / this.resolutions_[nearest + 1];\n            }\n        }\n        else {\n            max = this.maxResolution_;\n            zoomFactor = this.zoomFactor_;\n        }\n        return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n    };\n    /**\n     * Get the resolution for a zoom level.\n     * @param {number} zoom Zoom level.\n     * @return {number} The view resolution for the provided zoom level.\n     * @api\n     */\n    View.prototype.getResolutionForZoom = function (zoom) {\n        if (this.resolutions_) {\n            if (this.resolutions_.length <= 1) {\n   
              return 0;\n            }\n            var baseLevel = clamp(Math.floor(zoom), 0, this.resolutions_.length - 2);\n            var zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n            return (this.resolutions_[baseLevel] /\n                Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1)));\n        }\n        else {\n            return (this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_));\n        }\n    };\n    /**\n     * Fit the given geometry or extent based on the given map size and border.\n     * The size is pixel dimensions of the box to fit the extent into.\n     * In most cases you will want to use the map size, that is `map.getSize()`.\n     * Takes care of the map angle.\n     * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n     *     extent to fit the view to.\n     * @param {FitOptions=} opt_options Options.\n     * @api\n    
  */\n    View.prototype.fit = function (geometryOrExtent, opt_options) {\n        var options = assign({ size: this.getViewportSize_() }, opt_options || {});\n        /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n        var geometry;\n        assert(Array.isArray(geometryOrExtent) ||\n            typeof ( /** @type {?} */(geometryOrExtent).getSimplifiedGeometry) ===\n                'function', 24); // Invalid extent or geometry provided as `geometry`\n        if (Array.isArray(geometryOrExtent)) {\n            assert(!isEmpty(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry`\n            var extent = fromUserExtent(geometryOrExtent, this.getProjection());\n            geometry = polygonFromExtent(extent);\n        }\n        else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n            var extent = fromUserExtent(geometryOrExtent.getExtent(), this.getProjection());\n            geometry = polygonFromExtent(extent);\n            
 geometry.rotate(this.getRotation(), getCenter(extent));\n        }\n        else {\n            var userProjection = getUserProjection();\n            if (userProjection) {\n                geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometryOrExtent\n                    .clone()\n                    .transform(userProjection, this.getProjection()));\n            }\n            else {\n                geometry = geometryOrExtent;\n            }\n        }\n        this.fitInternal(geometry, options);\n    };\n    /**\n     * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n     * @param {FitOptions=} opt_options Options.\n     */\n    View.prototype.fitInternal = function (geometry, opt_options) {\n        var options = opt_options || {};\n        var size = options.size;\n        if (!size) {\n            size = this.getViewportSize_();\n        }\n        var padding = options.padding !== undefined ? options.padding : [0, 0,
  0, 0];\n        var nearest = options.nearest !== undefined ? options.nearest : false;\n        var minResolution;\n        if (options.minResolution !== undefined) {\n            minResolution = options.minResolution;\n        }\n        else if (options.maxZoom !== undefined) {\n            minResolution = this.getResolutionForZoom(options.maxZoom);\n        }\n        else {\n            minResolution = 0;\n        }\n        var coords = geometry.getFlatCoordinates();\n        // calculate rotated extent\n        var rotation = this.getRotation();\n        var cosAngle = Math.cos(-rotation);\n        var sinAngle = Math.sin(-rotation);\n        var minRotX = +Infinity;\n        var minRotY = +Infinity;\n        var maxRotX = -Infinity;\n        var maxRotY = -Infinity;\n        var stride = geometry.getStride();\n        for (var i = 0, ii = coords.length; i < ii; i += stride) {\n            var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n            var rotY = coo
 rds[i] * sinAngle + coords[i + 1] * cosAngle;\n            minRotX = Math.min(minRotX, rotX);\n            minRotY = Math.min(minRotY, rotY);\n            maxRotX = Math.max(maxRotX, rotX);\n            maxRotY = Math.max(maxRotY, rotY);\n        }\n        // calculate resolution\n        var resolution = this.getResolutionForExtentInternal([minRotX, minRotY, maxRotX, maxRotY], [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);\n        resolution = isNaN(resolution)\n            ? minResolution\n            : Math.max(resolution, minResolution);\n        resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n        // calculate center\n        sinAngle = -sinAngle; // go back to original rotation\n        var centerRotX = (minRotX + maxRotX) / 2;\n        var centerRotY = (minRotY + maxRotY) / 2;\n        centerRotX += ((padding[1] - padding[3]) / 2) * resolution;\n        centerRotY += ((padding[0] - padding[2]) / 2) * resolution;\n      
   var centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n        var centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n        var center = [centerX, centerY];\n        var callback = options.callback ? options.callback : VOID;\n        if (options.duration !== undefined) {\n            this.animateInternal({\n                resolution: resolution,\n                center: this.getConstrainedCenter(center, resolution),\n                duration: options.duration,\n                easing: options.easing,\n            }, callback);\n        }\n        else {\n            this.targetResolution_ = resolution;\n            this.targetCenter_ = center;\n            this.applyTargetState_(false, true);\n            animationCallback(callback, true);\n        }\n    };\n    /**\n     * Center on coordinate and view position.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"./size.js\").Size} size Box pixel size.\n     * 
 @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n     * @api\n     */\n    View.prototype.centerOn = function (coordinate, size, position) {\n        this.centerOnInternal(fromUserCoordinate(coordinate, this.getProjection()), size, position);\n    };\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"./size.js\").Size} size Box pixel size.\n     * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n     */\n    View.prototype.centerOnInternal = function (coordinate, size, position) {\n        // calculate rotated position\n        var rotation = this.getRotation();\n        var cosAngle = Math.cos(-rotation);\n        var sinAngle = Math.sin(-rotation);\n        var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n        var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n        var resolution = this.getResolution();\n        rotX 
 += (size[0] / 2 - position[0]) * resolution;\n        rotY += (position[1] - size[1] / 2) * resolution;\n        // go back to original angle\n        sinAngle = -sinAngle; // go back to original rotation\n        var centerX = rotX * cosAngle - rotY * sinAngle;\n        var centerY = rotY * cosAngle + rotX * sinAngle;\n        this.setCenterInternal([centerX, centerY]);\n    };\n    /**\n     * @return {boolean} Is defined.\n     */\n    View.prototype.isDef = function () {\n        return !!this.getCenterInternal() && this.getResolution() !== undefined;\n    };\n    /**\n     * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n     * @api\n     */\n    View.prototype.adjustCenter = function (deltaCoordinates) {\n        var center = toUserCoordinate(this.targetCenter_, this.getProjection());\n        this.setCenter([\n            center[0] + deltaCo
 ordinates[0],\n            center[1] + deltaCoordinates[1],\n        ]);\n    };\n    /**\n     * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n     */\n    View.prototype.adjustCenterInternal = function (deltaCoordinates) {\n        var center = this.targetCenter_;\n        this.setCenterInternal([\n            center[0] + deltaCoordinates[0],\n            center[1] + deltaCoordinates[1],\n        ]);\n    };\n    /**\n     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} ratio The ratio to apply on the view resolution.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     * @api\n     */\n    View.prototype.adjustResolution = function (ratio, opt_anchor) {\n        var anchor = opt_anchor && fromUserCo
 ordinate(opt_anchor, this.getProjection());\n        this.adjustResolutionInternal(ratio, anchor);\n    };\n    /**\n     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} ratio The ratio to apply on the view resolution.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     */\n    View.prototype.adjustResolutionInternal = function (ratio, opt_anchor) {\n        var isMoving = this.getAnimating() || this.getInteracting();\n        var size = this.getViewportSize_(this.getRotation());\n        var newResolution = this.constraints_.resolution(this.targetResolution_ * ratio, 0, size, isMoving);\n        if (opt_anchor) {\n            this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor);\n        }\n        this.targetResolution_ *= ratio;\n        this.applyTargetState_();\n    };\n    /**\n     * Adds a value to the view z
 oom level, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} delta Relative value to add to the zoom level.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     * @api\n     */\n    View.prototype.adjustZoom = function (delta, opt_anchor) {\n        this.adjustResolution(Math.pow(this.zoomFactor_, -delta), opt_anchor);\n    };\n    /**\n     * Adds a value to the view rotation, optionally using an anchor. Any rotation\n     * constraint will apply.\n     * @param {number} delta Relative value to add to the zoom rotation, in radians.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n     * @api\n     */\n    View.prototype.adjustRotation = function (delta, opt_anchor) {\n        if (opt_anchor) {\n            opt_anchor = fromUserCoordinate(opt_anchor, this.getProjection());\n        }\n        this.adjustRotationInternal(delta, opt_anchor);\n
     };\n    /**\n     * @param {number} delta Relative value to add to the zoom rotation, in radians.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n     */\n    View.prototype.adjustRotationInternal = function (delta, opt_anchor) {\n        var isMoving = this.getAnimating() || this.getInteracting();\n        var newRotation = this.constraints_.rotation(this.targetRotation_ + delta, isMoving);\n        if (opt_anchor) {\n            this.targetCenter_ = this.calculateCenterRotate(newRotation, opt_anchor);\n        }\n        this.targetRotation_ += delta;\n        this.applyTargetState_();\n    };\n    /**\n     * Set the center of the current view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.setCenter = function (center) {\n        this.setCenterInternal(fromUserCoordinate(center, this.getPro
 jection()));\n    };\n    /**\n     * Set the center using the view projection (not the user projection).\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n     */\n    View.prototype.setCenterInternal = function (center) {\n        this.targetCenter_ = center;\n        this.applyTargetState_();\n    };\n    /**\n     * @param {import(\"./ViewHint.js\").default} hint Hint.\n     * @param {number} delta Delta.\n     * @return {number} New value.\n     */\n    View.prototype.setHint = function (hint, delta) {\n        this.hints_[hint] += delta;\n        this.changed();\n        return this.hints_[hint];\n    };\n    /**\n     * Set the resolution for this view. Any resolution constraint will apply.\n     * @param {number|undefined} resolution The resolution of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.setResolution = function (resolution) {\n        this.targetResolution_ = resolution;\n        this.applyTa
 rgetState_();\n    };\n    /**\n     * Set the rotation for this view. Any rotation constraint will apply.\n     * @param {number} rotation The rotation of the view in radians.\n     * @observable\n     * @api\n     */\n    View.prototype.setRotation = function (rotation) {\n        this.targetRotation_ = rotation;\n        this.applyTargetState_();\n    };\n    /**\n     * Zoom to a specific zoom level. Any resolution constrain will apply.\n     * @param {number} zoom Zoom level.\n     * @api\n     */\n    View.prototype.setZoom = function (zoom) {\n        this.setResolution(this.getResolutionForZoom(zoom));\n    };\n    /**\n     * Recompute rotation/resolution/center based on target values.\n     * Note: we have to compute rotation first, then resolution and center considering that\n     * parameters can influence one another in case a view extent constraint is present.\n     * @param {boolean=} opt_doNotCancelAnims Do not cancel animations.\n     * @param {boolean=} opt_forceMo
 ving Apply constraints as if the view is moving.\n     * @private\n     */\n    View.prototype.applyTargetState_ = function (opt_doNotCancelAnims, opt_forceMoving) {\n        var isMoving = this.getAnimating() || this.getInteracting() || opt_forceMoving;\n        // compute rotation\n        var newRotation = this.constraints_.rotation(this.targetRotation_, isMoving);\n        var size = this.getViewportSize_(newRotation);\n        var newResolution = this.constraints_.resolution(this.targetResolution_, 0, size, isMoving);\n        var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, isMoving);\n        if (this.get(ViewProperty.ROTATION) !== newRotation) {\n            this.set(ViewProperty.ROTATION, newRotation);\n        }\n        if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n            this.set(ViewProperty.RESOLUTION, newResolution);\n        }\n        if (!this.get(ViewProperty.CENTER) ||\n            !equals(this.get(ViewProperty.
 CENTER), newCenter)) {\n            this.set(ViewProperty.CENTER, newCenter);\n        }\n        if (this.getAnimating() && !opt_doNotCancelAnims) {\n            this.cancelAnimations();\n        }\n        this.cancelAnchor_ = undefined;\n    };\n    /**\n     * If any constraints need to be applied, an animation will be triggered.\n     * This is typically done on interaction end.\n     * Note: calling this with a duration of 0 will apply the constrained values straight away,\n     * without animation.\n     * @param {number=} opt_duration The animation duration in ms.\n     * @param {number=} opt_resolutionDirection Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     */\n    View.prototype.resolveConstraints = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        var duration = opt_duration !== undefined ? opt_duration : 200;\n        var direction = opt_resolutionDirection || 0;\n
         var newRotation = this.constraints_.rotation(this.targetRotation_);\n        var size = this.getViewportSize_(newRotation);\n        var newResolution = this.constraints_.resolution(this.targetResolution_, direction, size);\n        var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size);\n        if (duration === 0 && !this.cancelAnchor_) {\n            this.targetResolution_ = newResolution;\n            this.targetRotation_ = newRotation;\n            this.targetCenter_ = newCenter;\n            this.applyTargetState_();\n            return;\n        }\n        var anchor = opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n        this.cancelAnchor_ = undefined;\n        if (this.getResolution() !== newResolution ||\n            this.getRotation() !== newRotation ||\n            !this.getCenterInternal() ||\n            !equals(this.getCenterInternal(), newCenter)) {\n            if (this.getAnimating()) {\n                this.ca
 ncelAnimations();\n            }\n            this.animateInternal({\n                rotation: newRotation,\n                center: newCenter,\n                resolution: newResolution,\n                duration: duration,\n                easing: easeOut,\n                anchor: anchor,\n            });\n        }\n    };\n    /**\n     * Notify the View that an interaction has started.\n     * The view state will be resolved to a stable one if needed\n     * (depending on its constraints).\n     * @api\n     */\n    View.prototype.beginInteraction = function () {\n        this.resolveConstraints(0);\n        this.setHint(ViewHint.INTERACTING, 1);\n    };\n    /**\n     * Notify the View that an interaction has ended. The view state will be resolved\n     * to a stable one if needed (depending on its constraints).\n     * @param {number=} opt_duration Animation duration in ms.\n     * @param {number=} opt_resolutionDirection Which direction to zoom.\n     * @param {import(\"./c
 oordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     * @api\n     */\n    View.prototype.endInteraction = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        var anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n        this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor);\n    };\n    /**\n     * Notify the View that an interaction has ended. The view state will be resolved\n     * to a stable one if needed (depending on its constraints).\n     * @param {number=} opt_duration Animation duration in ms.\n     * @param {number=} opt_resolutionDirection Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The origin of the transformation.\n     */\n    View.prototype.endInteractionInternal = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        this.setHint(ViewHint.INTERACTING, -1);\n        this.resolveConstraints(opt_duration, opt
 _resolutionDirection, opt_anchor);\n    };\n    /**\n     * Get a valid position for the view center according to the current constraints.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n     * @param {number=} opt_targetResolution Target resolution. If not supplied, the current one will be used.\n     * This is useful to guess a valid center position at a different zoom level.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n     */\n    View.prototype.getConstrainedCenter = function (targetCenter, opt_targetResolution) {\n        var size = this.getViewportSize_(this.getRotation());\n        return this.constraints_.center(targetCenter, opt_targetResolution || this.getResolution(), size);\n    };\n    /**\n     * Get a valid zoom level according to the current view constraints.\n     * @param {number|undefined} targetZoom Target zoom.\n     * @param {number=} [opt_direction=0] Indicat
 e which resolution should be used\n     * by a renderer if the view resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @return {number|undefined} Valid zoom level.\n     */\n    View.prototype.getConstrainedZoom = function (targetZoom, opt_direction) {\n        var targetRes = this.getResolutionForZoom(targetZoom);\n        return this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction));\n    };\n    /**\n     * Get a valid resolution according to the current view constraints.\n     * @param {number|undefined} targetResolution Target resolution.\n     * @param {number=} [opt_direction=0] Indicate which resolution should be used\n     * by a renderer if the view resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the ne
 arest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @return {number|undefined} Valid resolution.\n     */\n    View.prototype.getConstrainedResolution = function (targetResolution, opt_direction) {\n        var direction = opt_direction || 0;\n        var size = this.getViewportSize_(this.getRotation());\n        return this.constraints_.resolution(targetResolution, direction, size);\n    };\n    return View;\n}(BaseObject));\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n    setTimeout(function () {\n        callback(returnValue);\n    }, 0);\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n    if (options.extent !== undefined) {\n        var smooth = options.smoothExtentConstraint !== undefined\n       
      ? options.smoothExtentConstraint\n            : true;\n        return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n    }\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    if (options.multiWorld !== true && projection.isGlobal()) {\n        var extent = projection.getExtent().slice();\n        extent[0] = -Infinity;\n        extent[2] = Infinity;\n        return createExtent(extent, false, false);\n    }\n    return centerNone;\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n *     minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n    var resolutionConstraint;\n    var maxResolution;\n    var minResolution;\n    // TODO: move these to be ol constants\n    // see https://github.com/openlayers/openlayers/issues/2076\n    var defaultMaxZoom = 28;
 \n    var defaultZoomFactor = 2;\n    var minZoom = options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n    var maxZoom = options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n    var zoomFactor = options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n    var multiWorld = options.multiWorld !== undefined ? options.multiWorld : false;\n    var smooth = options.smoothResolutionConstraint !== undefined\n        ? options.smoothResolutionConstraint\n        : true;\n    var showFullExtent = options.showFullExtent !== undefined ? options.showFullExtent : false;\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    var projExtent = projection.getExtent();\n    var constrainOnlyCenter = options.constrainOnlyCenter;\n    var extent = options.extent;\n    if (!multiWorld && !extent && projection.isGlobal()) {\n        constrainOnlyCenter = false;\n        extent = projExtent;\n    }\n    if (options.resolutions !== un
 defined) {\n        var resolutions = options.resolutions;\n        maxResolution = resolutions[minZoom];\n        minResolution =\n            resolutions[maxZoom] !== undefined\n                ? resolutions[maxZoom]\n                : resolutions[resolutions.length - 1];\n        if (options.constrainResolution) {\n            resolutionConstraint = createSnapToResolutions(resolutions, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n        else {\n            resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n    }\n    else {\n        // calculate the default min and max resolution\n        var size = !projExtent\n            ? // use an extent that can fit the whole world if need be\n                (360 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit()\n            : Math.max(getWidth(projExtent), getHeight(projExtent));\n        var defaultMaxRes
 olution = size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n        var defaultMinResolution = defaultMaxResolution /\n            Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n        // user provided maxResolution takes precedence\n        maxResolution = options.maxResolution;\n        if (maxResolution !== undefined) {\n            minZoom = 0;\n        }\n        else {\n            maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n        }\n        // user provided minResolution takes precedence\n        minResolution = options.minResolution;\n        if (minResolution === undefined) {\n            if (options.maxZoom !== undefined) {\n                if (options.maxResolution !== undefined) {\n                    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n                }\n                else {\n                    minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n   
              }\n            }\n            else {\n                minResolution = defaultMinResolution;\n            }\n        }\n        // given discrete zoom levels, minResolution may be different than provided\n        maxZoom =\n            minZoom +\n                Math.floor(Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n        minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n        if (options.constrainResolution) {\n            resolutionConstraint = createSnapToPower(zoomFactor, maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n        else {\n            resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n    }\n    return {\n        constraint: resolutionConstraint,\n        maxResolution: maxResolution,\n        minResolution: minResolution,\n        minZoom: minZoom,\n        zoomF
 actor: zoomFactor,\n    };\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n    var enableRotation = options.enableRotation !== undefined ? options.enableRotation : true;\n    if (enableRotation) {\n        var constrainRotation = options.constrainRotation;\n        if (constrainRotation === undefined || constrainRotation === true) {\n            return createSnapToZero();\n        }\n        else if (constrainRotation === false) {\n            return rotationNone;\n        }\n        else if (typeof constrainRotation === 'number') {\n            return createSnapToN(constrainRotation);\n        }\n        else {\n            return rotationNone;\n        }\n    }\n    else {\n        return disable;\n    }\n}\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The an
 imation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n    if (animation.sourceCenter && animation.targetCenter) {\n        if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n            return false;\n        }\n    }\n    if (animation.sourceResolution !== animation.targetResolution) {\n        return false;\n    }\n    if (animation.sourceRotation !== animation.targetRotation) {\n        return false;\n    }\n    return true;\n}\nexport default View;\n//# sourceMappingURL=View.js.map","/**\n * @module ol/tilegrid/common\n */\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport var DEFAULT_MAX_ZOOM = 42;\n/**\n * Default tile size.\n * @type {number}\n */\nexport var DEFAULT_TILE_SIZE = 256;\n//# sourceMappingURL=common.js.map","/**\n * @module ol/size\n */\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n/**\n * Returns a buffe
 red size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, opt_size) {\n    if (opt_size === undefined) {\n        opt_size = [0, 0];\n    }\n    opt_size[0] = size[0] + 2 * num;\n    opt_size[1] = size[1] + 2 * num;\n    return opt_size;\n}\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n    return size[0] > 0 && size[1] > 0;\n}\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, opt_size) {\n    if (opt_size === undefined) {\n        opt_size = [0, 0];\n  
   }\n    opt_size[0] = (size[0] * ratio + 0.5) | 0;\n    opt_size[1] = (size[1] * ratio + 0.5) | 0;\n    return opt_size;\n}\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, opt_size) {\n    if (Array.isArray(size)) {\n        return size;\n    }\n    else {\n        if (opt_size === undefined) {\n            opt_size = [size, size];\n        }\n        else {\n            opt_size[0] = size;\n            opt_size[1] = size;\n        }\n        return opt_size;\n    }\n}\n//# sourceMappingURL=size.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ =
  b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/PluggableMap\n */\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport EventType from './events/EventType.js';\nimport LayerGroup from './layer/Group.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport ObjectEventType f
 rom './ObjectEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport RenderEventType from './render/EventType.js';\nimport TileQueue, { getTilePriority } from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport { DEVICE_PIXEL_RATIO, IMAGE_DECODE, PASSIVE_EVENT_LISTENERS, } from './has.js';\nimport { TRUE } from './functions.js';\nimport { apply as applyTransform, create as createTransform, } from './transform.js';\nimport { assert } from './asserts.js';\nimport { clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty, } from './extent.js';\nimport { fromUserCoordinate, toUserCoordinate } from './proj.js';\nimport { hasArea } from './size.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { removeNode } from './dom.js';\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelR
 atio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform\n * @property {null|import(\"./extent.js\").Extent} extent\n * @property {Array<DeclutterItems>} declutterItems\n * @property {number} index\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray\n * @property {number} layerIndex\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array<PostRenderFunction>} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {TileQueue} tileQueue\n * @property {!Object<string, Object<string, boolean>>} usedTiles\n * @property {Array<number>} viewHints\n * @property {!Object<string, Object<string, boolean>>} wantedTiles\n */\n/**\n * @typedef {Object} D
 eclutterItems\n * @property {Array<*>} items Declutter items of an executor.\n * @property {number} opacity Layer opacity.\n */\n/**\n * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction\n */\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for for wrapped geometries inside the range of\n *   +/- 1 world width. Works only if a projec
 tion is used that can be wrapped.\n */\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls]\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions]\n * @property {HTMLElement|Document} keyboardEventTarget\n * @property {Collection<import(\"./Overlay.js\").default>} overlays\n * @property {Object<string, *>} values\n */\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control~defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\".
 /interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction~defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rende
 red. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered.\n * @property {View} [view] The map's view.  No layer source
 s will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nvar PluggableMap = /** @class */ (function (_super) {\n    __extends(PluggableMap, _super);\n    /**\n     * @param {MapOptions} options Map options.\n     */\n    function PluggableMap(options) {\n        var _this = _super.call(this) || this;\n        var optionsInternal = createOptionsInternal(options);\n        /** @private */\n        _this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this);\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxTilesLoading_ =\n            options.maxTilesLoading !== u
 ndefined ? options.maxTilesLoading : 16;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ =\n            options.pixelRatio !== undefined\n                ? options.pixelRatio\n                : DEVICE_PIXEL_RATIO;\n        /**\n         * @private\n         * @type {*}\n         */\n        _this.postRenderTimeoutHandle_;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.animationDelayKey_;\n        /**\n         * @private\n         */\n        _this.animationDelay_ = function () {\n            this.animationDelayKey_ = undefined;\n            this.renderFrame_(Date.now());\n        }.bind(_this);\n        /**\n         * @private\n         * @type {import(\"./transform.js\").Transform}\n         */\n        _this.coordinateToPixelTransform_ = createTransform();\n        /**\n         * @private\n         * @type {import(\"./transform.js\").Transform}\n         */\n        _this.pi
 xelToCoordinateTransform_ = createTransform();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.frameIndex_ = 0;\n        /**\n         * @private\n         * @type {?FrameState}\n         */\n        _this.frameState_ = null;\n        /**\n         * The extent at the previous 'moveend' event.\n         * @private\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.previousExtent_ = null;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.viewPropertyListenerKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.viewChangeListenerKey_ = null;\n        /**\n         * @private\n         * @type {?Array<import(\"./events.js\").EventsKey>}\n         */\n        _this.layerGroupPropertyListenerKeys_ = null;\n        /**\n         * @private\n         * @type {!HTMLElement}\n       
   */\n        _this.viewport_ = document.createElement('div');\n        _this.viewport_.className =\n            'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n        _this.viewport_.style.position = 'relative';\n        _this.viewport_.style.overflow = 'hidden';\n        _this.viewport_.style.width = '100%';\n        _this.viewport_.style.height = '100%';\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.overlayContainer_ = document.createElement('div');\n        _this.overlayContainer_.style.position = 'absolute';\n        _this.overlayContainer_.style.zIndex = '0';\n        _this.overlayContainer_.style.width = '100%';\n        _this.overlayContainer_.style.height = '100%';\n        _this.overlayContainer_.style.pointerEvents = 'none';\n        _this.overlayContainer_.className = 'ol-overlaycontainer';\n        _this.viewport_.appendChild(_this.overlayContainer_);\n        /**\n         * @private\n         * @type {!
 HTMLElement}\n         */\n        _this.overlayContainerStopEvent_ = document.createElement('div');\n        _this.overlayContainerStopEvent_.style.position = 'absolute';\n        _this.overlayContainerStopEvent_.style.zIndex = '0';\n        _this.overlayContainerStopEvent_.style.width = '100%';\n        _this.overlayContainerStopEvent_.style.height = '100%';\n        _this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n        _this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n        _this.viewport_.appendChild(_this.overlayContainerStopEvent_);\n        /**\n         * @private\n         * @type {MapBrowserEventHandler}\n         */\n        _this.mapBrowserEventHandler_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.moveTolerance_ = options.moveTolerance;\n        /**\n         * @private\n         * @type {HTMLElement|Document}\n         */\n        _this.keyboardEventTarget_ = optionsInte
 rnal.keyboardEventTarget;\n        /**\n         * @private\n         * @type {?Array<import(\"./events.js\").EventsKey>}\n         */\n        _this.keyHandlerKeys_ = null;\n        /**\n         * @type {Collection<import(\"./control/Control.js\").default>}\n         * @protected\n         */\n        _this.controls = optionsInternal.controls || new Collection();\n        /**\n         * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n         * @protected\n         */\n        _this.interactions = optionsInternal.interactions || new Collection();\n        /**\n         * @type {Collection<import(\"./Overlay.js\").default>}\n         * @private\n         */\n        _this.overlays_ = optionsInternal.overlays;\n        /**\n         * A lookup of overlays by id.\n         * @private\n         * @type {Object<string, import(\"./Overlay.js\").default>}\n         */\n        _this.overlayIdIndex_ = {};\n        /**\n         * @type {import(\"./renderer/Map.js\")
 .default}\n         * @private\n         */\n        _this.renderer_ = null;\n        /**\n         * @type {undefined|function(Event): void}\n         * @private\n         */\n        _this.handleResize_;\n        /**\n         * @private\n         * @type {!Array<PostRenderFunction>}\n         */\n        _this.postRenderFunctions_ = [];\n        /**\n         * @private\n         * @type {TileQueue}\n         */\n        _this.tileQueue_ = new TileQueue(_this.getTilePriority.bind(_this), _this.handleTileChange_.bind(_this));\n        _this.addEventListener(getChangeEventType(MapProperty.LAYERGROUP), _this.handleLayerGroupChanged_);\n        _this.addEventListener(getChangeEventType(MapProperty.VIEW), _this.handleViewChanged_);\n        _this.addEventListener(getChangeEventType(MapProperty.SIZE), _this.handleSizeChanged_);\n        _this.addEventListener(getChangeEventType(MapProperty.TARGET), _this.handleTargetChanged_);\n        // setProperties will trigger the rendering of the
  map if the map\n        // is \"defined\" already.\n        _this.setProperties(optionsInternal.values);\n        _this.controls.forEach(\n        /**\n         * @param {import(\"./control/Control.js\").default} control Control.\n         * @this {PluggableMap}\n         */\n        function (control) {\n            control.setMap(this);\n        }.bind(_this));\n        _this.controls.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(this);\n        }.bind(_this));\n        _this.controls.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(null);\n        }.bind(_this));\n        _this.interactions.forEach(\n        /**\n         * @param {import(
 \"./interaction/Interaction.js\").default} interaction Interaction.\n         * @this {PluggableMap}\n         */\n        function (interaction) {\n            interaction.setMap(this);\n        }.bind(_this));\n        _this.interactions.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(this);\n        }.bind(_this));\n        _this.interactions.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(null);\n        }.bind(_this));\n        _this.overlays_.forEach(_this.addOverlayInternal_.bind(_this));\n        _this.overlays_.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event
  CollectionEvent.\n         */\n        function (event) {\n            this.addOverlayInternal_(\n            /** @type {import(\"./Overlay.js\").default} */ (event.element));\n        }.bind(_this));\n        _this.overlays_.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            var overlay = /** @type {import(\"./Overlay.js\").default} */ (event.element);\n            var id = overlay.getId();\n            if (id !== undefined) {\n                delete this.overlayIdIndex_[id.toString()];\n            }\n            event.element.setMap(null);\n        }.bind(_this));\n        return _this;\n    }\n    /**\n     * @abstract\n     * @return {import(\"./renderer/Map.js\").default} The map renderer\n     */\n    PluggableMap.prototype.createRenderer = function () {\n        throw new Error('Use a map type that has a createRenderer method'
 );\n    };\n    /**\n     * Add the given control to the map.\n     * @param {import(\"./control/Control.js\").default} control Control.\n     * @api\n     */\n    PluggableMap.prototype.addControl = function (control) {\n        this.getControls().push(control);\n    };\n    /**\n     * Add the given interaction to the map. If you want to add an interaction\n     * at another point of the collection use `getInteraction()` and the methods\n     * available on {@link module:ol/Collection~Collection}. This can be used to\n     * stop the event propagation from the handleEvent function. The interactions\n     * get to handle the events in the reverse order of this collection.\n     * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n     * @api\n     */\n    PluggableMap.prototype.addInteraction = function (interaction) {\n        this.getInteractions().push(interaction);\n    };\n    /**\n     * Adds the given layer to the top of this map. If y
 ou want to add a layer\n     * elsewhere in the stack, use `getLayers()` and the methods available on\n     * {@link module:ol/Collection~Collection}.\n     * @param {import(\"./layer/Base.js\").default} layer Layer.\n     * @api\n     */\n    PluggableMap.prototype.addLayer = function (layer) {\n        var layers = this.getLayerGroup().getLayers();\n        layers.push(layer);\n    };\n    /**\n     * Add the given overlay to the map.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @api\n     */\n    PluggableMap.prototype.addOverlay = function (overlay) {\n        this.getOverlays().push(overlay);\n    };\n    /**\n     * This deals with map's overlay collection changes.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @private\n     */\n    PluggableMap.prototype.addOverlayInternal_ = function (overlay) {\n        var id = overlay.getId();\n        if (id !== undefined) {\n            this.overlayIdIndex_[id.toString()] = over
 lay;\n        }\n        overlay.setMap(this);\n    };\n    /**\n     *\n     * Clean up.\n     */\n    PluggableMap.prototype.disposeInternal = function () {\n        this.setTarget(null);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Detect features that intersect a pixel on the viewport, and execute a\n     * callback with each intersecting feature. Layers included in the detection can\n     * be configured through the `layerFilter` option in `opt_options`.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {function(this: S, import(\"./Feature.js\").FeatureLike,\n     *     import(\"./layer/Layer.js\").default): T} callback Feature callback. The callback will be\n     *     called with two arguments. The first argument is one\n     *     {@link module:ol/Feature feature} or\n     *     {@link module:ol/render/Feature render feature} at the pixel, the second is\n     *     the {@link module:ol/layer/Layer layer} of the featu
 re and will be null for\n     *     unmanaged layers. To stop detection, callback functions can return a\n     *     truthy value.\n     * @param {AtPixelOptions=} opt_options Optional options.\n     * @return {T|undefined} Callback result, i.e. the return value of last\n     * callback execution, or the first truthy callback return value.\n     * @template S,T\n     * @api\n     */\n    PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) {\n        if (!this.frameState_) {\n            return;\n        }\n        var coordinate = this.getCoordinateFromPixelInternal(pixel);\n        opt_options = opt_options !== undefined ? opt_options : {};\n        var hitTolerance = opt_options.hitTolerance !== undefined\n            ? opt_options.hitTolerance * this.frameState_.pixelRatio\n            : 0;\n        var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n        var checkWrapped = opt_options.checkWrapped !== f
 alse;\n        return this.renderer_.forEachFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, layerFilter, null);\n    };\n    /**\n     * Get all features that intersect a pixel on the viewport.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {AtPixelOptions=} opt_options Optional options.\n     * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n     * an empty array if none were found.\n     * @api\n     */\n    PluggableMap.prototype.getFeaturesAtPixel = function (pixel, opt_options) {\n        var features = [];\n        this.forEachFeatureAtPixel(pixel, function (feature) {\n            features.push(feature);\n        }, opt_options);\n        return features;\n    };\n    /**\n     * Detect layers that have a color value at a pixel on the viewport, and\n     * execute a callback with each matching layer. Layers included in the\n     * detection can be configured through `opt_l
 ayerFilter`.\n     *\n     * Note: this may give false positives unless the map layers have had different `className`\n     * properties assigned to them.\n     *\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {function(this: S, import(\"./layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback\n     *     Layer callback. This callback will receive two arguments: first is the\n     *     {@link module:ol/layer/Layer layer}, second argument is an array representing\n     *     [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types\n     *     that do not currently support this argument. To stop detection, callback\n     *     functions can return a truthy value.\n     * @param {AtPixelOptions=} opt_options Configuration options.\n     * @return {T|undefined} Callback result, i.e. the return value of last\n     * callback execution, or the first truthy callback return value.\n     * @template S,T\n     * @api\n     */\n    Plu
 ggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) {\n        if (!this.frameState_) {\n            return;\n        }\n        var options = opt_options || {};\n        var hitTolerance = options.hitTolerance !== undefined\n            ? options.hitTolerance * this.frameState_.pixelRatio\n            : 0;\n        var layerFilter = options.layerFilter || TRUE;\n        return this.renderer_.forEachLayerAtPixel(pixel, this.frameState_, hitTolerance, callback, layerFilter);\n    };\n    /**\n     * Detect if features intersect a pixel on the viewport. Layers included in the\n     * detection can be configured through `opt_layerFilter`.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {AtPixelOptions=} opt_options Optional options.\n     * @return {boolean} Is there a feature at the given pixel?\n     * @api\n     */\n    PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) {\n        if (!this.frameState_) {\
 n            return false;\n        }\n        var coordinate = this.getCoordinateFromPixelInternal(pixel);\n        opt_options = opt_options !== undefined ? opt_options : {};\n        var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n        var hitTolerance = opt_options.hitTolerance !== undefined\n            ? opt_options.hitTolerance * this.frameState_.pixelRatio\n            : 0;\n        var checkWrapped = opt_options.checkWrapped !== false;\n        return this.renderer_.hasFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null);\n    };\n    /**\n     * Returns the coordinate in user projection for a browser event.\n     * @param {MouseEvent} event Event.\n     * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    PluggableMap.prototype.getEventCoordinate = function (event) {\n        return this.getCoordinateFromPixel(this.getEventPixel(event));\n    };\n 
    /**\n     * Returns the coordinate in view projection for a browser event.\n     * @param {MouseEvent} event Event.\n     * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n     */\n    PluggableMap.prototype.getEventCoordinateInternal = function (event) {\n        return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n    };\n    /**\n     * Returns the map pixel position for a browser event relative to the viewport.\n     * @param {UIEvent} event Event.\n     * @return {import(\"./pixel.js\").Pixel} Pixel.\n     * @api\n     */\n    PluggableMap.prototype.getEventPixel = function (event) {\n        var viewportPosition = this.viewport_.getBoundingClientRect();\n        var eventPosition = \n        //FIXME Are we really calling this with a TouchEvent anywhere?\n        'changedTouches' in event\n            ? /** @type {TouchEvent} */ (event).changedTouches[0]\n            : /** @type {MouseEvent} */ (event);\n        return [\n            eventPos
 ition.clientX - viewportPosition.left,\n            eventPosition.clientY - viewportPosition.top,\n        ];\n    };\n    /**\n     * Get the target in which this map is rendered.\n     * Note that this returns what is entered as an option or in setTarget:\n     * if that was an element, it returns an element; if a string, it returns that.\n     * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n     *     map is rendered in.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getTarget = function () {\n        return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET));\n    };\n    /**\n     * Get the DOM element into which this map is rendered. In contrast to\n     * `getTarget` this method always return an `Element`, or `null` if the\n     * map has no target.\n     * @return {HTMLElement} The element that the map is rendered in.\n     * @api\n     */\n    PluggableMap.prototype.getTargetElement = function
  () {\n        var target = this.getTarget();\n        if (target !== undefined) {\n            return typeof target === 'string'\n                ? document.getElementById(target)\n                : target;\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * Get the coordinate for a given pixel.  This returns a coordinate in the\n     * user projection.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n     * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n     * @api\n     */\n    PluggableMap.prototype.getCoordinateFromPixel = function (pixel) {\n        return toUserCoordinate(this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection());\n    };\n    /**\n     * Get the coordinate for a given pixel.  This returns a coordinate in the\n     * map view projection.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n
      * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n     */\n    PluggableMap.prototype.getCoordinateFromPixelInternal = function (pixel) {\n        var frameState = this.frameState_;\n        if (!frameState) {\n            return null;\n        }\n        else {\n            return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n        }\n    };\n    /**\n     * Get the map controls. Modifying this collection changes the controls\n     * associated with the map.\n     * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n     * @api\n     */\n    PluggableMap.prototype.getControls = function () {\n        return this.controls;\n    };\n    /**\n     * Get the map overlays. Modifying this collection changes the overlays\n     * associated with the map.\n     * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n     * @api\n     */\n    PluggableMap.prototype.getOverlays = functi
 on () {\n        return this.overlays_;\n    };\n    /**\n     * Get an overlay by its identifier (the value returned by overlay.getId()).\n     * Note that the index treats string and numeric identifiers as the same. So\n     * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n     * @param {string|number} id Overlay identifier.\n     * @return {import(\"./Overlay.js\").default} Overlay.\n     * @api\n     */\n    PluggableMap.prototype.getOverlayById = function (id) {\n        var overlay = this.overlayIdIndex_[id.toString()];\n        return overlay !== undefined ? overlay : null;\n    };\n    /**\n     * Get the map interactions. Modifying this collection changes the interactions\n     * associated with the map.\n     *\n     * Interactions are used for e.g. pan, zoom and rotate.\n     * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n     * @api\n     */\n    PluggableMap.prototype.getInteractions = function () {\n      
   return this.interactions;\n    };\n    /**\n     * Get the layergroup associated with this map.\n     * @return {LayerGroup} A layer group containing the layers in this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getLayerGroup = function () {\n        return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n    };\n    /**\n     * Get the collection of layers associated with this map.\n     * @return {!Collection<import(\"./layer/Base.js\").default>} Layers.\n     * @api\n     */\n    PluggableMap.prototype.getLayers = function () {\n        var layers = this.getLayerGroup().getLayers();\n        return layers;\n    };\n    /**\n     * @return {boolean} Layers have sources that are still loading.\n     */\n    PluggableMap.prototype.getLoading = function () {\n        var layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layer = layerState
 sArray[i].layer;\n            var source = /** @type {import(\"./layer/Layer.js\").default} */ (layer).getSource();\n            if (source && source.loading) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * Get the pixel for a coordinate.  This takes a coordinate in the user\n     * projection and returns the corresponding pixel.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n     * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n     * @api\n     */\n    PluggableMap.prototype.getPixelFromCoordinate = function (coordinate) {\n        var viewCoordinate = fromUserCoordinate(coordinate, this.getView().getProjection());\n        return this.getPixelFromCoordinateInternal(viewCoordinate);\n    };\n    /**\n     * Get the pixel for a coordinate.  This takes a coordinate in the map view\n     * projection and returns the corresponding pixel.\n     * @param {impor
 t(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n     * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n     */\n    PluggableMap.prototype.getPixelFromCoordinateInternal = function (coordinate) {\n        var frameState = this.frameState_;\n        if (!frameState) {\n            return null;\n        }\n        else {\n            return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n        }\n    };\n    /**\n     * Get the map renderer.\n     * @return {import(\"./renderer/Map.js\").default} Renderer\n     */\n    PluggableMap.prototype.getRenderer = function () {\n        return this.renderer_;\n    };\n    /**\n     * Get the size of this map.\n     * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getSize = function () {\n        return /** @type {import(\"./size.js\").Size|undefined} */ 
 (this.get(MapProperty.SIZE));\n    };\n    /**\n     * Get the view associated with this map. A view manages properties such as\n     * center and resolution.\n     * @return {View} The view that controls this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getView = function () {\n        return /** @type {View} */ (this.get(MapProperty.VIEW));\n    };\n    /**\n     * Get the element that serves as the map viewport.\n     * @return {HTMLElement} Viewport.\n     * @api\n     */\n    PluggableMap.prototype.getViewport = function () {\n        return this.viewport_;\n    };\n    /**\n     * Get the element that serves as the container for overlays.  Elements added to\n     * this container will let mousedown and touchstart events through to the map,\n     * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n     * events.\n     * @return {!HTMLElement} The map's overlay container.\n     */\n    PluggableMap.
 prototype.getOverlayContainer = function () {\n        return this.overlayContainer_;\n    };\n    /**\n     * Get the element that serves as a container for overlays that don't allow\n     * event propagation. Elements added to this container won't let mousedown and\n     * touchstart events through to the map, so clicks and gestures on an overlay\n     * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n     * @return {!HTMLElement} The map's overlay container that stops events.\n     */\n    PluggableMap.prototype.getOverlayContainerStopEvent = function () {\n        return this.overlayContainerStopEvent_;\n    };\n    /**\n     * @param {import(\"./Tile.js\").default} tile Tile.\n     * @param {string} tileSourceKey Tile source key.\n     * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n     * @param {number} tileResolution Tile resolution.\n     * @return {number} Tile priority.\n     */\n    PluggableMap.prototype.getTilePriority =
  function (tile, tileSourceKey, tileCenter, tileResolution) {\n        return getTilePriority(this.frameState_, tile, tileSourceKey, tileCenter, tileResolution);\n    };\n    /**\n     * @param {UIEvent} browserEvent Browser event.\n     * @param {string=} opt_type Type.\n     */\n    PluggableMap.prototype.handleBrowserEvent = function (browserEvent, opt_type) {\n        var type = opt_type || browserEvent.type;\n        var mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n        this.handleMapBrowserEvent(mapBrowserEvent);\n    };\n    /**\n     * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n     */\n    PluggableMap.prototype.handleMapBrowserEvent = function (mapBrowserEvent) {\n        if (!this.frameState_) {\n            // With no view defined, we cannot translate pixels into geographical\n            // coordinates so interactions cannot be used.\n            return;\n        }\n        var originalEvent = /** @type {PointerEvent} */ (mapB
 rowserEvent.originalEvent);\n        var eventType = originalEvent.type;\n        if (eventType === PointerEventType.POINTERDOWN ||\n            eventType === EventType.WHEEL ||\n            eventType === EventType.KEYDOWN) {\n            var rootNode = this.viewport_.getRootNode\n                ? this.viewport_.getRootNode()\n                : document;\n            var target = rootNode === document\n                ? /** @type {Node} */ (originalEvent.target)\n                : /** @type {ShadowRoot} */ (rootNode).elementFromPoint(originalEvent.clientX, originalEvent.clientY);\n            if (\n            // Abort if the event target is a child of the container that is no longer in the page.\n            // It's possible for the target to no longer be in the page if it has been removed in an\n            // event listener, this might happen in a Control that recreates it's content based on\n            // user interaction either manually or via a render in something like https
 ://reactjs.org/\n            !rootNode.contains(target) ||\n                // Abort if the target is a child of the container for elements whose events are not meant\n                // to be handled by map interactions.\n                this.overlayContainerStopEvent_.contains(target)) {\n                return;\n            }\n        }\n        mapBrowserEvent.frameState = this.frameState_;\n        var interactionsArray = this.getInteractions().getArray();\n        if (this.dispatchEvent(mapBrowserEvent) !== false) {\n            for (var i = interactionsArray.length - 1; i >= 0; i--) {\n                var interaction = interactionsArray[i];\n                if (!interaction.getActive()) {\n                    continue;\n                }\n                var cont = interaction.handleEvent(mapBrowserEvent);\n                if (!cont) {\n                    break;\n                }\n            }\n        }\n    };\n    /**\n     * @protected\n     */\n    PluggableMap.protot
 ype.handlePostRender = function () {\n        var frameState = this.frameState_;\n        // Manage the tile queue\n        // Image loads are expensive and a limited resource, so try to use them\n        // efficiently:\n        // * When the view is static we allow a large number of parallel tile loads\n        //   to complete the frame as quickly as possible.\n        // * When animating or interacting, image loads can cause janks, so we reduce\n        //   the maximum number of loads per frame and limit the number of parallel\n        //   tile loads to remain reactive to view changes and to reduce the chance of\n        //   loading tiles that will quickly disappear from view.\n        var tileQueue = this.tileQueue_;\n        if (!tileQueue.isEmpty()) {\n            var maxTotalLoading = this.maxTilesLoading_;\n            var maxNewLoads = maxTotalLoading;\n            if (frameState) {\n                var hints = frameState.viewHints;\n                if (hints[ViewHint.A
 NIMATING] || hints[ViewHint.INTERACTING]) {\n                    var lowOnFrameBudget = !IMAGE_DECODE && Date.now() - frameState.time > 8;\n                    maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n                    maxNewLoads = lowOnFrameBudget ? 0 : 2;\n                }\n            }\n            if (tileQueue.getTilesLoading() < maxTotalLoading) {\n                tileQueue.reprioritize(); // FIXME only call if view has changed\n                tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n            }\n        }\n        if (frameState &&\n            this.hasListener(RenderEventType.RENDERCOMPLETE) &&\n            !frameState.animate &&\n            !this.tileQueue_.getTilesLoading() &&\n            !this.getLoading()) {\n            this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);\n        }\n        var postRenderFunctions = this.postRenderFunctions_;\n        for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {
 \n            postRenderFunctions[i](this, frameState);\n        }\n        postRenderFunctions.length = 0;\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleSizeChanged_ = function () {\n        if (this.getView() && !this.getView().getAnimating()) {\n            this.getView().resolveConstraints(0);\n        }\n        this.render();\n    };\n    /**\n     * @param {import(\"./Object\").ObjectEvent} event Event.\n     * @private\n     */\n    PluggableMap.prototype.handleTargetChanged_ = function (event) {\n        // target may be undefined, null, a string or an Element.\n        // If it's a string we convert it to an Element before proceeding.\n        // If it's not now an Element we remove the viewport from the DOM.\n        // If it's an Element we append the viewport element to it.\n        var targetElement;\n        if (this.getTarget()) {\n            targetElement = this.getTargetElement();\n        }\n        if (event.oldValue) {\n          
   for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n                unlistenByKey(this.keyHandlerKeys_[i]);\n            }\n            this.keyHandlerKeys_ = null;\n            this.viewport_.removeEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_);\n            this.viewport_.removeEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_);\n            if (this.handleResize_ !== undefined) {\n                removeEventListener(EventType.RESIZE, this.handleResize_, false);\n                this.handleResize_ = undefined;\n            }\n            this.mapBrowserEventHandler_.dispose();\n            removeNode(this.viewport_);\n        }\n        if (!targetElement) {\n            if (this.renderer_) {\n                clearTimeout(this.postRenderTimeoutHandle_);\n                this.postRenderFunctions_.length = 0;\n                this.renderer_.dispose();\n                this.renderer_ = null;\n            }\n            if (this.animatio
 nDelayKey_) {\n                cancelAnimationFrame(this.animationDelayKey_);\n                this.animationDelayKey_ = undefined;\n            }\n        }\n        else {\n            targetElement.appendChild(this.viewport_);\n            if (!this.renderer_) {\n                this.renderer_ = this.createRenderer();\n            }\n            this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, this.moveTolerance_);\n            for (var key in MapBrowserEventType) {\n                this.mapBrowserEventHandler_.addEventListener(MapBrowserEventType[key], this.handleMapBrowserEvent.bind(this));\n            }\n            this.viewport_.addEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_, false);\n            this.viewport_.addEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_, PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n            var keyboardEventTarget = !this.keyboardEventTarget_\n                ? targetElement\n         
        : this.keyboardEventTarget_;\n            this.keyHandlerKeys_ = [\n                listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this),\n                listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this),\n            ];\n            if (!this.handleResize_) {\n                this.handleResize_ = this.updateSize.bind(this);\n                window.addEventListener(EventType.RESIZE, this.handleResize_, false);\n            }\n        }\n        this.updateSize();\n        // updateSize calls setSize, so no need to call this.render\n        // ourselves here.\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleTileChange_ = function () {\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleViewPropertyChanged_ = function () {\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleViewChanged_ = function ()
  {\n        if (this.viewPropertyListenerKey_) {\n            unlistenByKey(this.viewPropertyListenerKey_);\n            this.viewPropertyListenerKey_ = null;\n        }\n        if (this.viewChangeListenerKey_) {\n            unlistenByKey(this.viewChangeListenerKey_);\n            this.viewChangeListenerKey_ = null;\n        }\n        var view = this.getView();\n        if (view) {\n            this.updateViewportSize_();\n            this.viewPropertyListenerKey_ = listen(view, ObjectEventType.PROPERTYCHANGE, this.handleViewPropertyChanged_, this);\n            this.viewChangeListenerKey_ = listen(view, EventType.CHANGE, this.handleViewPropertyChanged_, this);\n            view.resolveConstraints(0);\n        }\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleLayerGroupChanged_ = function () {\n        if (this.layerGroupPropertyListenerKeys_) {\n            this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n        
     this.layerGroupPropertyListenerKeys_ = null;\n        }\n        var layerGroup = this.getLayerGroup();\n        if (layerGroup) {\n            this.layerGroupPropertyListenerKeys_ = [\n                listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n                listen(layerGroup, EventType.CHANGE, this.render, this),\n            ];\n        }\n        this.render();\n    };\n    /**\n     * @return {boolean} Is rendered.\n     */\n    PluggableMap.prototype.isRendered = function () {\n        return !!this.frameState_;\n    };\n    /**\n     * Requests an immediate render in a synchronous manner.\n     * @api\n     */\n    PluggableMap.prototype.renderSync = function () {\n        if (this.animationDelayKey_) {\n            cancelAnimationFrame(this.animationDelayKey_);\n        }\n        this.animationDelay_();\n    };\n    /**\n     * Redraws all text after new fonts have loaded\n     */\n    PluggableMap.prototype.redrawText = function () {\n    
     var layerStates = this.getLayerGroup().getLayerStatesArray();\n        for (var i = 0, ii = layerStates.length; i < ii; ++i) {\n            var layer = layerStates[i].layer;\n            if (layer.hasRenderer()) {\n                layer.getRenderer().handleFontsChanged();\n            }\n        }\n    };\n    /**\n     * Request a map rendering (at the next animation frame).\n     * @api\n     */\n    PluggableMap.prototype.render = function () {\n        if (this.renderer_ && this.animationDelayKey_ === undefined) {\n            this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n        }\n    };\n    /**\n     * Remove the given control from the map.\n     * @param {import(\"./control/Control.js\").default} control Control.\n     * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n     *     if the control was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeControl = function (control) {\n 
        return this.getControls().remove(control);\n    };\n    /**\n     * Remove the given interaction from the map.\n     * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n     * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n     *     undefined if the interaction was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeInteraction = function (interaction) {\n        return this.getInteractions().remove(interaction);\n    };\n    /**\n     * Removes the given layer from the map.\n     * @param {import(\"./layer/Base.js\").default} layer Layer.\n     * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n     *     layer was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeLayer = function (layer) {\n        var layers = this.getLayerGroup().getLayers();\n        return layers.remove(layer);\n    };\n    /**\n
      * Remove the given overlay from the map.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n     *     if the overlay was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeOverlay = function (overlay) {\n        return this.getOverlays().remove(overlay);\n    };\n    /**\n     * @param {number} time Time.\n     * @private\n     */\n    PluggableMap.prototype.renderFrame_ = function (time) {\n        var size = this.getSize();\n        var view = this.getView();\n        var previousFrameState = this.frameState_;\n        /** @type {?FrameState} */\n        var frameState = null;\n        if (size !== undefined && hasArea(size) && view && view.isDef()) {\n            var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n            var viewState = view.getState();\n            frameState = {\n                animat
 e: false,\n                coordinateToPixelTransform: this.coordinateToPixelTransform_,\n                declutterItems: previousFrameState\n                    ? previousFrameState.declutterItems\n                    : [],\n                extent: getForViewAndSize(viewState.center, viewState.resolution, viewState.rotation, size),\n                index: this.frameIndex_++,\n                layerIndex: 0,\n                layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n                pixelRatio: this.pixelRatio_,\n                pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n                postRenderFunctions: [],\n                size: size,\n                tileQueue: this.tileQueue_,\n                time: time,\n                usedTiles: {},\n                viewState: viewState,\n                viewHints: viewHints,\n                wantedTiles: {},\n            };\n        }\n        this.frameState_ = frameState;\n        this.renderer_.r
 enderFrame(frameState);\n        if (frameState) {\n            if (frameState.animate) {\n                this.render();\n            }\n            Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n            if (previousFrameState) {\n                var moveStart = !this.previousExtent_ ||\n                    (!isEmpty(this.previousExtent_) &&\n                        !equals(frameState.extent, this.previousExtent_));\n                if (moveStart) {\n                    this.dispatchEvent(new MapEvent(MapEventType.MOVESTART, this, previousFrameState));\n                    this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n                }\n            }\n            var idle = this.previousExtent_ &&\n                !frameState.viewHints[ViewHint.ANIMATING] &&\n                !frameState.viewHints[ViewHint.INTERACTING] &&\n                !equals(frameState.extent, this.previousExtent_);\n            if (idle) {\n    
             this.dispatchEvent(new MapEvent(MapEventType.MOVEEND, this, frameState));\n                clone(frameState.extent, this.previousExtent_);\n            }\n        }\n        this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n        this.postRenderTimeoutHandle_ = setTimeout(this.handlePostRender.bind(this), 0);\n    };\n    /**\n     * Sets the layergroup of this map.\n     * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setLayerGroup = function (layerGroup) {\n        this.set(MapProperty.LAYERGROUP, layerGroup);\n    };\n    /**\n     * Set the size of this map.\n     * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setSize = function (size) {\n        this.set(MapProperty.SIZE, size);\n    };\n    /**\n     * Set the target 
 element to render this map into.\n     * @param {HTMLElement|string|undefined} target The Element or id of the Element\n     *     that the map is rendered in.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setTarget = function (target) {\n        this.set(MapProperty.TARGET, target);\n    };\n    /**\n     * Set the view for this map.\n     * @param {View} view The view that controls this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setView = function (view) {\n        this.set(MapProperty.VIEW, view);\n    };\n    /**\n     * Force a recalculation of the map viewport size.  This should be called when\n     * third-party code changes the size of the map viewport.\n     * @api\n     */\n    PluggableMap.prototype.updateSize = function () {\n        var targetElement = this.getTargetElement();\n        if (!targetElement) {\n            this.setSize(undefined);\n        }\n        else {\n            var computedStyle = getComputed
 Style(targetElement);\n            this.setSize([\n                targetElement.offsetWidth -\n                    parseFloat(computedStyle['borderLeftWidth']) -\n                    parseFloat(computedStyle['paddingLeft']) -\n                    parseFloat(computedStyle['paddingRight']) -\n                    parseFloat(computedStyle['borderRightWidth']),\n                targetElement.offsetHeight -\n                    parseFloat(computedStyle['borderTopWidth']) -\n                    parseFloat(computedStyle['paddingTop']) -\n                    parseFloat(computedStyle['paddingBottom']) -\n                    parseFloat(computedStyle['borderBottomWidth']),\n            ]);\n        }\n        this.updateViewportSize_();\n    };\n    /**\n     * Recomputes the viewport size and save it on the view object (if any)\n     * @private\n     */\n    PluggableMap.prototype.updateViewportSize_ = function () {\n        var view = this.getView();\n        if (view) {\n            var siz
 e = undefined;\n            var computedStyle = getComputedStyle(this.viewport_);\n            if (computedStyle.width && computedStyle.height) {\n                size = [\n                    parseInt(computedStyle.width, 10),\n                    parseInt(computedStyle.height, 10),\n                ];\n            }\n            view.setViewportSize(size);\n        }\n    };\n    return PluggableMap;\n}(BaseObject));\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n    /**\n     * @type {HTMLElement|Document}\n     */\n    var keyboardEventTarget = null;\n    if (options.keyboardEventTarget !== undefined) {\n        keyboardEventTarget =\n            typeof options.keyboardEventTarget === 'string'\n                ? document.getElementById(options.keyboardEventTarget)\n                : options.keyboardEventTarget;\n    }\n    /**\n     * @type {Object<string, *>}\n     */\n   
  var values = {};\n    var layerGroup = options.layers &&\n        typeof ( /** @type {?} */(options.layers).getLayers) === 'function'\n        ? /** @type {LayerGroup} */ (options.layers)\n        : new LayerGroup({ layers: /** @type {Collection} */ (options.layers) });\n    values[MapProperty.LAYERGROUP] = layerGroup;\n    values[MapProperty.TARGET] = options.target;\n    values[MapProperty.VIEW] =\n        options.view !== undefined ? options.view : new View();\n    var controls;\n    if (options.controls !== undefined) {\n        if (Array.isArray(options.controls)) {\n            controls = new Collection(options.controls.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.controls).getArray) === 'function', 47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n            controls = /** @type {Collection} */ (options.controls);\n        }\n    }\n    var interactions;\n    if (options.interactions !== 
 undefined) {\n        if (Array.isArray(options.interactions)) {\n            interactions = new Collection(options.interactions.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.interactions).getArray) ===\n                'function', 48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n            interactions = /** @type {Collection} */ (options.interactions);\n        }\n    }\n    var overlays;\n    if (options.overlays !== undefined) {\n        if (Array.isArray(options.overlays)) {\n            overlays = new Collection(options.overlays.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.overlays).getArray) === 'function', 49); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n            overlays = options.overlays;\n        }\n    }\n    else {\n        overlays = new Collection();\n    }\n    return {\n        control
 s: controls,\n        interactions: interactions,\n        keyboardEventTarget: keyboardEventTarget,\n        overlays: overlays,\n        values: values,\n    };\n}\nexport default PluggableMap;\n//# sourceMappingURL=PluggableMap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport { VOID } from '../func
 tions.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { removeNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM elem
 ent.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /** @class */ (function (_super) {\n    __extends(Control, _super);\n    /**\n     * @param {Options} options Control options.\n     */\n    function Control(options) {\n        var _this = _super.call(this) || this;\n        var element = options.element;\n        if (element && !options.target && !
 element.style.pointerEvents) {\n            element.style.pointerEvents = 'auto';\n        }\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.element = element ? element : null;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.target_ = null;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        /**\n         * @protected\n         * @type {!Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.listenerKeys = [];\n        if (options.render) {\n            _this.render = options.render;\n        }\n        if (options.target) {\n            _this.setTarget(options.target);\n        }\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    Control.prototype.disposeInternal = function () {\n        removeNode(this.element);\n        _super.prototype.disposeInternal.call(this)
 ;\n    };\n    /**\n     * Get the map associated with this control.\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     * @api\n     */\n    Control.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Control.prototype.setMap = function (map) {\n        if (this.map_) {\n            removeNode(this.element);\n        }\n        for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n            unlistenByKey(this.listenerKeys[i]);\n        }\n        this.listenerKeys.length = 0;\n        this.map_ = map;\n        if (this.map_) {\n            var target = this.target_\n                ? this.target_\n                : map.getOverlayContainerStopEvent();\n            ta
 rget.appendChild(this.element);\n            if (this.render !== VOID) {\n                this.listenerKeys.push(listen(map, MapEventType.POSTRENDER, this.render, this));\n            }\n            map.render();\n        }\n    };\n    /**\n     * Renders the control.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @api\n     */\n    Control.prototype.render = function (mapEvent) { };\n    /**\n     * This function is used to set a target element for the control. It has no\n     * effect if it is called after the control has been added to the map (i.e.\n     * after `setMap` is called on the control). If no `target` is set in the\n     * options passed to the control constructor and if `setTarget` is not called\n     * then the control is added to the map's overlay container.\n     * @param {HTMLElement|string} target Target.\n     * @api\n     */\n    Control.prototype.setTarget = function (target) {\n        this.target_ =\n            typeof targe
 t === 'string' ? document.getElementById(target) : target;\n    };\n    return Control;\n}(BaseObject));\nexport default Control;\n//# sourceMappingURL=Control.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Attribution\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { equals }
  from '../array.js';\nimport { inView } from '../layer/Layer.js';\nimport { removeChildren, replaceNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [collapseLabel='»'] Text label to use\n * for the expan
 ded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nvar Attribution = /** @class */ (function (_super) {\n    __extends(Attribution, _super);\n    /**\n     * @param {Options=} opt_options Attribution options.\n     */\n    function Attribution(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createE
 lement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.ulElement_ = document.createElement('ul');\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsed_ =\n            options.collapsed !== undefined ? options.collapsed : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overrideCollapsible_ = options.collapsible !== undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsible_ =\n            options.collapsible !== undefined ? options.collapsible : true;\n        if (!_this.collapsible_) {\n            _this.collapsed_ = false;\n        }\n        var className = options.className !== undefined ? options.className : 'ol-attribution';\n        var tipLabel = options.tipLabel !== undefined ? opti
 ons.tipLabel : 'Attributions';\n        var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\n        if (typeof collapseLabel === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.collapseLabel_ = document.createElement('span');\n            _this.collapseLabel_.textContent = collapseLabel;\n        }\n        else {\n            _this.collapseLabel_ = collapseLabel;\n        }\n        var label = options.label !== undefined ? options.label : 'i';\n        if (typeof label === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.label_ = document.createElement('span');\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n        }\n        var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n   
      var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(activeLabel);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            (_this.collapsed_ && _this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n            (_this.collapsible_ ? '' : ' ol-uncollapsible');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.ulElement_);\n        element.appendChild(button);\n        /**\n         * A list of currently rendered resolutions.\n         * @type {Array<string>}\n         * @private\n         */\n        _this.renderedAttributions_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisi
 ble_ = true;\n        return _this;\n    }\n    /**\n     * Collect a list of visible attributions and set the collapsible state.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {Array<string>} Attributions.\n     * @private\n     */\n    Attribution.prototype.collectSourceAttributions_ = function (frameState) {\n        /**\n         * Used to determine if an attribution already exists.\n         * @type {!Object<string, boolean>}\n         */\n        var lookup = {};\n        /**\n         * A list of visible attributions.\n         * @type {Array<string>}\n         */\n        var visibleAttributions = [];\n        var layerStatesArray = frameState.layerStatesArray;\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            if (!inView(layerState, frameState.viewState)) {\n                continue;\n            }\n            var source = /** @type {impor
 t(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n            if (!source) {\n                continue;\n            }\n            var attributionGetter = source.getAttributions();\n            if (!attributionGetter) {\n                continue;\n            }\n            var attributions = attributionGetter(frameState);\n            if (!attributions) {\n                continue;\n            }\n            if (!this.overrideCollapsible_ &&\n                source.getAttributionsCollapsible() === false) {\n                this.setCollapsible(false);\n            }\n            if (Array.isArray(attributions)) {\n                for (var j = 0, jj = attributions.length; j < jj; ++j) {\n                    if (!(attributions[j] in lookup)) {\n                        visibleAttributions.push(attributions[j]);\n                        lookup[attributions[j]] = true;\n                    }\n                }\n            }\n            else {\n                if (
 !(attributions in lookup)) {\n                    visibleAttributions.push(attributions);\n                    lookup[attributions] = true;\n                }\n            }\n        }\n        return visibleAttributions;\n    };\n    /**\n     * @private\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    Attribution.prototype.updateElement_ = function (frameState) {\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        var attributions = this.collectSourceAttributions_(frameState);\n        var visible = attributions.length > 0;\n        if (this.renderedVisible_ != visible) {\n            this.element.style.display = visible ? '' : 'none';\n            this.renderedVisible_ = visible;\n        }\n        if (equals(attributions, this.renderedAttributions_)) {\n   
          return;\n        }\n        removeChildren(this.ulElement_);\n        // append the attributions\n        for (var i = 0, ii = attributions.length; i < ii; ++i) {\n            var element = document.createElement('li');\n            element.innerHTML = attributions[i];\n            this.ulElement_.appendChild(element);\n        }\n        this.renderedAttributions_ = attributions;\n    };\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Attribution.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleToggle_();\n    };\n    /**\n     * @private\n     */\n    Attribution.prototype.handleToggle_ = function () {\n        this.element.classList.toggle(CLASS_COLLAPSED);\n        if (this.collapsed_) {\n            replaceNode(this.collapseLabel_, this.label_);\n        }\n        else {\n            replaceNode(this.label_, this.collapseLabel_);\n        }\n        this.collapsed_ = !this.co
 llapsed_;\n    };\n    /**\n     * Return `true` if the attribution is collapsible, `false` otherwise.\n     * @return {boolean} True if the widget is collapsible.\n     * @api\n     */\n    Attribution.prototype.getCollapsible = function () {\n        return this.collapsible_;\n    };\n    /**\n     * Set whether the attribution should be collapsible.\n     * @param {boolean} collapsible True if the widget is collapsible.\n     * @api\n     */\n    Attribution.prototype.setCollapsible = function (collapsible) {\n        if (this.collapsible_ === collapsible) {\n            return;\n        }\n        this.collapsible_ = collapsible;\n        this.element.classList.toggle('ol-uncollapsible');\n        if (!collapsible && this.collapsed_) {\n            this.handleToggle_();\n        }\n    };\n    /**\n     * Collapse or expand the attribution according to the passed parameter. Will\n     * not do anything if the attribution isn't collapsible or if the current\n     * collapsed stat
 e is already the one requested.\n     * @param {boolean} collapsed True if the widget is collapsed.\n     * @api\n     */\n    Attribution.prototype.setCollapsed = function (collapsed) {\n        if (!this.collapsible_ || this.collapsed_ === collapsed) {\n            return;\n        }\n        this.handleToggle_();\n    };\n    /**\n     * Return `true` when the attribution is currently collapsed or `false`\n     * otherwise.\n     * @return {boolean} True if the widget is collapsed.\n     * @api\n     */\n    Attribution.prototype.getCollapsed = function () {\n        return this.collapsed_;\n    };\n    /**\n     * Update the attribution element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    Attribution.prototype.render = function (mapEvent) {\n        this.updateElement_(mapEvent.frameState);\n    };\n    return Attribution;\n}(Control));\nexport default Attribution;\n//# sourceMappingURL=Attribution.js.map","var __extend
 s = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use f
 or the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotatio
 n is 0.\n *\n * @api\n */\nvar Rotate = /** @class */ (function (_super) {\n    __extends(Rotate, _super);\n    /**\n     * @param {Options=} opt_options Rotate options.\n     */\n    function Rotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        var className = options.className !== undefined ? options.className : 'ol-rotate';\n        var label = options.label !== undefined ? options.label : '\\u21E7';\n        /**\n         * @type {HTMLElement}\n         * @private\n         */\n        _this.label_ = null;\n        if (typeof label === 'string') {\n            _this.label_ = document.createElement('span');\n            _this.label_.className = 'ol-compass';\n            _this.label_.textContent = label;\n        }\n        else {\n       
      _this.label_ = label;\n            _this.label_.classList.add('ol-compass');\n        }\n        var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n        var button = document.createElement('button');\n        button.className = className + '-reset';\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(_this.label_);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        _this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n         * @type {boolean}\n         * @pr
 ivate\n         */\n        _this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.rotation_ = undefined;\n        if (_this.autoHide_) {\n            _this.element.classList.add(CLASS_HIDDEN);\n        }\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Rotate.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        if (this.callResetNorth_ !== undefined) {\n            this.callResetNorth_();\n        }\n        else {\n            this.resetNorth_();\n        }\n    };\n    /**\n     * @private\n     */\n    Rotate.prototype.resetNorth_ = function () {\n        var map = this.getMap();\n        var view = map.getView();\n        if (!view) {\n            // the map does not have a view, so we can't act\n            // upon it\n            return;\n        }\n  
       var rotation = view.getRotation();\n        if (rotation !== undefined) {\n            if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n                view.animate({\n                    rotation: 0,\n                    duration: this.duration_,\n                    easing: easeOut,\n                });\n            }\n            else {\n                view.setRotation(0);\n            }\n        }\n    };\n    /**\n     * Update the rotate control element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    Rotate.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            return;\n        }\n        var rotation = frameState.viewState.rotation;\n        if (rotation != this.rotation_) {\n            var transform = 'rotate(' + rotation + 'rad)';\n            if (this.autoHide_) {\n                var contains = this.element.classList.contai
 ns(CLASS_HIDDEN);\n                if (!contains && rotation === 0) {\n                    this.element.classList.add(CLASS_HIDDEN);\n                }\n                else if (contains && rotation !== 0) {\n                    this.element.classList.remove(CLASS_HIDDEN);\n                }\n            }\n            this.label_.style.transform = transform;\n        }\n        this.rotation_ = rotation;\n    };\n    return Rotate;\n}(Control));\nexport default Rotate;\n//# sourceMappingURL=Rotate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d
 ; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Zoom\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='-'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text
  label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /** @class */ (function (_super) {\n    __extends(Zoom, _super);\n    /**\n     * @param {Options=} opt_options Zoom options.\n     */\n    function Zoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        var className = options.className !== undefined ? options.className : 'ol-zoom';\n        
 var delta = options.delta !== undefined ? options.delta : 1;\n        var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n        var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n        var zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n        var zoomOutTipLabel = options.zoomOutTipLabel !== undefined\n            ? options.zoomOutTipLabel\n            : 'Zoom out';\n        var inElement = document.createElement('button');\n        inElement.className = className + '-in';\n        inElement.setAttribute('type', 'button');\n        inElement.title = zoomInTipLabel;\n        inElement.appendChild(typeof zoomInLabel === 'string'\n            ? document.createTextNode(zoomInLabel)\n            : zoomInLabel);\n        inElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, delta), false);\n        var outElement = document.createElement('button');\
 n        outElement.className = className + '-out';\n        outElement.setAttribute('type', 'button');\n        outElement.title = zoomOutTipLabel;\n        outElement.appendChild(typeof zoomOutLabel === 'string'\n            ? document.createTextNode(zoomOutLabel)\n            : zoomOutLabel);\n        outElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, -delta), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(inElement);\n        element.appendChild(outElement);\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * @param {number} delta Zoom delta.\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Zoom.prototype.handleClick
 _ = function (delta, event) {\n        event.preventDefault();\n        this.zoomByDelta_(delta);\n    };\n    /**\n     * @param {number} delta Zoom delta.\n     * @private\n     */\n    Zoom.prototype.zoomByDelta_ = function (delta) {\n        var map = this.getMap();\n        var view = map.getView();\n        if (!view) {\n            // the map does not have a view, so we can't act\n            // upon it\n            return;\n        }\n        var currentZoom = view.getZoom();\n        if (currentZoom !== undefined) {\n            var newZoom = view.getConstrainedZoom(currentZoom + delta);\n            if (this.duration_ > 0) {\n                if (view.getAnimating()) {\n                    view.cancelAnimations();\n                }\n                view.animate({\n                    zoom: newZoom,\n                    duration: this.duration_,\n                    easing: easeOut,\n                });\n            }\n            else {\n                view.setZoom(newZoo
 m);\n            }\n        }\n    };\n    return Zoom;\n}(Control));\nexport default Zoom;\n//# sourceMappingURL=Zoom.js.map","/**\n * @module ol/control\n */\nimport Attribution from './control/Attribution.js';\nimport Collection from './Collection.js';\nimport Rotate from './control/Rotate.js';\nimport Zoom from './control/Zoom.js';\nexport { default as Attribution } from './control/Attribution.js';\nexport { default as Control } from './control/Control.js';\nexport { default as FullScreen } from './control/FullScreen.js';\nexport { default as MousePosition } from './control/MousePosition.js';\nexport { default as OverviewMap } from './control/OverviewMap.js';\nexport { default as Rotate } from './control/Rotate.js';\nexport { default as ScaleLine } from './control/ScaleLine.js';\nexport { default as Zoom } from './control/Zoom.js';\nexport { default as ZoomSlider } from './control/ZoomSlider.js';\nexport { default as ZoomToExtent } from './control/ZoomToExtent.js';\n/**\n * @typ
 edef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./control/Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./control/Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./control/Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link modul
 e:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions=} opt_options\n * Defaults options.\n * @return {Collection<import(\"./control/Control.js\").default>}\n * Controls.\n * @api\n */\nexport function defaults(opt_options) {\n    var options = opt_options ? opt_options : {};\n    var controls = new Collection();\n    var zoomControl = options.zoom !== undefined ? options.zoom : true;\n    if (zoomControl) {\n        controls.push(new Zoom(options.zoomOptions));\n    }\n    var rotateControl = options.rotate !== undefined ? options.rotate : true;\n    if (rotateControl) {\n        controls.push(new Rotate(options.rotateOptions));\n    }\n    var attributionControl = options.attribution !== undefined ? options.attribution : true;\n    if (attributionControl) {\n        controls.push(new Attribution(options.attributionOptions));\n    }\n    return controls;\n}\n//# sourceMappingURL=control.js.map","/**\n * @module ol/interaction/Property\n */\n/**\n * @enum {string}\n 
 */\nexport default {\n    ACTIVE: 'active',\n};\n//# sourceMappingURL=Property.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport InteractionProperty from './Property.js';\nimport { easeOut, linear } from '../easing.js';\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {funct
 ion(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do 
 render\n * vectors and so are visible on the screen.\n * @api\n */\nvar Interaction = /** @class */ (function (_super) {\n    __extends(Interaction, _super);\n    /**\n     * @param {InteractionOptions=} opt_options Options.\n     */\n    function Interaction(opt_options) {\n        var _this = _super.call(this) || this;\n        if (opt_options && opt_options.handleEvent) {\n            _this.handleEvent = opt_options.handleEvent;\n        }\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        _this.setActive(true);\n        return _this;\n    }\n    /**\n     * Return whether the interaction is currently active.\n     * @return {boolean} `true` if the interaction is active, `false` otherwise.\n     * @observable\n     * @api\n     */\n    Interaction.prototype.getActive = function () {\n        return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n    };\n    /**\n     * Get 
 the map associated with this interaction.\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     * @api\n     */\n    Interaction.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event}.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    Interaction.prototype.handleEvent = function (mapBrowserEvent) {\n        return true;\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    Interaction.prototype.setActive = function (active) {\n        this.set(InteractionProperty.ACTIVE, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes 
 to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Interaction.prototype.setMap = function (map) {\n        this.map_ = map;\n    };\n    return Interaction;\n}(BaseObject));\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number=} opt_duration Duration.\n */\nexport function pan(view, delta, opt_duration) {\n    var currentCenter = view.getCenterInternal();\n    if (currentCenter) {\n        var center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n        view.animateInternal({\n            duration: opt_duration !== undefined ? opt_duration : 250,\n            easing: linear,\n            center: view.getConstrainedCenter(center),\n        });\n    }\n}\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate=} o
 pt_anchor Anchor coordinate in the user projection.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n    var currentZoom = view.getZoom();\n    if (currentZoom === undefined) {\n        return;\n    }\n    var newZoom = view.getConstrainedZoom(currentZoom + delta);\n    var newResolution = view.getResolutionForZoom(newZoom);\n    if (view.getAnimating()) {\n        view.cancelAnimations();\n    }\n    view.animate({\n        resolution: newResolution,\n        anchor: opt_anchor,\n        duration: opt_duration !== undefined ? opt_duration : 250,\n        easing: easeOut,\n    });\n}\nexport default Interaction;\n//# sourceMappingURL=Interaction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            funct
 ion (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nvar DoubleClickZoom = /** @class */ (function (_super) {\n    __extends(DoubleClickZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DoubleClickZoom(opt_op
 tions) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.delta_ = options.delta ? options.delta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a\n     * doubleclick) and eventually zooms the map.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    DoubleClickZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n            var browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.origi
 nalEvent);\n            var map = mapBrowserEvent.map;\n            var anchor = mapBrowserEvent.coordinate;\n            var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n            var view = map.getView();\n            zoomByDelta(view, delta, anchor, this.duration_);\n            mapBrowserEvent.preventDefault();\n            stopEvent = true;\n        }\n        return !stopEvent;\n    };\n    return DoubleClickZoom;\n}(Interaction));\nexport default DoubleClickZoom;\n//# sourceMappingURL=DoubleClickZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function 
 __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport { getValues } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false
 ` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n *  Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and 
 `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nvar PointerInteraction = /** @class */ (function (_super) {\n    __extends(PointerInteraction, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function PointerInteraction(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, \n        /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)) || this;\n        if (options.handleDownEvent) {\n            _this.handleDownEvent = options.handleDownEvent;\n        }\n        if (options.handleDragEvent) {\n            _this.handleDragEvent = options.handleDragEv
 ent;\n        }\n        if (options.handleMoveEvent) {\n            _this.handleMoveEvent = options.handleMoveEvent;\n        }\n        if (options.handleUpEvent) {\n            _this.handleUpEvent = options.handleUpEvent;\n        }\n        if (options.stopDown) {\n            _this.stopDown = options.stopDown;\n        }\n        /**\n         * @type {boolean}\n         * @protected\n         */\n        _this.handlingDownUpSequence = false;\n        /**\n         * @type {!Object<string, PointerEvent>}\n         * @private\n         */\n        _this.trackedPointers_ = {};\n        /**\n         * @type {Array<PointerEvent>}\n         * @protected\n         */\n        _this.targetPointers = [];\n        return _this;\n    }\n    /**\n     * Returns the current number of pointers involved in the interaction,\n     * e.g. `2` when two fingers are used.\n     * @return {number} The number of pointers.\n     * @api\n     */\n    PointerInteraction.prototype.getPointerCount = fun
 ction () {\n        return this.targetPointers.length;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     * @protected\n     */\n    PointerInteraction.prototype.handleDownEvent = function (mapBrowserEvent) {\n        return false;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @protected\n     */\n    PointerInteraction.prototype.handleDragEvent = function (mapBrowserEvent) { };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into\n     * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n     * detected.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     *
 /\n    PointerInteraction.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent) {\n            return true;\n        }\n        var stopEvent = false;\n        this.updateTrackedPointers_(mapBrowserEvent);\n        if (this.handlingDownUpSequence) {\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n                this.handleDragEvent(mapBrowserEvent);\n                // prevent page scrolling during dragging\n                mapBrowserEvent.preventDefault();\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n                var handledUp = this.handleUpEvent(mapBrowserEvent);\n                this.handlingDownUpSequence =\n                    handledUp && this.targetPointers.length > 0;\n            }\n        }\n        else {\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n                var handled = this.handleDownEvent(mapBrowserEven
 t);\n                this.handlingDownUpSequence = handled;\n                stopEvent = this.stopDown(handled);\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n                this.handleMoveEvent(mapBrowserEvent);\n            }\n        }\n        return !stopEvent;\n    };\n    /**\n     * Handle pointer move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @protected\n     */\n    PointerInteraction.prototype.handleMoveEvent = function (mapBrowserEvent) { };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     * @protected\n     */\n    PointerInteraction.prototype.handleUpEvent = function (mapBrowserEvent) {\n        return false;\n    };\n    /**\n     * This function is used to determine if \"down\" events should be propagated\n     * to other intera
 ctions or should be stopped.\n     * @param {boolean} handled Was the event handled by the interaction?\n     * @return {boolean} Should the `down` event be stopped?\n     */\n    PointerInteraction.prototype.stopDown = function (handled) {\n        return handled;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @private\n     */\n    PointerInteraction.prototype.updateTrackedPointers_ = function (mapBrowserEvent) {\n        if (isPointerDraggingEvent(mapBrowserEvent)) {\n            var event_1 = mapBrowserEvent.originalEvent;\n            var id = event_1.pointerId.toString();\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n                delete this.trackedPointers_[id];\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n                this.trackedPointers_[id] = event_1;\n            }\n            else if (id in this.trackedPointers_) {\n        
         // update only when there was a pointerdown event for this pointer\n                this.trackedPointers_[id] = event_1;\n            }\n            this.targetPointers = getValues(this.trackedPointers_);\n        }\n    };\n    return PointerInteraction;\n}(Interaction));\n/**\n * @param {Array<PointerEvent>} pointerEvents List of events.\n * @return {import(\"../pixel.js\").Pixel} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n    var length = pointerEvents.length;\n    var clientX = 0;\n    var clientY = 0;\n    for (var i = 0; i < length; i++) {\n        clientX += pointerEvents[i].clientX;\n        clientY += pointerEvents[i].clientY;\n    }\n    return [clientX / length, clientY / length];\n}\n/**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} Whether the event is a pointerdown, pointerdrag\n *     or pointerup event.\n */\nfunction isPointerDraggingEvent(mapBrowserEvent) {\n    var type = mapBrowse
 rEvent.type;\n    return (type === MapBrowserEventType.POINTERDOWN ||\n        type === MapBrowserEventType.POINTERDRAG ||\n        type === MapBrowserEventType.POINTERUP);\n}\nexport default PointerInteraction;\n//# sourceMappingURL=Pointer.js.map","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { MAC, WEBKIT } from '../has.js';\nimport { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nexport function all(var_args) {\n    var conditions = arguments;\n  
   /**\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} All conditions passed.\n     */\n    return function (event) {\n        var pass = true;\n        for (var i = 0, ii = conditions.length; i < ii; ++i) {\n            pass = pass && conditions[i](event);\n            if (!pass) {\n                break;\n            }\n        }\n        return pass;\n    };\n}\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport var altKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        !originalEvent.
 shiftKey);\n};\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport var altShiftKeysOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        originalEvent.shiftKey);\n};\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport var focus = function (eve
 nt) {\n    return event.target.getTargetElement().contains(document.activeElement);\n};\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nexport var focusWithTabindex = function (event) {\n    return event.map.getTargetElement().hasAttribute('tabindex')\n        ? focus(event)\n        : true;\n};\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport var always = TRUE;\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport var click = function (mapBrowserEvent) {\n    ret
 urn mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport var mouseActionButton = function (mapBrowserEvent) {\n    var originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n    return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport var never = FALSE;\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event
 .\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport var pointerMove = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == 'pointermove';\n};\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nexport var singleClick = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport var doubleClick = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n/**\n * Return `true` i
 f no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport var noModifierKeys = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport var platformModifierKeyOnly = function (mapBrowserEvent) {\n 
    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport var shiftKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        originalEvent.shiftKey);\n};\n/**\n * Return `true` if the target element is not editable, i.e. not a `<input>`-,\n * `<select>`- or `<textarea>`-element, `false` otherwise.\n 
 *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport var targetNotEditable = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    var tagName = /** @type {Element} */ (originalEvent.target).tagName;\n    return tagName !== 'INPUT' && tagName !== 'SELECT' && tagName !== 'TEXTAREA';\n};\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport var mouseOnly = function (mapBrowserEvent) {\n    var pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvent !== undefined, 56); // mapBrowserEvent mus
 t originate from a pointer event\n    // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvent.pointerType == 'mouse';\n};\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport var touchOnly = function (mapBrowserEvent) {\n    var pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvt.pointerType === 'touch';\n};\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boo
 lean} True if the event originates from a digital pen.\n * @api\n */\nexport var penOnly = function (mapBrowserEvent) {\n    var pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent)\n        .originalEvent;\n    assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvt.pointerType === 'pen';\n};\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See http://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport var primaryAction = function (mapBrowserEvent) {\n    var pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEv
 ent)\n        .originalEvent;\n    assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n//# sourceMappingURL=condition.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../
 functions.js';\nimport { all, focusWithTabindex, noModifierKeys, primaryAction, } from '../events/condition.js';\nimport { easeOut } from '../easing.js';\nimport { rotate as rotateCoordinate, scale as scaleCoordinate, } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~noModifierKeys} and {@link module:ol/events/condition~primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nvar DragPan
  = /** @class */ (function (_super) {\n    __extends(DragPan, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragPan(opt_options) {\n        var _this = _super.call(this, {\n            stopDown: FALSE,\n        }) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {import(\"../Kinetic.js\").default|undefined}\n         */\n        _this.kinetic_ = options.kinetic;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.lastCentroid = null;\n        /**\n         * @type {number}\n         */\n        _this.lastPointersCount_;\n        /**\n         * @type {boolean}\n         */\n        _this.panning_ = false;\n        var condition = options.condition\n            ? options.condition\n            : all(noModifierKeys, primaryAction);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         
 */\n        _this.condition_ = options.onFocusOnly\n            ? all(focusWithTabindex, condition)\n            : condition;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.noKinetic_ = false;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragPan.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!this.panning_) {\n            this.panning_ = true;\n            this.getMap().getView().beginInteraction();\n        }\n        var targetPointers = this.targetPointers;\n        var centroid = centroidFromPointers(targetPointers);\n        if (targetPointers.length == this.lastPointersCount_) {\n            if (this.kinetic_) {\n                this.kinetic_.update(centroid[0], centroid[1]);\n            }\n            if (this.lastCentroid) {\n                var delta = [\n                    this.last
 Centroid[0] - centroid[0],\n                    centroid[1] - this.lastCentroid[1],\n                ];\n                var map = mapBrowserEvent.map;\n                var view = map.getView();\n                scaleCoordinate(delta, view.getResolution());\n                rotateCoordinate(delta, view.getRotation());\n                view.adjustCenterInternal(delta);\n            }\n        }\n        else if (this.kinetic_) {\n            // reset so we don't overestimate the kinetic energy after\n            // after one finger down, tiny drag, second finger down\n            this.kinetic_.begin();\n        }\n        this.lastCentroid = centroid;\n        this.lastPointersCount_ = targetPointers.length;\n        mapBrowserEvent.originalEvent.preventDefault();\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragPan.prototype.handl
 eUpEvent = function (mapBrowserEvent) {\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (this.targetPointers.length === 0) {\n            if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n                var distance = this.kinetic_.getDistance();\n                var angle = this.kinetic_.getAngle();\n                var center = view.getCenterInternal();\n                var centerpx = map.getPixelFromCoordinateInternal(center);\n                var dest = map.getCoordinateFromPixelInternal([\n                    centerpx[0] - distance * Math.cos(angle),\n                    centerpx[1] - distance * Math.sin(angle),\n                ]);\n                view.animateInternal({\n                    center: view.getConstrainedCenter(dest),\n                    duration: 500,\n                    easing: easeOut,\n                });\n            }\n            if (this.panning_) {\n                this.panning_ = false;\n         
        view.endInteraction();\n            }\n            return false;\n        }\n        else {\n            if (this.kinetic_) {\n                // reset so we don't overestimate the kinetic energy after\n                // after one finger up, tiny drag, second finger up\n                this.kinetic_.begin();\n            }\n            this.lastCentroid = null;\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragPan.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            this.lastCentroid = null;\n            // stop any current animation\n            if (view.getAnimating()) {\n                view.cancelAnima
 tions();\n            }\n            if (this.kinetic_) {\n                this.kinetic_.begin();\n            }\n            // No kinetic as soon as more than one pointer on the screen is\n            // detected. This is to prevent nasty pans after pinch.\n            this.noKinetic_ = this.targetPointers.length > 1;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragPan;\n}(PointerInteraction));\nexport default DragPan;\n//# sourceMappingURL=DragPan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { th
 is.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { altShiftKeysOnly, mouseActionButton, mouseOnly, } from '../events/condition.js';\nimport { disable } from '../rotationconstraint.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n
  * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nvar DragRotate = /** @class */ (function (_super) {\n    __extends(DragRotate, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragRotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            stopDown: FALSE,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n  
   }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragRotate.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (view.getConstraints().rotation === disable) {\n            return;\n        }\n        var size = map.getSize();\n        var offset = mapBrowserEvent.pixel;\n        var theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n        if (this.lastAngle_ !== undefined) {\n            var delta = theta - this.lastAngle_;\n            view.adjustRotationInternal(-delta);\n        }\n        this.lastAngle_ = theta;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n 
     */\n    DragRotate.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        view.endInteraction(this.duration_);\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotate.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return false;\n        }\n        if (mouseActionButton(mapBrowserEvent) &&\n            this.condition_(mapBrowserEvent)) {\n            var map = mapBrowserEvent.map;\n            map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    retur
 n DragRotate;\n}(PointerInteraction));\nexport default DragRotate;\n//# sourceMappingURL=DragRotate.js.map","/**\n * @module ol/render/Box\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\nvar RenderBox = /** @class */ (function (_super) {\n    __extends(RenderBox, _super);\n    /**\n     * @param {string} className CSS class name.\n     */\n    functio
 n RenderBox(className) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../geom/Polygon.js\").default}\n         * @private\n         */\n        _this.geometry_ = null;\n        /**\n         * @type {HTMLDivElement}\n         * @private\n         */\n        _this.element_ = document.createElement('div');\n        _this.element_.style.position = 'absolute';\n        _this.element_.style.pointerEvents = 'auto';\n        _this.element_.className = 'ol-box ' + className;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        /**\n         * @private\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.startPixel_ = null;\n        /**\n         * @private\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.endPixel_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    RenderBox.pro
 totype.disposeInternal = function () {\n        this.setMap(null);\n    };\n    /**\n     * @private\n     */\n    RenderBox.prototype.render_ = function () {\n        var startPixel = this.startPixel_;\n        var endPixel = this.endPixel_;\n        var px = 'px';\n        var style = this.element_.style;\n        style.left = Math.min(startPixel[0], endPixel[0]) + px;\n        style.top = Math.min(startPixel[1], endPixel[1]) + px;\n        style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n        style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    RenderBox.prototype.setMap = function (map) {\n        if (this.map_) {\n            this.map_.getOverlayContainer().removeChild(this.element_);\n            var style = this.element_.style;\n            style.left = 'inherit';\n            style.top = 'inherit';\n            style.width = 'inherit';\n            style.height 
 = 'inherit';\n        }\n        this.map_ = map;\n        if (this.map_) {\n            this.map_.getOverlayContainer().appendChild(this.element_);\n        }\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n     * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n     */\n    RenderBox.prototype.setPixels = function (startPixel, endPixel) {\n        this.startPixel_ = startPixel;\n        this.endPixel_ = endPixel;\n        this.createOrUpdateGeometry();\n        this.render_();\n    };\n    /**\n     * Creates or updates the cached geometry.\n     */\n    RenderBox.prototype.createOrUpdateGeometry = function () {\n        var startPixel = this.startPixel_;\n        var endPixel = this.endPixel_;\n        var pixels = [\n            startPixel,\n            [startPixel[0], endPixel[1]],\n            endPixel,\n            [endPixel[0], startPixel[1]],\n        ];\n        var coordinates = pixels.map(this.map_.getCoordinateFromPixe
 lInternal, this.map_);\n        // close the polygon\n        coordinates[4] = coordinates[0].slice();\n        if (!this.geometry_) {\n            this.geometry_ = new Polygon([coordinates]);\n        }\n        else {\n            this.geometry_.setCoordinates([coordinates]);\n        }\n    };\n    /**\n     * @return {import(\"../geom/Polygon.js\").default} Geometry.\n     */\n    RenderBox.prototype.getGeometry = function () {\n        return this.geometry_;\n    };\n    return RenderBox;\n}(Disposable));\nexport default RenderBox;\n//# sourceMappingURL=Box.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        e
 xtendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\nimport { mouseActionButton } from '../events/condition.js';\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A functio
 n that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n/**\n * @enum {string}\n */\nvar DragBoxEventType = {\n    /**\n     * Triggered upon drag box start.\n     * @event DragBoxEvent#boxstart\n     * @api\n     */\n    BOXSTART: 'boxstart',\n    /**\n
      * Triggered on drag when box is active.\n     * @event DragBoxEvent#boxdrag\n     * @api\n     */\n    BOXDRAG: 'boxdrag',\n    /**\n     * Triggered upon drag box end.\n     * @event DragBoxEvent#boxend\n     * @api\n     */\n    BOXEND: 'boxend',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nvar DragBoxEvent = /** @class */ (function (_super) {\n    __extends(DragBoxEvent, _super);\n    /**\n     * @param {string} type The event type.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n     */\n    function DragBoxEvent(type, coordinate, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The coordinate of the drag event.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n       
   * @api\n         */\n        _this.coordinate = coordinate;\n        /**\n         * @const\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return DragBoxEvent;\n}(Event));\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nvar DragBox = /** @class */ (function (_super) {\n    __extends(DragBox, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragBox(opt_options) {\n        var _this = _super.call(this) || this;\n  
       var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../render/Box.js\").default}\n         * @private\n         */\n        _this.box_ = new RenderBox(options.className || 'ol-dragbox');\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n        if (options.onBoxEnd) {\n            _this.onBoxEnd = options.onBoxEnd;\n        }\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.startPixel_ = null;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : mouseActionButton;\n        /**\n         * @private\n         * @type {EndCondition}\n         */\n        _this.boxEndCondition_ = options.boxEndCondition\n            ? options.boxEndCondition\n            : 
 _this.defaultBoxEndCondition;\n        return _this;\n    }\n    /**\n     * The default condition for determining whether the boxend event\n     * should fire.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n     *     leading to the box end.\n     * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n     * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n     * @return {boolean} Whether or not the boxend condition should be fired.\n     */\n    DragBox.prototype.defaultBoxEndCondition = function (mapBrowserEvent, startPixel, endPixel) {\n        var width = endPixel[0] - startPixel[0];\n        var height = endPixel[1] - startPixel[1];\n        return width * width + height * height >= this.minArea_;\n    };\n    /**\n     * Returns geometry of last drawn box.\n     * @return {import(\"../geom/Polygon.js\").default} Geometry.\n     * @api\n     */\n    DragBox.proto
 type.getGeometry = function () {\n        return this.box_.getGeometry();\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragBox.prototype.handleDragEvent = function (mapBrowserEvent) {\n        this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n        this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG, mapBrowserEvent.coordinate, mapBrowserEvent));\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragBox.prototype.handleUpEvent = function (mapBrowserEvent) {\n        this.box_.setMap(null);\n        if (this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel)) {\n            this.onBoxEnd(mapBrowserEvent);\n            this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXEND, mapBrowse
 rEvent.coordinate, mapBrowserEvent));\n        }\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragBox.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.condition_(mapBrowserEvent)) {\n            this.startPixel_ = mapBrowserEvent.pixel;\n            this.box_.setMap(mapBrowserEvent.map);\n            this.box_.setPixels(this.startPixel_, this.startPixel_);\n            this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART, mapBrowserEvent.coordinate, mapBrowserEvent));\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    /**\n     * Function to execute just before `onboxend` is fired\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    DragBox.prototype.onBoxEnd = function (event) { };\n   
  return DragBox;\n}(PointerInteraction));\nexport default DragBox;\n//# sourceMappingURL=DragBox.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport { createOrUpdateFromCoordinates, getBottomLeft, getCenter, getTopRight, scaleFromCenter, } from '../extent.js';\nimport { easeOut } from '../easing.js';\nimport { shiftKeyOnly } from '../events/conditio
 n.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the
  `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nvar DragZoom = /** @class */ (function (_super) {\n    __extends(DragZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var condition = options.condition ? options.condition : shiftKeyOnly;\n        _this = _super.call(this, {\n            condition: condition,\n            className: options.className || 'ol-dragzoom',\n            minArea: options.minArea,\n        }) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 200;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.out_ = options.out !== undefined ? options.out : false;\n        return _this;\n    }\n    /**\n     * Function to e
 xecute just before `onboxend` is fired\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    DragZoom.prototype.onBoxEnd = function (event) {\n        var map = this.getMap();\n        var view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n        var size = /** @type {!import(\"../size.js\").Size} */ (map.getSize());\n        var extent = this.getGeometry().getExtent();\n        if (this.out_) {\n            var mapExtent = view.calculateExtentInternal(size);\n            var boxPixelExtent = createOrUpdateFromCoordinates([\n                map.getPixelFromCoordinateInternal(getBottomLeft(extent)),\n                map.getPixelFromCoordinateInternal(getTopRight(extent)),\n            ]);\n            var factor = view.getResolutionForExtentInternal(boxPixelExtent, size);\n            scaleFromCenter(mapExtent, 1 / factor);\n            extent = mapExtent;\n        }\n        var resolution = view.getConstrainedResolution(view.get
 ResolutionForExtentInternal(extent, size));\n        var center = view.getConstrainedCenter(getCenter(extent), resolution);\n        view.animateInternal({\n            resolution: resolution,\n            center: center,\n            duration: this.duration_,\n            easing: easeOut,\n        });\n    };\n    return DragZoom;\n}(DragBox));\nexport default DragZoom;\n//# sourceMappingURL=DragZoom.js.map","/**\n * @module ol/events/KeyCode\n */\n/**\n * @enum {number}\n * @const\n */\nexport default {\n    LEFT: 37,\n    UP: 38,\n    RIGHT: 39,\n    DOWN: 40,\n};\n//# sourceMappingURL=KeyCode.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    
 return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/KeyboardPan\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { pan } from './Interaction.js';\nimport KeyCode from '../events/KeyCode.js';\nimport { noModifierKeys, targetNotEditable } from '../events/condition.js';\nimport { rotate as rotateCoordinate } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~noModifierKeys} and\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [duration=100] Animation duratio
 n in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nvar KeyboardPan = /** @class */ (function (_super) {\n    __extends(KeyboardPan, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function KeyboardPan(opt_options) {\n        var _this = _super.call(this) || this;\n        
 var options = opt_options || {};\n        /**\n         * @private\n         * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n         * @return {boolean} Combined condition result.\n         */\n        _this.defaultCondition_ = function (mapBrowserEvent) {\n            return (noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent));\n        };\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ =\n            options.condition !== undefined\n                ? options.condition\n                : _this.defaultCondition_;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 100;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelDelta_ =\n            options.pixelDelta !== undefined ? options.pixelDelta : 1
 28;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n     * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n     * pressed).\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {KeyboardPan}\n     */\n    KeyboardPan.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == EventType.KEYDOWN) {\n            var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n            var keyCode = keyEvent.keyCode;\n            if (this.condition_(mapBrowserEvent) &&\n                (keyCode == KeyCode.DOWN ||\n                    keyCode == KeyCode.LEFT ||\n                    keyCode == KeyCode.RIGHT ||\n                    keyCode == KeyCode.UP)) {\n                var map = mapBrowserEvent.map
 ;\n                var view = map.getView();\n                var mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n                var deltaX = 0, deltaY = 0;\n                if (keyCode == KeyCode.DOWN) {\n                    deltaY = -mapUnitsDelta;\n                }\n                else if (keyCode == KeyCode.LEFT) {\n                    deltaX = -mapUnitsDelta;\n                }\n                else if (keyCode == KeyCode.RIGHT) {\n                    deltaX = mapUnitsDelta;\n                }\n                else {\n                    deltaY = mapUnitsDelta;\n                }\n                var delta = [deltaX, deltaY];\n                rotateCoordinate(delta, view.getRotation());\n                pan(view, delta, this.duration_);\n                mapBrowserEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    };\n    return KeyboardPan;\n}(Interaction));\nexport default KeyboardPan;\n//# sourceM
 appingURL=KeyboardPan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport { targetNotEditable } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/con
 dition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nvar KeyboardZoom = /** @class 
 */ (function (_super) {\n    __extends(KeyboardZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function KeyboardZoom(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : targetNotEditable;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.delta_ = options.delta ? options.delta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 100;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n     * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n     * key pressed was '+' 
 or '-').\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {KeyboardZoom}\n     */\n    KeyboardZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == EventType.KEYDOWN ||\n            mapBrowserEvent.type == EventType.KEYPRESS) {\n            var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n            var charCode = keyEvent.charCode;\n            if (this.condition_(mapBrowserEvent) &&\n                (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {\n                var map = mapBrowserEvent.map;\n                var delta = charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;\n                var view = map.getView();\n                zoomByDelta(view, delta, undefined, this.duration_);\n                mapBrowserEvent.preventDefault();
 \n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    };\n    return KeyboardZoom;\n}(Interaction));\nexport default KeyboardZoom;\n//# sourceMappingURL=KeyboardZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport { DEVICE_PIX
 EL_RATIO, FIREFOX } from '../has.js';\nimport { all, always, focusWithTabindex } from '../events/condition.js';\nimport { clamp } from '../math.js';\n/**\n * @enum {string}\n */\nexport var Mode = {\n    TRACKPAD: 'trackpad',\n    WHEEL: 'wheel',\n};\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=t
 rue] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nvar MouseWheelZoom = /** @class */ (function (_super) {\n    __extends(MouseWheelZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function MouseWheelZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, \n        /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)) || this;\n        /**\n         * @private\n         * @type {number}\n        
  */\n        _this.totalDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.useAnchor_ =\n            options.useAnchor !== undefined ? options.useAnchor : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.constrainResolution_ =\n            options.constrainResolution !== undefined\n                ? options.constrainResoluti
 on\n                : false;\n        var condition = options.condition ? options.condition : always;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.onFocusOnly\n            ? all(focusWithTabindex, condition)\n            : condition;\n        /**\n         * @private\n         * @type {?import(\"../coordinate.js\").Coordinate}\n         */\n        _this.lastAnchor_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.startTime_ = undefined;\n        /**\n         * @private\n         * @type {?}\n         */\n        _this.timeoutId_;\n        /**\n         * @private\n         * @type {Mode|undefined}\n         */\n        _this.mode_ = undefined;\n        /**\n         * Trackpad events separated by this delay will be considered separate\n         * interactions.\n         * @type {number}\n         */\n        _this.trackpad
 EventGap_ = 400;\n        /**\n         * @type {?}\n         */\n        _this.trackpadTimeoutId_;\n        /**\n         * The number of delta values per zoom level\n         * @private\n         * @type {number}\n         */\n        _this.deltaPerZoom_ = 300;\n        return _this;\n    }\n    /**\n     * @private\n     */\n    MouseWheelZoom.prototype.endInteraction_ = function () {\n        this.trackpadTimeoutId_ = undefined;\n        var view = this.getMap().getView();\n        view.endInteraction(undefined, this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0, this.lastAnchor_);\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n     * zooms the map.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    MouseWheelZoom.prototype.handleEvent = function (mapBrowserEvent) {\n      
   if (!this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        var type = mapBrowserEvent.type;\n        if (type !== EventType.WHEEL) {\n            return true;\n        }\n        mapBrowserEvent.preventDefault();\n        var map = mapBrowserEvent.map;\n        var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\n        if (this.useAnchor_) {\n            this.lastAnchor_ = mapBrowserEvent.coordinate;\n        }\n        // Delta normalisation inspired by\n        // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n        var delta;\n        if (mapBrowserEvent.type == EventType.WHEEL) {\n            delta = wheelEvent.deltaY;\n            if (FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n                delta /= DEVICE_PIXEL_RATIO;\n            }\n            if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n                delta *= 40;\n            }\n        }\n 
        if (delta === 0) {\n            return false;\n        }\n        else {\n            this.lastDelta_ = delta;\n        }\n        var now = Date.now();\n        if (this.startTime_ === undefined) {\n            this.startTime_ = now;\n        }\n        if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n            this.mode_ = Math.abs(delta) < 4 ? Mode.TRACKPAD : Mode.WHEEL;\n        }\n        var view = map.getView();\n        if (this.mode_ === Mode.TRACKPAD &&\n            !(view.getConstrainResolution() || this.constrainResolution_)) {\n            if (this.trackpadTimeoutId_) {\n                clearTimeout(this.trackpadTimeoutId_);\n            }\n            else {\n                if (view.getAnimating()) {\n                    view.cancelAnimations();\n                }\n                view.beginInteraction();\n            }\n            this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_);\n            view.adj
 ustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n            this.startTime_ = now;\n            return false;\n        }\n        this.totalDelta_ += delta;\n        var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n        clearTimeout(this.timeoutId_);\n        this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n        return false;\n    };\n    /**\n     * @private\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    MouseWheelZoom.prototype.handleWheelZoom_ = function (map) {\n        var view = map.getView();\n        if (view.getAnimating()) {\n            view.cancelAnimations();\n        }\n        var delta = -clamp(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_;\n        if (view.getConstrainResolution() || this.constrainResolution_) {\n            // view has a zoom constraint, zoom by 1\n            delta = delta ? (delta 
 > 0 ? 1 : -1) : 0;\n        }\n        zoomByDelta(view, delta, this.lastAnchor_, this.duration_);\n        this.mode_ = undefined;\n        this.totalDelta_ = 0;\n        this.lastAnchor_ = null;\n        this.startTime_ = undefined;\n        this.timeoutId_ = undefined;\n    };\n    /**\n     * Enable or disable using the mouse's location as an anchor when zooming\n     * @param {boolean} useAnchor true to zoom to the mouse's location, false\n     * to zoom to the center of the map\n     * @api\n     */\n    MouseWheelZoom.prototype.setMouseAnchor = function (useAnchor) {\n        this.useAnchor_ = useAnchor;\n        if (!useAnchor) {\n            this.lastAnchor_ = null;\n        }\n    };\n    return MouseWheelZoom;\n}(Interaction));\nexport default MouseWheelZoom;\n//# sourceMappingURL=MouseWheelZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __
 proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/PinchRotate\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { disable } from '../rotationconstraint.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\
 nvar PinchRotate = /** @class */ (function (_super) {\n    __extends(PinchRotate, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function PinchRotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.rotating_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.rotationDelt
 a_ = 0.0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    PinchRotate.prototype.handleDragEvent = function (mapBrowserEvent) {\n        var rotationDelta = 0.0;\n        var touch0 = this.targetPointers[0];\n        var touch1 = this.targetPointers[1];\n        // angle between touches\n        var angle = Math.atan2(touch1.clientY - touch0.clientY, touch1.clientX - touch0.clientX);\n        if (this.lastAngle_ !== undefined) {\n            var delta = angle - this.lastAngle_;\n            this.rotationDelta_ += delta;\n            if (!this.rotatin
 g_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n                this.rotating_ = true;\n            }\n            rotationDelta = delta;\n        }\n        this.lastAngle_ = angle;\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (view.getConstraints().rotation === disable) {\n            return;\n        }\n        // rotate anchor point.\n        // FIXME: should be the intersection point between the lines:\n        //     touch0,touch1 and previousTouch0,previousTouch1\n        var viewportPosition = map.getViewport().getBoundingClientRect();\n        var centroid = centroidFromPointers(this.targetPointers);\n        centroid[0] -= viewportPosition.left;\n        centroid[1] -= viewportPosition.top;\n        this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n        // rotate\n        if (this.rotating_) {\n            map.render();\n            view.adjustRotationInternal(rotationDelta, this.anchor_);\n        }\n    }
 ;\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchRotate.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length < 2) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            view.endInteraction(this.duration_);\n            return false;\n        }\n        else {\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchRotate.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length >= 2) {\n            var map = mapBrowserEvent.map;\n            this.anchor_ = null;\n            this.lastAngle_ = undefined;\n            this.rotating
 _ = false;\n            this.rotationDelta_ = 0.0;\n            if (!this.handlingDownUpSequence) {\n                map.getView().beginInteraction();\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return PinchRotate;\n}(PointerInteraction));\nexport default PinchRotate;\n//# sourceMappingURL=PinchRotate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @mo
 dule ol/interaction/PinchZoom\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchZoom = /** @class */ (function (_super) {\n    __extends(PinchZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function PinchZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.j
 s\").Coordinate}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 400;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastDistance_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastScaleDelta_ = 1;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    PinchZoom.prototype.handleDragEvent = function (mapBrowserEvent) {\n        var scaleDelta = 1.0;\n        var touch0 = this.targetPointers[0];\n        var touch1 = this.targetPointers[1];\n        var dx = touch0.clientX - touch1.clientX;\n        var dy = touch0.clientY - touch1.clientY;\n        // distance between touches\n        var distance = Math.sqrt(dx * dx 
 + dy * dy);\n        if (this.lastDistance_ !== undefined) {\n            scaleDelta = this.lastDistance_ / distance;\n        }\n        this.lastDistance_ = distance;\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (scaleDelta != 1.0) {\n            this.lastScaleDelta_ = scaleDelta;\n        }\n        // scale anchor point.\n        var viewportPosition = map.getViewport().getBoundingClientRect();\n        var centroid = centroidFromPointers(this.targetPointers);\n        centroid[0] -= viewportPosition.left;\n        centroid[1] -= viewportPosition.top;\n        this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n        // scale, bypass the resolution constraint\n        map.render();\n        view.adjustResolutionInternal(scaleDelta, this.anchor_);\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consum
 ed.\n     */\n    PinchZoom.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length < 2) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            var direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n            view.endInteraction(this.duration_, direction);\n            return false;\n        }\n        else {\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchZoom.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length >= 2) {\n            var map = mapBrowserEvent.map;\n            this.anchor_ = null;\n            this.lastDistance_ = undefined;\n            this.lastScaleDelta_ = 1;\n            if (!this.handlingDownUpSequence) {\n                map.getView().beginInte
 raction();\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return PinchZoom;\n}(PointerInteraction));\nexport default PinchZoom;\n//# sourceMappingURL=PinchZoom.js.map","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport DoubleClickZoom from './interaction/DoubleClickZoom.js';\nimport DragPan from './interaction/DragPan.js';\nimport DragRotate from './interaction/DragRotate.js';\nimport DragZoom from './interaction/DragZoom.js';\nimport KeyboardPan from './interaction/KeyboardPan.js';\nimport KeyboardZoom from './interaction/KeyboardZoom.js';\nimport Kinetic from './Kinetic.js';\nimport MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\nexport { default as DoubleClickZoom } from './interaction/DoubleClickZoom.js';\nexport { default as DragAndDrop } from './interact
 ion/DragAndDrop.js';\nexport { default as DragBox } from './interaction/DragBox.js';\nexport { default as DragPan } from './interaction/DragPan.js';\nexport { default as DragRotate } from './interaction/DragRotate.js';\nexport { default as DragRotateAndZoom } from './interaction/DragRotateAndZoom.js';\nexport { default as DragZoom } from './interaction/DragZoom.js';\nexport { default as Draw } from './interaction/Draw.js';\nexport { default as Extent } from './interaction/Extent.js';\nexport { default as Interaction } from './interaction/Interaction.js';\nexport { default as KeyboardPan } from './interaction/KeyboardPan.js';\nexport { default as KeyboardZoom } from './interaction/KeyboardZoom.js';\nexport { default as Modify } from './interaction/Modify.js';\nexport { default as MouseWheelZoom } from './interaction/MouseWheelZoom.js';\nexport { default as PinchRotate } from './interaction/PinchRotate.js';\nexport { default as PinchZoom } from './interaction/PinchZoom.js';\nexport { 
 default as Pointer } from './interaction/Pointer.js';\nexport { default as Select } from './interaction/Select.js';\nexport { default as Snap } from './interaction/Snap.js';\nexport { default as Translate } from './interaction/Translate.js';\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=tr
 ue] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed.  If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction} instances and insert\n * them into a {@link module:ol/Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default s
 et of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions=} opt_options Defaults options.\n * @return {import(\"./Collection.js\").default<import(\"./interaction/Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(opt_options) {\n    var options = opt_options ? opt_options : {};\n    var interactions = new Collec
 tion();\n    var kinetic = new Kinetic(-0.005, 0.05, 100);\n    var altShiftDragRotate = options.altShiftDragRotate !== undefined\n        ? options.altShiftDragRotate\n        : true;\n    if (altShiftDragRotate) {\n        interactions.push(new DragRotate());\n    }\n    var doubleClickZoom = options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n    if (doubleClickZoom) {\n        interactions.push(new DoubleClickZoom({\n            delta: options.zoomDelta,\n            duration: options.zoomDuration,\n        }));\n    }\n    var dragPan = options.dragPan !== undefined ? options.dragPan : true;\n    if (dragPan) {\n        interactions.push(new DragPan({\n            onFocusOnly: options.onFocusOnly,\n            kinetic: kinetic,\n        }));\n    }\n    var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate : true;\n    if (pinchRotate) {\n        interactions.push(new PinchRotate());\n    }\n    var pinchZoom = options.pinchZoom !== unde
 fined ? options.pinchZoom : true;\n    if (pinchZoom) {\n        interactions.push(new PinchZoom({\n            duration: options.zoomDuration,\n        }));\n    }\n    var keyboard = options.keyboard !== undefined ? options.keyboard : true;\n    if (keyboard) {\n        interactions.push(new KeyboardPan());\n        interactions.push(new KeyboardZoom({\n            delta: options.zoomDelta,\n            duration: options.zoomDuration,\n        }));\n    }\n    var mouseWheelZoom = options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n    if (mouseWheelZoom) {\n        interactions.push(new MouseWheelZoom({\n            onFocusOnly: options.onFocusOnly,\n            duration: options.zoomDuration,\n        }));\n    }\n    var shiftDragZoom = options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n    if (shiftDragZoom) {\n        interactions.push(new DragZoom({\n            duration: options.zoomDuration,\n        }));\n    }\n    return interactions
 ;\n}\n//# sourceMappingURL=interaction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Map\n */\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport PluggableMap from './PluggableMap.js';\nimport { assign } from './obj.js';\nimport { defaults as defaultControls } from './control.js';\nimport { defaults as defaultInteractions } from './interaction.js';\n/**\n * @classdesc\n * The map is the core comp
 onent of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n *     import Map from 'ol/Map';\n *     import View from 'ol/View';\n *     import TileLayer from 'ol/layer/Tile';\n *     import OSM from 'ol/source/OSM';\n *\n *     var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new TileLayer({\n *           source: new OSM()\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some
  overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group}\n * is a subclass of {@link module:ol/layer/Base}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @api\n */\nvar Map = /** @class */ (function (_super) {\n    __extends(Map, _super);\n    /**\n     
 * @param {import(\"./PluggableMap.js\").MapOptions} options Map options.\n     */\n    function Map(options) {\n        var _this = this;\n        options = assign({}, options);\n        if (!options.controls) {\n            options.controls = defaultControls();\n        }\n        if (!options.interactions) {\n            options.interactions = defaultInteractions({\n                onFocusOnly: true,\n            });\n        }\n        _this = _super.call(this, options) || this;\n        return _this;\n    }\n    Map.prototype.createRenderer = function () {\n        return new CompositeMapRenderer(this);\n    };\n    return Map;\n}(PluggableMap));\nexport default Map;\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/OverlayPositioning\n */\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`,  `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexport default {\n    BOTT
 OM_LEFT: 'bottom-left',\n    BOTTOM_CENTER: 'bottom-center',\n    BOTTOM_RIGHT: 'bottom-right',\n    CENTER_LEFT: 'center-left',\n    CENTER_CENTER: 'center-center',\n    CENTER_RIGHT: 'center-right',\n    TOP_LEFT: 'top-left',\n    TOP_CENTER: 'top-center',\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=OverlayPositioning.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Overlay\n */\nimport BaseObject, { ge
 tChangeEventType } from './Object.js';\nimport MapEventType from './MapEventType.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport { CLASS_SELECTABLE } from './css.js';\nimport { containsExtent } from './extent.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { outerHeight, outerWidth, removeChildren, removeNode } from './dom.js';\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The ove
 rlay position\n * in map projection.\n * @property {import(\"./OverlayPositioning.js\").default} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * pro
 bably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport?\n * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be\n * used to determine the panning parameters; if an object is supplied then other\n * parameters are ignored.\n * @property {PanOptions} [autoPanAnimation] The animation options used to pan\n * the overlay into view. This animation is only used when `autoPan` is enabled.\n * A `duration` and `easing` may be provided to customize the animation.\n * Deprecated and ignored if `autoPan` is supplied as an object.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning. Deprecated and ignored\n * if `autoPan` is supplied as an object.\n * @property {PanIntoViewOptions} [autoPanOptions]
  The options to use for the\n * autoPan. This is only used when `autoPan` is enabled and has preference over\n * the individual `autoPanMargin` and `autoPanOptions`.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing~inAndOut}.\n */\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n    ELEMENT: 'element',\n    MAP: 'map',\n    OFFSET: 'offset',\n    POSITION: 'p
 osition',\n    POSITIONING: 'positioning',\n};\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location.  Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n *     import Overlay from 'ol/Overlay';\n *\n *     var popup = new Overlay({\n *       element: document.getElementById('popup')\n *     });\n *     popup.setPosition(coordinate);\n *     map.addOverlay(popup);\n *\n * @api\n */\nvar Overlay = /** @class */ (function (_super) {\n    __extends(Overlay, _super);\n    /**\n     * @param {Options} options Overlay options.\n     */\n    function Overlay(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {Options}\n         */\n        _this.options 
 = options;\n        /**\n         * @protected\n         * @type {number|string|undefined}\n         */\n        _this.id = options.id;\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        _this.insertFirst =\n            options.insertFirst !== undefined ? options.insertFirst : true;\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        _this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.element = document.createElement('div');\n        _this.element.className =\n            options.className !== undefined\n                ? options.className\n                : 'ol-overlay-container ' + CLASS_SELECTABLE;\n        _this.element.style.position = 'absolute';\n        _this.element.style.pointerEvents = 'auto';\n        var autoPan = options.autoPan;\n        if (autoPan && 'object' !== typeof autoPan)
  {\n            autoPan = {\n                animation: options.autoPanAnimation,\n                margin: options.autoPanMargin,\n            };\n        }\n        /**\n         * @protected\n         * @type {PanIntoViewOptions|false}\n         */\n        _this.autoPan = /** @type {PanIntoViewOptions} */ (autoPan) || false;\n        /**\n         * @protected\n         * @type {{transform_: string,\n         *         visible: boolean}}\n         */\n        _this.rendered = {\n            transform_: '',\n            visible: true,\n        };\n        /**\n         * @protected\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.mapPostrenderListenerKey = null;\n        _this.addEventListener(getChangeEventType(Property.ELEMENT), _this.handleElementChanged);\n        _this.addEventListener(getChangeEventType(Property.MAP), _this.handleMapChanged);\n        _this.addEventListener(getChangeEventType(Property.OFFSET), _this.handleOffsetChanged);\n  
       _this.addEventListener(getChangeEventType(Property.POSITION), _this.handlePositionChanged);\n        _this.addEventListener(getChangeEventType(Property.POSITIONING), _this.handlePositioningChanged);\n        if (options.element !== undefined) {\n            _this.setElement(options.element);\n        }\n        _this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n        _this.setPositioning(options.positioning !== undefined\n            ? /** @type {import(\"./OverlayPositioning.js\").default} */ (options.positioning)\n            : OverlayPositioning.TOP_LEFT);\n        if (options.position !== undefined) {\n            _this.setPosition(options.position);\n        }\n        return _this;\n    }\n    /**\n     * Get the DOM element of this overlay.\n     * @return {HTMLElement|undefined} The Element containing the overlay.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getElement = function () {\n        return /** @type {HTMLElement|u
 ndefined} */ (this.get(Property.ELEMENT));\n    };\n    /**\n     * Get the overlay identifier which is set on constructor.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    Overlay.prototype.getId = function () {\n        return this.id;\n    };\n    /**\n     * Get the map associated with this overlay.\n     * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n     * overlay is part of.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getMap = function () {\n        return /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(Property.MAP));\n    };\n    /**\n     * Get the offset of this overlay.\n     * @return {Array<number>} The offset.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getOffset = function () {\n        return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n    };\n    /**\n     * Get the current position of this overlay.\n     * @return {import(\"./coo
 rdinate.js\").Coordinate|undefined} The spatial point that the overlay is\n     *     anchored at.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getPosition = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n    };\n    /**\n     * Get the current positioning of this overlay.\n     * @return {import(\"./OverlayPositioning.js\").default} How the overlay is positioned\n     *     relative to its point on the map.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getPositioning = function () {\n        return /** @type {import(\"./OverlayPositioning.js\").default} */ (this.get(Property.POSITIONING));\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleElementChanged = function () {\n        removeChildren(this.element);\n        var element = this.getElement();\n        if (element) {\n            this.element.appendChild(element);\n        }\n    };\n   
  /**\n     * @protected\n     */\n    Overlay.prototype.handleMapChanged = function () {\n        if (this.mapPostrenderListenerKey) {\n            removeNode(this.element);\n            unlistenByKey(this.mapPostrenderListenerKey);\n            this.mapPostrenderListenerKey = null;\n        }\n        var map = this.getMap();\n        if (map) {\n            this.mapPostrenderListenerKey = listen(map, MapEventType.POSTRENDER, this.render, this);\n            this.updatePixelPosition();\n            var container = this.stopEvent\n                ? map.getOverlayContainerStopEvent()\n                : map.getOverlayContainer();\n            if (this.insertFirst) {\n                container.insertBefore(this.element, container.childNodes[0] || null);\n            }\n            else {\n                container.appendChild(this.element);\n            }\n            this.performAutoPan();\n        }\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.render = function
  () {\n        this.updatePixelPosition();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleOffsetChanged = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handlePositionChanged = function () {\n        this.updatePixelPosition();\n        this.performAutoPan();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handlePositioningChanged = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * Set the DOM element to be associated with this overlay.\n     * @param {HTMLElement|undefined} element The Element containing the overlay.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setElement = function (element) {\n        this.set(Property.ELEMENT, element);\n    };\n    /**\n     * Set the map to be associated with this overlay.\n     * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n     * overlay is part 
 of.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setMap = function (map) {\n        this.set(Property.MAP, map);\n    };\n    /**\n     * Set the offset for this overlay.\n     * @param {Array<number>} offset Offset.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setOffset = function (offset) {\n        this.set(Property.OFFSET, offset);\n    };\n    /**\n     * Set the position for this overlay. If the position is `undefined` the\n     * overlay is hidden.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n     *     is anchored at.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setPosition = function (position) {\n        this.set(Property.POSITION, position);\n    };\n    /**\n     * Pan the map so that the overlay is entirely visisble in the current viewport\n     * (if necessary) using the configured autoPan parameters\n     * @protected\n     */\n    Overlay.prot
 otype.performAutoPan = function () {\n        if (this.autoPan) {\n            this.panIntoView(this.autoPan);\n        }\n    };\n    /**\n     * Pan the map so that the overlay is entirely visible in the current viewport\n     * (if necessary).\n     * @param {PanIntoViewOptions=} opt_panIntoViewOptions Options for the pan action\n     * @api\n     */\n    Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) {\n        var map = this.getMap();\n        if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n            return;\n        }\n        var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n        var element = this.getElement();\n        var overlayRect = this.getRect(element, [\n            outerWidth(element),\n            outerHeight(element),\n        ]);\n        var panIntoViewOptions = opt_panIntoViewOptions || {};\n        var myMargin = panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n        
 if (!containsExtent(mapRect, overlayRect)) {\n            // the overlay is not completely inside the viewport, so pan the map\n            var offsetLeft = overlayRect[0] - mapRect[0];\n            var offsetRight = mapRect[2] - overlayRect[2];\n            var offsetTop = overlayRect[1] - mapRect[1];\n            var offsetBottom = mapRect[3] - overlayRect[3];\n            var delta = [0, 0];\n            if (offsetLeft < 0) {\n                // move map to the left\n                delta[0] = offsetLeft - myMargin;\n            }\n            else if (offsetRight < 0) {\n                // move map to the right\n                delta[0] = Math.abs(offsetRight) + myMargin;\n            }\n            if (offsetTop < 0) {\n                // move map up\n                delta[1] = offsetTop - myMargin;\n            }\n            else if (offsetBottom < 0) {\n                // move map down\n                delta[1] = Math.abs(offsetBottom) + myMargin;\n            }\n           
  if (delta[0] !== 0 || delta[1] !== 0) {\n                var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map\n                    .getView()\n                    .getCenterInternal());\n                var centerPx = map.getPixelFromCoordinateInternal(center);\n                var newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n                var panOptions = panIntoViewOptions.animation || {};\n                map.getView().animateInternal({\n                    center: map.getCoordinateFromPixelInternal(newCenterPx),\n                    duration: panOptions.duration,\n                    easing: panOptions.easing,\n                });\n            }\n        }\n    };\n    /**\n     * Get the extent of an element relative to the document\n     * @param {HTMLElement} element The element.\n     * @param {import(\"./size.js\").Size} size The size of the element.\n     * @return {import(\"./extent.js\").Extent} The extent.\n     * @protected\n  
    */\n    Overlay.prototype.getRect = function (element, size) {\n        var box = element.getBoundingClientRect();\n        var offsetX = box.left + window.pageXOffset;\n        var offsetY = box.top + window.pageYOffset;\n        return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n    };\n    /**\n     * Set the positioning for this overlay.\n     * @param {import(\"./OverlayPositioning.js\").default} positioning how the overlay is\n     *     positioned relative to its point on the map.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setPositioning = function (positioning) {\n        this.set(Property.POSITIONING, positioning);\n    };\n    /**\n     * Modify the visibility of the element.\n     * @param {boolean} visible Element visibility.\n     * @protected\n     */\n    Overlay.prototype.setVisible = function (visible) {\n        if (this.rendered.visible !== visible) {\n            this.element.style.display = visible ? '' : 'none';\n        
     this.rendered.visible = visible;\n        }\n    };\n    /**\n     * Update pixel position.\n     * @protected\n     */\n    Overlay.prototype.updatePixelPosition = function () {\n        var map = this.getMap();\n        var position = this.getPosition();\n        if (!map || !map.isRendered() || !position) {\n            this.setVisible(false);\n            return;\n        }\n        var pixel = map.getPixelFromCoordinate(position);\n        var mapSize = map.getSize();\n        this.updateRenderedPosition(pixel, mapSize);\n    };\n    /**\n     * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n     * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n     * @protected\n     */\n    Overlay.prototype.updateRenderedPosition = function (pixel, mapSize) {\n        var style = this.element.style;\n        var offset = this.getOffset();\n        var positioning = this.getPositioning();\n        this.setVisible(true);\n        var x = Math.round(p
 ixel[0] + offset[0]) + 'px';\n        var y = Math.round(pixel[1] + offset[1]) + 'px';\n        var posX = '0%';\n        var posY = '0%';\n        if (positioning == OverlayPositioning.BOTTOM_RIGHT ||\n            positioning == OverlayPositioning.CENTER_RIGHT ||\n            positioning == OverlayPositioning.TOP_RIGHT) {\n            posX = '-100%';\n        }\n        else if (positioning == OverlayPositioning.BOTTOM_CENTER ||\n            positioning == OverlayPositioning.CENTER_CENTER ||\n            positioning == OverlayPositioning.TOP_CENTER) {\n            posX = '-50%';\n        }\n        if (positioning == OverlayPositioning.BOTTOM_LEFT ||\n            positioning == OverlayPositioning.BOTTOM_CENTER ||\n            positioning == OverlayPositioning.BOTTOM_RIGHT) {\n            posY = '-100%';\n        }\n        else if (positioning == OverlayPositioning.CENTER_LEFT ||\n            positioning == OverlayPositioning.CENTER_CENTER ||\n            positioning == OverlayPosi
 tioning.CENTER_RIGHT) {\n            posY = '-50%';\n        }\n        var transform = \"translate(\" + posX + \", \" + posY + \") translate(\" + x + \", \" + y + \")\";\n        if (this.rendered.transform_ != transform) {\n            this.rendered.transform_ = transform;\n            style.transform = transform;\n            // @ts-ignore IE9\n            style.msTransform = transform;\n        }\n    };\n    /**\n     * returns the options this Overlay has been created with\n     * @return {Options} overlay options\n     */\n    Overlay.prototype.getOptions = function () {\n        return this.options;\n    };\n    return Overlay;\n}(BaseObject));\nexport default Overlay;\n//# sourceMappingURL=Overlay.js.map","/**\n * @module ol/format/FormatType\n */\n/**\n * @enum {string}\n */\nexport default {\n    ARRAY_BUFFER: 'arraybuffer',\n    JSON: 'json',\n    TEXT: 'text',\n    XML: 'xml',\n};\n//# sourceMappingURL=FormatType.js.map","/**\n * @module ol/featureloader\n */\nimport Fo
 rmatType from './format/FormatType.js';\nimport { VOID } from './functions.js';\n/**\n *\n * @type {boolean}\n * @private\n */\nvar withCredentials = false;\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * load features.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area to be loaded,\n * a `{number}` representing the resolution (map units per pixel) and an\n * {@link module:ol/proj/Projection} for the projection  as\n * arguments. `this` within the function is bound to the\n * {@link module:ol/source/Vector} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default), import(\"./extent.js\").Extent, number,\n *                    import(\"./proj/Projection.js\").default): void} FeatureLoader\n * @api\n */\n/**\n * {@link module:ol/source/Vector} sources use a f
 unction of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection} for the projection  as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {function(this:import(\"./VectorTile.js\").default, Array<import(\"./Feature.js\").default>, import(\"./proj/Projection.js\").default, import(\"./extent.js\").Extent): void|function(this:import(\"./source/Vector\").default, Array<import(\"./Feature.js\").default>): void} success\n *     Function called with the loaded features and opt
 ionally with the data\n *     projection. Called with the vector tile or source as `this`.\n * @param {function(this:import(\"./VectorTile.js\").default): void|function(this:import(\"./source/Vector\").default): void} failure\n *     Function called when loading failed. Called with the vector tile or\n *     source as `this`.\n * @return {FeatureLoader} The feature loader.\n */\nexport function loadFeaturesXhr(url, format, success, failure) {\n    return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n     */\n    function (extent, resolution, projection) {\n        var xhr = new XMLHttpRequest();\n        xhr.open('GET', typeof url === 'function' ? url(extent, resolution, projection) : url, true);\n        if (format.getType() == FormatType.AR
 RAY_BUFFER) {\n            xhr.responseType = 'arraybuffer';\n        }\n        xhr.withCredentials = withCredentials;\n        /**\n         * @param {Event} event Event.\n         * @private\n         */\n        xhr.onload = function (event) {\n            // status will be 0 for file:// urls\n            if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n                var type = format.getType();\n                /** @type {Document|Node|Object|string|undefined} */\n                var source = void 0;\n                if (type == FormatType.JSON || type == FormatType.TEXT) {\n                    source = xhr.responseText;\n                }\n                else if (type == FormatType.XML) {\n                    source = xhr.responseXML;\n                    if (!source) {\n                        source = new DOMParser().parseFromString(xhr.responseText, 'application/xml');\n                    }\n                }\n                else if (type == FormatType.AR
 RAY_BUFFER) {\n                    source = /** @type {ArrayBuffer} */ (xhr.response);\n                }\n                if (source) {\n                    success.call(this, format.readFeatures(source, {\n                        extent: extent,\n                        featureProjection: projection,\n                    }), format.readProjection(source));\n                }\n                else {\n                    failure.call(this);\n                }\n            }\n            else {\n                failure.call(this);\n            }\n        }.bind(this);\n        /**\n         * @private\n         */\n        xhr.onerror = function () {\n            failure.call(this);\n        }.bind(this);\n        xhr.send();\n    });\n}\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param 
 {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n    return loadFeaturesXhr(url, format, \n    /**\n     * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n     * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n     * projection.\n     * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n     */\n    function (features, dataProjection) {\n        var sourceOrTile = /** @type {?} */ (this);\n        if (typeof sourceOrTile.addFeatures === 'function') {\n            /** @type {import(\"./source/Vector\").default} */ (sourceOrTile).addFeatures(features);\n        }\n    }, \n    /* FIXME handle error */ VOID);\n}\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mo
 zilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n    withCredentials = xhrWithCredentials;\n}\n//# sourceMappingURL=featureloader.js.map","/**\n * @module ol/loadingstrategy\n */\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n    return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n    return [extent];\n}\n/**\n * Creates a strategy function for loading fea
 tures based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n    return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"./extent.js\").Extent>} Extents.\n     */\n    function (extent, resolution) {\n        var z = tileGrid.getZForResolution(resolution);\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /** @type {Array<import(\"./extent.js\").Extent>} */\n        var extents = [];\n        /** @type {import(\"./tilecoord.js\").TileCoord} */\n        var tileCoord = [z, 0, 0];\n        for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; ++tileCoord[1]) {\n            for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRa
 nge.maxY; ++tileCoord[2]) {\n                extents.push(tileGrid.getTileCoordExtent(tileCoord));\n            }\n        }\n        return extents;\n    });\n}\n//# sourceMappingURL=loadingstrategy.js.map","/**\n * @module ol/TileRange\n */\n/**\n * A representation of a contiguous block of tiles.  A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nvar TileRange = /** @class */ (function () {\n    /**\n     * @param {number} minX Minimum X.\n     * @param {number} maxX Maximum X.\n     * @param {number} minY Minimum Y.\n     * @param {number} maxY Maximum Y.\n     */\n    function TileRange(minX, maxX, minY, maxY) {\n        /**\n         * @type {number}\n         */\n        this.minX = minX;\n        /**\n         * @type {number}\n         */\n        this.maxX = maxX;\n        /**\n         * @type {number}\n         */\n        this.minY = minY;\n        /**\n         * @type {number}\n         */\n        this.maxY = maxY;\n
     }\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {boolean} Contains tile coordinate.\n     */\n    TileRange.prototype.contains = function (tileCoord) {\n        return this.containsXY(tileCoord[1], tileCoord[2]);\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Contains.\n     */\n    TileRange.prototype.containsTileRange = function (tileRange) {\n        return (this.minX <= tileRange.minX &&\n            tileRange.maxX <= this.maxX &&\n            this.minY <= tileRange.minY &&\n            tileRange.maxY <= this.maxY);\n    };\n    /**\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @return {boolean} Contains coordinate.\n     */\n    TileRange.prototype.containsXY = function (x, y) {\n        return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n    };\n    /**\n     * @param {TileRange} tileRange Til
 e range.\n     * @return {boolean} Equals.\n     */\n    TileRange.prototype.equals = function (tileRange) {\n        return (this.minX == tileRange.minX &&\n            this.minY == tileRange.minY &&\n            this.maxX == tileRange.maxX &&\n            this.maxY == tileRange.maxY);\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     */\n    TileRange.prototype.extend = function (tileRange) {\n        if (tileRange.minX < this.minX) {\n            this.minX = tileRange.minX;\n        }\n        if (tileRange.maxX > this.maxX) {\n            this.maxX = tileRange.maxX;\n        }\n        if (tileRange.minY < this.minY) {\n            this.minY = tileRange.minY;\n        }\n        if (tileRange.maxY > this.maxY) {\n            this.maxY = tileRange.maxY;\n        }\n    };\n    /**\n     * @return {number} Height.\n     */\n    TileRange.prototype.getHeight = function () {\n        return this.maxY - this.minY + 1;\n    };\n    /**\n     * @return {import(\".
 /size.js\").Size} Size.\n     */\n    TileRange.prototype.getSize = function () {\n        return [this.getWidth(), this.getHeight()];\n    };\n    /**\n     * @return {number} Width.\n     */\n    TileRange.prototype.getWidth = function () {\n        return this.maxX - this.minX + 1;\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Intersects.\n     */\n    TileRange.prototype.intersects = function (tileRange) {\n        return (this.minX <= tileRange.maxX &&\n            this.maxX >= tileRange.minX &&\n            this.minY <= tileRange.maxY &&\n            this.maxY >= tileRange.minY);\n    };\n    return TileRange;\n}());\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange=} tileRange TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n    if (tileRan
 ge !== undefined) {\n        tileRange.minX = minX;\n        tileRange.maxX = maxX;\n        tileRange.minY = minY;\n        tileRange.maxY = maxY;\n        return tileRange;\n    }\n    else {\n        return new TileRange(minX, maxX, minY, maxY);\n    }\n}\nexport default TileRange;\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/tilecoord\n */\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array<number>} TileCoord\n * @api\n */\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord=} opt_tileCoord Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, opt_tileCoord) {\n    if (opt_tileCoord !== undefined) {\n        opt_tileCoord[0] = z;\n        opt_tileCoord[1] = x;\n        opt_tileCoord[2] = y;\n        return opt_tileCoord;\n    }\n    else {\n        r
 eturn [z, x, y];\n    }\n}\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n    return z + '/' + x + '/' + y;\n}\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n    return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n    return key.split('/').map(Number);\n}\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n    return (tileCoord[1] << tileCoord[0]) + tileCoord[2];\n}\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is with
 in extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n    var z = tileCoord[0];\n    var x = tileCoord[1];\n    var y = tileCoord[2];\n    if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n        return false;\n    }\n    var extent = tileGrid.getExtent();\n    var tileRange;\n    if (!extent) {\n        tileRange = tileGrid.getFullTileRange(z);\n    }\n    else {\n        tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n    }\n    if (!tileRange) {\n        return true;\n    }\n    else {\n        return tileRange.containsXY(x, y);\n    }\n}\n//# sourceMappingURL=tilecoord.js.map","/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, { createOrUpdate as createOrUpdateTileRange, } from '../TileRange.js';\nimport { DEFAULT_TILE_SIZE } from './common.js';\nimport { assert } from '../asserts.js';\nimport { clamp } from '../math.js';\nimport { createOrUpdate, getTopLeft } from '../extent.js';\nimport { createOrUpd
 ate as createOrUpdateTileCoord } from '../tilecoord.js';\nimport { isSorted, linearFindNearest } from '../array.js';\nimport { toSize } from '../size.js';\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nvar tmpTileCoord = [0, 0, 0];\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n 
 * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, 
 then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nvar TileGrid = /** @class */ (function () {\n    /**\n     * @param {Options} options Tile grid options.\n     */\n    function TileGrid(options) {\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n        /**\n         * @private\n         * @type {!Array<number>}\n         */\n        this.resolutions_ = options.resolutions;\n       
  assert(isSorted(this.resolutions_, function (a, b) {\n            return b - a;\n        }, true), 17); // `resolutions` must be sorted in descending order\n        // check if we've got a consistent zoom factor and origin\n        var zoomFactor;\n        if (!options.origins) {\n            for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n                if (!zoomFactor) {\n                    zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n                }\n                else {\n                    if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n                        zoomFactor = undefined;\n                        break;\n                    }\n                }\n            }\n        }\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.zoomFactor_ = zoomFactor;\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.maxZoom = this.resol
 utions_.length - 1;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        this.origin_ = options.origin !== undefined ? options.origin : null;\n        /**\n         * @private\n         * @type {Array<import(\"../coordinate.js\").Coordinate>}\n         */\n        this.origins_ = null;\n        if (options.origins !== undefined) {\n            this.origins_ = options.origins;\n            assert(this.origins_.length == this.resolutions_.length, 20); // Number of `origins` and `resolutions` must be equal\n        }\n        var extent = options.extent;\n        if (extent !== undefined && !this.origin_ && !this.origins_) {\n            this.origin_ = getTopLeft(extent);\n        }\n        assert((!this.origin_ && this.origins_) || (this.origin_ && !this.origins_), 18); // Either `origin` or `origins` must be configured, never both\n        /**\n         * @private\n         * @type {Array<number|import(\"../size.js\").Si
 ze>}\n         */\n        this.tileSizes_ = null;\n        if (options.tileSizes !== undefined) {\n            this.tileSizes_ = options.tileSizes;\n            assert(this.tileSizes_.length == this.resolutions_.length, 19); // Number of `tileSizes` and `resolutions` must be equal\n        }\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size}\n         */\n        this.tileSize_ =\n            options.tileSize !== undefined\n                ? options.tileSize\n                : !this.tileSizes_\n                    ? DEFAULT_TILE_SIZE\n                    : null;\n        assert((!this.tileSize_ && this.tileSizes_) ||\n            (this.tileSize_ && !this.tileSizes_), 22); // Either `tileSize` or `tileSizes` must be configured, never both\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.extent_ = extent !== undefined ? extent : null;\n        /**\n         * @private\n         * @ty
 pe {Array<import(\"../TileRange.js\").default>}\n         */\n        this.fullTileRanges_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.tmpSize_ = [0, 0];\n        if (options.sizes !== undefined) {\n            this.fullTileRanges_ = options.sizes.map(function (size, z) {\n                var tileRange = new TileRange(Math.min(0, size[0]), Math.max(size[0] - 1, -1), Math.min(0, size[1]), Math.max(size[1] - 1, -1));\n                return tileRange;\n            }, this);\n        }\n        else if (extent) {\n            this.calculateTileRanges_(extent);\n        }\n    }\n    /**\n     * Call a function with each tile coordinate for a given extent and zoom level.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} zoom Integer zoom level.\n     * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n   
   * @api\n     */\n    TileGrid.prototype.forEachTileCoord = function (extent, zoom, callback) {\n        var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n        for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n            for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n                callback([zoom, i, j]);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n     * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n     * @return {boolean} Callback succeeded.\n     */\n    TileGrid.prototype.forEachTileCoordParentTileRange = function (tileCoord, callback, opt_tileRange, opt_extent) {\n   
      var tileRange, x, y;\n        var tileCoordExtent = null;\n        var z = tileCoord[0] - 1;\n        if (this.zoomFactor_ === 2) {\n            x = tileCoord[1];\n            y = tileCoord[2];\n        }\n        else {\n            tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n        }\n        while (z >= this.minZoom) {\n            if (this.zoomFactor_ === 2) {\n                x = Math.floor(x / 2);\n                y = Math.floor(y / 2);\n                tileRange = createOrUpdateTileRange(x, x, y, y, opt_tileRange);\n            }\n            else {\n                tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);\n            }\n            if (callback(z, tileRange)) {\n                return true;\n            }\n            --z;\n        }\n        return false;\n    };\n    /**\n     * Get the extent for this tile grid, if it was configured.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n
      */\n    TileGrid.prototype.getExtent = function () {\n        return this.extent_;\n    };\n    /**\n     * Get the maximum zoom level for the grid.\n     * @return {number} Max zoom.\n     * @api\n     */\n    TileGrid.prototype.getMaxZoom = function () {\n        return this.maxZoom;\n    };\n    /**\n     * Get the minimum zoom level for the grid.\n     * @return {number} Min zoom.\n     * @api\n     */\n    TileGrid.prototype.getMinZoom = function () {\n        return this.minZoom;\n    };\n    /**\n     * Get the origin for the grid at the given zoom level.\n     * @param {number} z Integer zoom level.\n     * @return {import(\"../coordinate.js\").Coordinate} Origin.\n     * @api\n     */\n    TileGrid.prototype.getOrigin = function (z) {\n        if (this.origin_) {\n            return this.origin_;\n        }\n        else {\n            return this.origins_[z];\n        }\n    };\n    /**\n     * Get the resolution for the given zoom level.\n     * @param {number} z Int
 eger zoom level.\n     * @return {number} Resolution.\n     * @api\n     */\n    TileGrid.prototype.getResolution = function (z) {\n        return this.resolutions_[z];\n    };\n    /**\n     * Get the list of resolutions for the tile grid.\n     * @return {Array<number>} Resolutions.\n     * @api\n     */\n    TileGrid.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileCoordChildTileRange = function (tileCoord, opt_tileRange, opt_extent) {\n        if (tileCoord[0] < this.maxZoom) {\n            if (this.zoomFactor_ === 2) {\n 
                var minX = tileCoord[1] * 2;\n                var minY = tileCoord[2] * 2;\n                return createOrUpdateTileRange(minX, minX + 1, minY, minY + 1, opt_tileRange);\n            }\n            var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n            return this.getTileRangeForExtentAndZ(tileCoordExtent, tileCoord[0] + 1, opt_tileRange);\n        }\n        return null;\n    };\n    /**\n     * Get the extent for a tile range.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     */\n    TileGrid.prototype.getTileRangeExtent = function (z, tileRange, opt_extent) {\n        var origin = this.getOrigin(z);\n        var resolution = this.getResolution(z);\n        var tileSize = toSize(this.getTileSize(
 z), this.tmpSize_);\n        var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n        var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n        var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n        var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n        return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n    };\n    /**\n     * Get a tile range for the given extent and integer zoom level.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary tile range object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileRangeForExtentAndZ = function (extent, z, opt_tileRange) {\n        var tileCoord = tmpTileCoord;\n        this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tileCoord);\n        var minX 
 = tileCoord[1];\n        var minY = tileCoord[2];\n        this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tileCoord);\n        return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n     */\n    TileGrid.prototype.getTileCoordCenter = function (tileCoord) {\n        var origin = this.getOrigin(tileCoord[0]);\n        var resolution = this.getResolution(tileCoord[0]);\n        var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        return [\n            origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n            origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n        ];\n    };\n    /**\n     * Get the extent of a tile coordinate.\n     *\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n  
    * @param {import(\"../extent.js\").Extent=} opt_extent Temporary extent object.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordExtent = function (tileCoord, opt_extent) {\n        var origin = this.getOrigin(tileCoord[0]);\n        var resolution = this.getResolution(tileCoord[0]);\n        var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n        var minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n        var maxX = minX + tileSize[0] * resolution;\n        var maxY = minY + tileSize[1] * resolution;\n        return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n    };\n    /**\n     * Get the tile coordinate for the given map coordinate and resolution.  This\n     * method considers that coordinates that intersect tile boundaries should be\n     * assigned the higher tile coordinate.\n     *\n
      * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordForCoordAndResolution = function (coordinate, resolution, opt_tileCoord) {\n        return this.getTileCoordForXYAndResolution_(coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\n    };\n    /**\n     * Note that this method should not be called for resolutions that correspond\n     * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {number} resolution Resolution (for a non-integer zoom level).\n     * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n     *     intersectio
 ns go to the higher tile coordinate, let edge intersections\n     *     go to the lower tile coordinate.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @private\n     */\n    TileGrid.prototype.getTileCoordForXYAndResolution_ = function (x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {\n        var z = this.getZForResolution(resolution);\n        var scale = resolution / this.getResolution(z);\n        var origin = this.getOrigin(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n        var adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n        var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n        var yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n        var tileCoordX = (scale * xFrom
 Origin) / tileSize[0];\n        var tileCoordY = (scale * yFromOrigin) / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = Math.ceil(tileCoordX) - 1;\n            tileCoordY = Math.ceil(tileCoordY) - 1;\n        }\n        else {\n            tileCoordX = Math.floor(tileCoordX);\n            tileCoordY = Math.floor(tileCoordY);\n        }\n        return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n    };\n    /**\n     * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n     * they should have separate implementations.  This method is for integer zoom\n     * levels.  The other method should only be called for resolutions corresponding\n     * to non-integer zoom levels.\n     * @param {number} x Map x coordinate.\n     * @param {number} y Map y coordinate.\n     * @param {number} z Integer zoom level.\n     * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n     *     in
 tersections go to the higher tile coordinate, let edge intersections\n     *     go to the lower tile coordinate.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @private\n     */\n    TileGrid.prototype.getTileCoordForXYAndZ_ = function (x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n        var origin = this.getOrigin(z);\n        var resolution = this.getResolution(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n        var adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n        var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n        var yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n        var tileCoordX = xFromOrigin / tileSize[0];\n        var tileCoordY = yFromOrigin / tileSize[1];\n   
      if (reverseIntersectionPolicy) {\n            tileCoordX = Math.ceil(tileCoordX) - 1;\n            tileCoordY = Math.ceil(tileCoordY) - 1;\n        }\n        else {\n            tileCoordX = Math.floor(tileCoordX);\n            tileCoordY = Math.floor(tileCoordY);\n        }\n        return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n    };\n    /**\n     * Get a tile coordinate given a map coordinate and zoom level.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} z Zoom level.\n     * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordForCoordAndZ = function (coordinate, z, opt_tileCoord) {\n        return this.getTileCoordForXYAndZ_(coordinate[0], coordinate[1], z, false, opt_tileCoord);\n    };\n   
  /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {number} Tile resolution.\n     */\n    TileGrid.prototype.getTileCoordResolution = function (tileCoord) {\n        return this.resolutions_[tileCoord[0]];\n    };\n    /**\n     * Get the tile size for a zoom level. The type of the return value matches the\n     * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n     * get an `import(\"../size.js\").Size`, run the result through `import(\"../size.js\").Size.toSize()`.\n     * @param {number} z Z.\n     * @return {number|import(\"../size.js\").Size} Tile size.\n     * @api\n     */\n    TileGrid.prototype.getTileSize = function (z) {\n        if (this.tileSize_) {\n            return this.tileSize_;\n        }\n        else {\n            return this.tileSizes_[z];\n        }\n    };\n    /**\n     * @param {number} z Zoom level.\n     * @return {import(\"../TileRange.js\").default} Extent tile range for
  the specified zoom level.\n     */\n    TileGrid.prototype.getFullTileRange = function (z) {\n        if (!this.fullTileRanges_) {\n            return null;\n        }\n        else {\n            return this.fullTileRanges_[z];\n        }\n    };\n    /**\n     * @param {number} resolution Resolution.\n     * @param {number=} opt_direction If 0, the nearest resolution will be used.\n     *     If 1, the nearest lower resolution will be used. If -1, the nearest\n     *     higher resolution will be used. Default is 0.\n     * @return {number} Z.\n     * @api\n     */\n    TileGrid.prototype.getZForResolution = function (resolution, opt_direction) {\n        var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);\n        return clamp(z, this.minZoom, this.maxZoom);\n    };\n    /**\n     * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n     * @private\n     */\n    TileGrid.prototype.calculateTileRanges_ = function (extent) {\n   
      var length = this.resolutions_.length;\n        var fullTileRanges = new Array(length);\n        for (var z = this.minZoom; z < length; ++z) {\n            fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n        }\n        this.fullTileRanges_ = fullTileRanges;\n    };\n    return TileGrid;\n}());\nexport default TileGrid;\n//# sourceMappingURL=TileGrid.js.map","/**\n * @module ol/tilegrid\n */\nimport Corner from './extent/Corner.js';\nimport TileGrid from './tilegrid/TileGrid.js';\nimport Units from './proj/Units.js';\nimport { DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE } from './tilegrid/common.js';\nimport { METERS_PER_UNIT, get as getProjection } from './proj.js';\nimport { containsCoordinate, createOrUpdate, getCorner, getHeight, getWidth, } from './extent.js';\nimport { toSize } from './size.js';\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport 
 function getForProjection(projection) {\n    var tileGrid = projection.getDefaultTileGrid();\n    if (!tileGrid) {\n        tileGrid = createForProjection(projection);\n        projection.setDefaultTileGrid(tileGrid);\n    }\n    return tileGrid;\n}\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n    var z = tileCoord[0];\n    var center = tileGrid.getTileCoordCenter(tileCoord);\n    var projectionExtent = extentFromProjection(projection);\n    if (!containsCoordinate(projectionExtent, center)) {\n        var worldWidth = getWidth(projectionExtent);\n        var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);\n        center[0] += worldWidth * worldsAway;\n        return tileGrid
 .getTileCoordForCoordAndZ(center, z);\n    }\n    else {\n        return tileCoord;\n    }\n}\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {\n    var corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;\n    var resolutions = resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize);\n    return new TileGrid({\n        extent: extent,\n        origin: getCorner(extent, corner),\n        resolutions: resolutions,\n        tileSize: opt_tileSize,\n    });\n}\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./exte
 nt.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions=} opt_options Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(opt_options) {\n    var xyzOptions = opt_option
 s || {};\n    var extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n    var gridOptions = {\n        extent: extent,\n        minZoom: xyzOptions.minZoom,\n        tileSize: xyzOptions.tileSize,\n        resolutions: resolutionsFromExtent(extent, xyzOptions.maxZoom, xyzOptions.tileSize, xyzOptions.maxResolution),\n    };\n    return new TileGrid(gridOptions);\n}\n/**\n * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {number=} opt_maxResolution Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize, opt_maxResolution) {\n    var maxZoom = opt_maxZoom !== undefined ? opt_maxZoom
  : DEFAULT_MAX_ZOOM;\n    var height = getHeight(extent);\n    var width = getWidth(extent);\n    var tileSize = toSize(opt_tileSize !== undefined ? opt_tileSize : DEFAULT_TILE_SIZE);\n    var maxResolution = opt_maxResolution > 0\n        ? opt_maxResolution\n        : Math.max(width / tileSize[0], height / tileSize[1]);\n    var length = maxZoom + 1;\n    var resolutions = new Array(length);\n    for (var z = 0; z < length; ++z) {\n        resolutions[z] = maxResolution / Math.pow(2, z);\n    }\n    return resolutions;\n}\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjec
 tion(projection, opt_maxZoom, opt_tileSize, opt_corner) {\n    var extent = extentFromProjection(projection);\n    return createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner);\n}\n/**\n * Generate a tile grid extent from a projection.  If the projection has an\n * extent, it is used.  If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n    projection = getProjection(projection);\n    var extent = projection.getExtent();\n    if (!extent) {\n        var half = (180 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit();\n        extent = createOrUpdate(-half, -half, half, half);\n    }\n    return extent;\n}\n//# sourceMappingURL=tilegrid.js.map","/**\n * @module ol/webgl\n */\n/**\n * Constants taken from goog.webgl\n */\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers conta
 ining vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport var ARRAY_BUFFER = 0x8892;\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport var ELEMENT_ARRAY_BUFFER = 0x8893;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var STREAM_DRAW = 0x88e0;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var STATIC_DRAW = 0x88e4;\n/**\n * Used by {link module:ol/webgl/Buffer~Web
 GLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var DYNAMIC_DRAW = 0x88e8;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_BYTE = 0x1401;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_SHORT = 0x1403;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_INT = 0x1405;\n/**\n * @const\n * @type {number}\n */\nexport var FLOAT = 0x1406;\n/** end of goog.webgl constants\n */\n/**\n * @const\n * @type {Array<string>}\n */\nvar CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object=} opt_attributes Attributes.\n * @return {WebGLRenderingContext} WebGL rendering context.\n */\nexport function getContext(canvas, opt_attributes) {\n    var ii = CONTEXT_IDS.length;\n    for (var i = 0; i < ii; ++i) {\n        try {\n            var context = canvas.getContext(CONTEXT_IDS[i], opt_attributes);\n            if (context) {\n                return /** @type
  {!WebGLRenderingContext} */ (context);\n            }\n        }\n        catch (e) {\n            // pass\n        }\n    }\n    return null;\n}\n/**\n * @type {Array<string>}\n */\nvar supportedExtensions;\n/**\n * @return {Array<string>} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n    if (!supportedExtensions) {\n        var canvas = document.createElement('canvas');\n        var gl = getContext(canvas);\n        if (gl) {\n            supportedExtensions = gl.getSupportedExtensions();\n        }\n    }\n    return supportedExtensions;\n}\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/xml\n */\nimport { extend } from './array.js';\n/**\n * When using {@link module:ol/xml~makeChildAppender} or\n * {@link module:ol/xml~makeSimpleNodeFactory}, the top `objectStack` item needs\n * to have this structure.\n * @typedef {Object} NodeStackItem\n * @property {Node} node\n */\n/**\n * @typedef {function(Element, Array<*>): void} Parser\n 
 */\n/**\n * @typedef {function(Element, *, Array<*>): void} Serializer\n */\n/**\n * @type {string}\n */\nexport var XML_SCHEMA_INSTANCE_URI = 'http://www.w3.org/2001/XMLSchema-instance';\n/**\n * @param {string} namespaceURI Namespace URI.\n * @param {string} qualifiedName Qualified name.\n * @return {Element} Node.\n */\nexport function createElementNS(namespaceURI, qualifiedName) {\n    return getDocument().createElementNS(namespaceURI, qualifiedName);\n}\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @return {string} All text content.\n * @api\n */\nexport function getAllTextContent(node, normalizeWhitespace) {\n    return getAllTextContent_(node, normalizeWhitespace, []).join('');\n}\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhi
 tespace Normalize whitespace: remove all line\n * breaks.\n * @param {Array<string>} accumulator Accumulator.\n * @private\n * @return {Array<string>} Accumulator.\n */\nexport function getAllTextContent_(node, normalizeWhitespace, accumulator) {\n    if (node.nodeType == Node.CDATA_SECTION_NODE ||\n        node.nodeType == Node.TEXT_NODE) {\n        if (normalizeWhitespace) {\n            accumulator.push(String(node.nodeValue).replace(/(\\r\\n|\\r|\\n)/g, ''));\n        }\n        else {\n            accumulator.push(node.nodeValue);\n        }\n    }\n    else {\n        var n = void 0;\n        for (n = node.firstChild; n; n = n.nextSibling) {\n            getAllTextContent_(n, normalizeWhitespace, accumulator);\n        }\n    }\n    return accumulator;\n}\n/**\n * @param {Object} object Object.\n * @return {boolean} Is a document.\n */\nexport function isDocument(object) {\n    return 'documentElement' in object;\n}\n/**\n * @param {Element} node Node.\n * @param {?string} nam
 espaceURI Namespace URI.\n * @param {string} name Attribute name.\n * @return {string} Value\n */\nexport function getAttributeNS(node, namespaceURI, name) {\n    return node.getAttributeNS(namespaceURI, name) || '';\n}\n/**\n * Parse an XML string to an XML Document.\n * @param {string} xml XML.\n * @return {Document} Document.\n * @api\n */\nexport function parse(xml) {\n    return new DOMParser().parseFromString(xml, 'application/xml');\n}\n/**\n * Make an array extender function for extending the array at the top of the\n * object stack.\n * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayExtender(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value =
  valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n            extend(array, value);\n        }\n    });\n}\n/**\n * Make an array pusher function for pushing to the array at the top of the\n * object stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayPusher(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]
 );\n            array.push(value);\n        }\n    });\n}\n/**\n * Make an object stack replacer function for replacing the object at the\n * top of the stack.\n * @param {function(this: T, Node, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeReplacer(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            objectStack[objectStack.length - 1] = value;\n        }\n    });\n}\n/**\n * Make an object property pusher function for adding a property to the\n * object at the top of the stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} o
 pt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertyPusher(valueReader, opt_property, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n            var property = opt_property !== undefined ? opt_property : node.localName;\n            var array = void 0;\n            if (property in object) {\n                array = object[property];\n            }\n            else {\n                array = [];\n                object[property] = array;\n            }\n            array.push(value);\n        }\n    });\n}\n/**\n * Make
  an object property setter function.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertySetter(valueReader, opt_property, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n            var property = opt_property !== undefined ? opt_property : node.localName;\n            object[property] = value;\n        }\n    });\n}\n/**\n * Create a serializer that appends nodes written by its `nodeWriter` to its\n * designated parent.
  The parent is the `node` of the\n * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.\n * @param {function(this: T, Node, V, Array<*>): void} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeChildAppender(nodeWriter, opt_this) {\n    return function (node, value, objectStack) {\n        nodeWriter.call(opt_this !== undefined ? opt_this : this, node, value, objectStack);\n        var parent = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n        var parentNode = parent.node;\n        parentNode.appendChild(node);\n    };\n}\n/**\n * Create a serializer that calls the provided `nodeWriter` from\n * {@link module:ol/xml~serialize}. This can be used by the parent writer to have the\n * 'nodeWriter' called with an array of values when the `nodeWriter` was\n * designed to serialize a single item. An example would be a Lin
 eString\n * geometry writer, which could be reused for writing MultiLineString\n * geometries.\n * @param {function(this: T, Element, V, Array<*>): void} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeArraySerializer(nodeWriter, opt_this) {\n    var serializersNS, nodeFactory;\n    return function (node, value, objectStack) {\n        if (serializersNS === undefined) {\n            serializersNS = {};\n            var serializers = {};\n            serializers[node.localName] = nodeWriter;\n            serializersNS[node.namespaceURI] = serializers;\n            nodeFactory = makeSimpleNodeFactory(node.localName);\n        }\n        serialize(serializersNS, nodeFactory, value, objectStack);\n    };\n}\n/**\n * Create a node factory which can use the `opt_keys` passed to\n * {@link module:ol/xml~serialize} or {@link module:ol/xml~pushSerializeAndPop} as no
 de names,\n * or a fixed node name. The namespace of the created nodes can either be fixed,\n * or the parent namespace will be used.\n * @param {string=} opt_nodeName Fixed node name which will be used for all\n *     created nodes. If not provided, the 3rd argument to the resulting node\n *     factory needs to be provided and will be the nodeName.\n * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for\n *     all created nodes. If not provided, the namespace of the parent node will\n *     be used.\n * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory.\n */\nexport function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) {\n    var fixedNodeName = opt_nodeName;\n    return (\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     */\n    function (value, objectStack, opt_nodeName) {\n        var context = /*
 * @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n        var node = context.node;\n        var nodeName = fixedNodeName;\n        if (nodeName === undefined) {\n            nodeName = opt_nodeName;\n        }\n        var namespaceURI = opt_namespaceURI !== undefined ? opt_namespaceURI : node.namespaceURI;\n        return createElementNS(namespaceURI, /** @type {string} */ (nodeName));\n    });\n}\n/**\n * A node factory that creates a node using the parent's `namespaceURI` and the\n * `nodeName` passed by {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop} to the node factory.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nexport var OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory();\n/**\n * Create an array of `values` to be used with {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop}, where `orderedKeys` has to be provided as\n * `opt_key` argument.\n * @param {Object<
 string, *>} object Key-value pairs for the sequence. Keys can\n *     be a subset of the `orderedKeys`.\n * @param {Array<string>} orderedKeys Keys in the order of the sequence.\n * @return {Array<*>} Values in the order of the sequence. The resulting array\n *     has the same length as the `orderedKeys` array. Values that are not\n *     present in `object` will be `undefined` in the resulting array.\n */\nexport function makeSequence(object, orderedKeys) {\n    var length = orderedKeys.length;\n    var sequence = new Array(length);\n    for (var i = 0; i < length; ++i) {\n        sequence[i] = object[orderedKeys[i]];\n    }\n    return sequence;\n}\n/**\n * Create a namespaced structure, using the same values for each namespace.\n * This can be used as a starting point for versioned parsers, when only a few\n * values are version specific.\n * @param {Array<string>} namespaceURIs Namespace URIs.\n * @param {T} structure Structure.\n * @param {Object<string, T>=} opt_structureNS N
 amespaced structure to add to.\n * @return {Object<string, T>} Namespaced structure.\n * @template T\n */\nexport function makeStructureNS(namespaceURIs, structure, opt_structureNS) {\n    /**\n     * @type {Object<string, T>}\n     */\n    var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};\n    var i, ii;\n    for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {\n        structureNS[namespaceURIs[i]] = structure;\n    }\n    return structureNS;\n}\n/**\n * Parse a node using the parsers and object stack.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n */\nexport function parseNode(parsersNS, node, objectStack, opt_this) {\n    var n;\n    for (n = node.firstElementChild; n; n = n.nextElementSibling) {\n        var parsers = parsersNS[n.namespaceURI];\n        if (parsers !== undefine
 d) {\n            var parser = parsers[n.localName];\n            if (parser !== undefined) {\n                parser.call(opt_this, n, objectStack);\n            }\n        }\n    }\n}\n/**\n * Push an object on top of the stack, parse and return the popped object.\n * @param {T} object Object.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n * @return {T} Object.\n * @template T\n */\nexport function pushParseAndPop(object, parsersNS, node, objectStack, opt_this) {\n    objectStack.push(object);\n    parseNode(parsersNS, node, objectStack, opt_this);\n    return /** @type {T} */ (objectStack.pop());\n}\n/**\n * Walk through an array of `values` and call a serializer for each value.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(th
 is: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param 
 {T=} opt_this The object to use as `this` for the node factory and\n *     serializers.\n * @template T\n */\nexport function serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n    var length = (opt_keys !== undefined ? opt_keys : values).length;\n    var value, node;\n    for (var i = 0; i < length; ++i) {\n        value = values[i];\n        if (value !== undefined) {\n            node = nodeFactory.call(opt_this !== undefined ? opt_this : this, value, objectStack, opt_keys !== undefined ? opt_keys[i] : undefined);\n            if (node !== undefined) {\n                serializersNS[node.namespaceURI][node.localName].call(opt_this, node, value, objectStack);\n            }\n        }\n    }\n}\n/**\n * @param {O} object Object.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `no
 deFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n *     serializers.\n * @return 
 {O|undefined} Object.\n * @template O, T\n */\nexport function pushSerializeAndPop(object, serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n    objectStack.push(object);\n    serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);\n    return /** @type {O|undefined} */ (objectStack.pop());\n}\nvar xmlSerializer_ = undefined;\n/**\n * Register a XMLSerializer. Can be used  to inject a XMLSerializer\n * where there is no globally available implementation.\n *\n * @param {XMLSerializer} xmlSerializer A XMLSerializer.\n * @api\n */\nexport function registerXMLSerializer(xmlSerializer) {\n    xmlSerializer_ = xmlSerializer;\n}\n/**\n * @return {XMLSerializer} The XMLSerializer.\n */\nexport function getXMLSerializer() {\n    if (xmlSerializer_ === undefined && typeof XMLSerializer !== 'undefined') {\n        xmlSerializer_ = new XMLSerializer();\n    }\n    return xmlSerializer_;\n}\nvar document_ = undefined;\n/**\n * Register a Document to
  use when creating nodes for XML serializations. Can be used\n * to inject a Document where there is no globally available implementation.\n *\n * @param {Document} document A Document.\n * @api\n */\nexport function registerDocument(document) {\n    document_ = document;\n}\n/**\n * Get a document that should be used when creating nodes for XML serializations.\n * @return {Document} The document.\n */\nexport function getDocument() {\n    if (document_ === undefined && typeof document !== 'undefined') {\n        document_ = document.implementation.createDocument('', '', null);\n    }\n    return document_;\n}\n//# sourceMappingURL=xml.js.map","/**\n * @module ol/webgl/Buffer\n */\nimport { ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER } from '../webgl.js';\nimport { DYNAMIC_DRAW, STATIC_DRAW, STREAM_DRAW } from '../webgl.js';\nimport { assert } from '../asserts.js';\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number
 }\n */\nexport var BufferUsage = {\n    STATIC_DRAW: STATIC_DRAW,\n    STREAM_DRAW: STREAM_DRAW,\n    DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * * A size using `#ofSize(buffer)`\n * * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n * @api\n */\nvar WebGLArrayBuffer = /** @class */ (function () {\n    /**\n     * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n     * @param {number=} opt_
 usage Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n     * Default is `DYNAMIC_DRAW`.\n     */\n    function WebGLArrayBuffer(type, opt_usage) {\n        /**\n         * @private\n         * @type {Float32Array|Uint32Array}\n         */\n        this.array = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.type = type;\n        assert(type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER, 62);\n        /**\n         * @private\n         * @type {number}\n         */\n        this.usage = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;\n    }\n    /**\n     * Populates the buffer with an array of the given size (all values will be zeroes).\n     * @param {number} size Array size\n     */\n    WebGLArrayBuffer.prototype.ofSize = function (size) {\n        this.array = new (getArrayClassForType(this.type))(size);\n    };\n    /**\n     * Populates the buffer with an array of the given size (all value
 s will be zeroes).\n     * @param {Array<number>} array Numerical array\n     */\n    WebGLArrayBuffer.prototype.fromArray = function (array) {\n        this.array = getArrayClassForType(this.type).from(array);\n    };\n    /**\n     * Populates the buffer with a raw binary array buffer.\n     * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n     * initialized for the same typed array class.\n     */\n    WebGLArrayBuffer.prototype.fromArrayBuffer = function (buffer) {\n        this.array = new (getArrayClassForType(this.type))(buffer);\n    };\n    /**\n     * @return {number} Buffer type.\n     */\n    WebGLArrayBuffer.prototype.getType = function () {\n        return this.type;\n    };\n    /**\n     * Will return null if the buffer was not initialized\n     * @return {Float32Array|Uint32Array} Array.\n     */\n    WebGLArrayBuffer.prototype.getArray = function () {\n        return this.array;\n    };\n    /**\n    
  * @return {number} Usage.\n     */\n    WebGLArrayBuffer.prototype.getUsage = function () {\n        return this.usage;\n    };\n    /**\n     * Will return 0 if the buffer is not initialized\n     * @return {number} Array size\n     */\n    WebGLArrayBuffer.prototype.getSize = function () {\n        return this.array ? this.array.length : 0;\n    };\n    return WebGLArrayBuffer;\n}());\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @returns {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n    switch (type) {\n        case ARRAY_BUFFER:\n            return Float32Array;\n        case ELEMENT_ARRAY_BUFFER:\n            return Uint32Array;\n        default:\n            return Float32Array;\n    }\n}\nexport default WebGLArrayBuffer;\n//# sourceMappingURL=Buffer.js.map","/**\
 n * @module ol/webgl/ContextEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    LOST: 'webglcontextlost',\n    RESTORED: 'webglcontextrestored',\n};\n//# sourceMappingURL=ContextEventType.js.map","/**\n * @module ol/webgl/PostProcessingPass\n */\nvar DEFAULT_VERTEX_SHADER = \"\\n  precision mediump float;\\n  \\n  attribute vec2 a_position;\\n  varying vec2 v_texCoord;\\n  varying vec2 v_screenCoord;\\n  \\n  uniform vec2 u_screenSize;\\n   \\n  void main() {\\n    v_texCoord = a_position * 0.5 + 0.5;\\n    v_screenCoord = v_texCoord * u_screenSize;\\n    gl_Position = vec4(a_position, 0.0, 1.0);\\n  }\\n\";\nvar DEFAULT_FRAGMENT_SHADER = \"\\n  precision mediump float;\\n   \\n  uniform sampler2D u_image;\\n   \\n  varying vec2 v_texCoord;\\n   \\n  void main() {\\n    gl_FragColor = texture2D(u_image, v_texCoord);\\n  }\\n\";\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleR
 atio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,import(\"./Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {number} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity o
 f 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * * Vertex shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   attribute vec2 a_position;\n *   varying vec2 v_texCoord;\n *   varying vec2 v_screenCoord;\n *\n *   uniform vec2 u_screenSize;\n *\n *   void main() {\n *     v_texCoord = a_position * 0.5 + 0.5;\n *     v_screenCoord = v_texCoord * u_screenSize;\n *     gl_Position = vec4(a_position, 0.0, 1.0);\n *   }\n *   ```\n *\n * * Fragment shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   uniform sampler2D u_image;\n *\n *   varying vec2 v_texCoord;\n *\n *   void main() {\n *     gl_FragColor = texture2D(u_image, v_texCoord);\n *   }\n *   ```\n *\n * @api\n */\nvar Web
 GLPostProcessingPass = /** @class */ (function () {\n    /**\n     * @param {Options} options Options.\n     */\n    function WebGLPostProcessingPass(options) {\n        this.gl_ = options.webGlContext;\n        var gl = this.gl_;\n        this.scaleRatio_ = options.scaleRatio || 1;\n        this.renderTargetTexture_ = gl.createTexture();\n        this.renderTargetTextureSize_ = null;\n        this.frameBuffer_ = gl.createFramebuffer();\n        // compile the program for the frame buffer\n        // TODO: make compilation errors show up\n        var vertexShader = gl.createShader(gl.VERTEX_SHADER);\n        gl.shaderSource(vertexShader, options.vertexShader || DEFAULT_VERTEX_SHADER);\n        gl.compileShader(vertexShader);\n        var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n        gl.shaderSource(fragmentShader, options.fragmentShader || DEFAULT_FRAGMENT_SHADER);\n        gl.compileShader(fragmentShader);\n        this.renderTargetProgram_ = gl.createProgram();\n 
        gl.attachShader(this.renderTargetProgram_, vertexShader);\n        gl.attachShader(this.renderTargetProgram_, fragmentShader);\n        gl.linkProgram(this.renderTargetProgram_);\n        // bind the vertices buffer for the frame buffer\n        this.renderTargetVerticesBuffer_ = gl.createBuffer();\n        var verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verticesArray), gl.STATIC_DRAW);\n        this.renderTargetAttribLocation_ = gl.getAttribLocation(this.renderTargetProgram_, 'a_position');\n        this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');\n        this.renderTargetTextureLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_image');\n        /**\n         * Holds info about custom uniforms used in the post processing pass\n         * @type {Array<UniformInter
 nalDescription>}\n         * @private\n         */\n        this.uniforms_ = [];\n        options.uniforms &&\n            Object.keys(options.uniforms).forEach(function (name) {\n                this.uniforms_.push({\n                    value: options.uniforms[name],\n                    location: gl.getUniformLocation(this.renderTargetProgram_, name),\n                });\n            }.bind(this));\n    }\n    /**\n     * Get the WebGL rendering context\n     * @return {WebGLRenderingContext} The rendering context.\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.getGL = function () {\n        return this.gl_;\n    };\n    /**\n     * Initialize the render target texture of the post process, make sure it is at the\n     * right size and bind it as a render target for the next draw calls.\n     * The last step to be initialized will be the one where the primitives are rendered.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n
      * @api\n     */\n    WebGLPostProcessingPass.prototype.init = function (frameState) {\n        var gl = this.getGL();\n        var textureSize = [\n            gl.drawingBufferWidth * this.scaleRatio_,\n            gl.drawingBufferHeight * this.scaleRatio_,\n        ];\n        // rendering goes to my buffer\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n        gl.viewport(0, 0, textureSize[0], textureSize[1]);\n        // if size has changed: adjust canvas & render target texture\n        if (!this.renderTargetTextureSize_ ||\n            this.renderTargetTextureSize_[0] !== textureSize[0] ||\n            this.renderTargetTextureSize_[1] !== textureSize[1]) {\n            this.renderTargetTextureSize_ = textureSize;\n            // create a new texture\n            var level = 0;\n            var internalFormat = gl.RGBA;\n            var border = 0;\n            var format = gl.RGBA;\n            var type = gl.UNSIGNED_BYTE;\n            var data = null
 ;\n            gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, textureSize[0], textureSize[1], border, format, type, data);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n            // bind the texture to the framebuffer\n            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.renderTargetTexture_, 0);\n        }\n    };\n    /**\n     * Render to the next postprocessing pass (or to the canvas if final pass).\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.apply = function (frameState, nextPass) {\n    
     var gl = this.getGL();\n        var size = frameState.size;\n        gl.bindFramebuffer(gl.FRAMEBUFFER, nextPass ? nextPass.getFrameBuffer() : null);\n        gl.activeTexture(gl.TEXTURE0);\n        gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n        // render the frame buffer to the canvas\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.useProgram(this.renderTargetProgram_);\n        gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n        gl.vertexAttribPointer(this.renderTargetAttribLocation_, 2, gl.FLOAT, false, 0, 0);\n        gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n        gl.uniform1i(this.renderTargetTextureLocation_, 0);\n        this.a
 pplyUniforms(frameState);\n        gl.drawArrays(gl.TRIANGLES, 0, 6);\n    };\n    /**\n     * @returns {WebGLFramebuffer} Frame buffer\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.getFrameBuffer = function () {\n        return this.frameBuffer_;\n    };\n    /**\n     * Sets the custom uniforms based on what was given in the constructor.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLPostProcessingPass.prototype.applyUniforms = function (frameState) {\n        var gl = this.getGL();\n        var value;\n        var textureSlot = 1;\n        this.uniforms_.forEach(function (uniform) {\n            value =\n                typeof uniform.value === 'function'\n                    ? uniform.value(frameState)\n                    : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n                // create a 
 texture & put data\n                if (!uniform.texture) {\n                    uniform.texture = gl.createTexture();\n                }\n                gl.activeTexture(gl[\"TEXTURE\" + textureSlot]);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                if (value instanceof ImageData) {\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, value.width, value.height, 0, gl.UNSIGNED_BYTE, new Uint8Array(value.data));\n                }\n                else {\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                // fill texture slots\n                gl.uniform1i(uniform.location, textureSlot++);\n        
     }\n            else if (Array.isArray(value)) {\n                switch (value.length) {\n                    case 2:\n                        gl.uniform2f(uniform.location, value[0], value[1]);\n                        return;\n                    case 3:\n                        gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n                        return;\n                    case 4:\n                        gl.uniform4f(uniform.location, value[0], value[1], value[2], value[3]);\n                        return;\n                    default:\n                        return;\n                }\n            }\n            else if (typeof value === 'number') {\n                gl.uniform1f(uniform.location, value);\n            }\n        });\n    };\n    return WebGLPostProcessingPass;\n}());\nexport default WebGLPostProcessingPass;\n//# sourceMappingURL=PostProcessingPass.js.map","/**\n * @module ol/vec/mat4\n */\n/**\n * @return {Array<number>} \"4x4 matrix rep
 resenting a 3D identity transform.\"\n */\nexport function create() {\n    return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n/**\n * @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Array<number>} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n    mat4[0] = transform[0];\n    mat4[1] = transform[1];\n    mat4[4] = transform[2];\n    mat4[5] = transform[3];\n    mat4[12] = transform[4];\n    mat4[13] = transform[5];\n    return mat4;\n}\n//# sourceMappingURL=mat4.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p
 ]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/webgl/Helper\n */\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport Disposable from '../Disposable.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\nimport { FLOAT, UNSIGNED_BYTE, UNSIGNED_INT, UNSIGNED_SHORT, getContext, getSupportedExtensions, } from '../webgl.js';\nimport { assert } from '../asserts.js';\nimport { clear } from '../obj.js';\nimport { compose as composeTransform, create as createTransform, reset as resetTransform, rotate as rotateTransform, scale as scaleTransform, } from '../transform.js';\nimport { create, fromTransform } from '../vec/mat4.js';\nimport { getUid } from '../util.js';\nimport { includes } from '../array.js';\n/**\n * @typedef
  {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer\n * @property {WebGLBuffer} webGlBuffer\n */\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport var ShaderType = {\n    FRAGMENT_SHADER: 0x8b30,\n    VERTEX_SHADER: 0x8b31,\n};\n/**\n * Uniform names used in the default shaders: `PROJECTION_MATRIX`, `OFFSET_SCALE_MATRIX`.\n * and `OFFSET_ROTATION_MATRIX`.\n * @enum {string}\n */\nexport var DefaultUniform = {\n    PROJECTION_MATRIX: 'u_projectionMatrix',\n    OFFSET_SCALE_MATRIX: 'u_offsetScaleMatrix',\n    OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix',\n    TIME: 'u_time',\n    ZOOM: 'u_zoom',\n    RESOLUTION: 'u_resolution',\n};\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport var AttributeType = {\n    UNSIGNED_BYTE: UNSIGNED_BYTE,\n    UNSIGNED_SHO
 RT: UNSIGNED_SHORT,\n    UNSIGNED_INT: UNSIGNED_INT,\n    FLOAT: FLOAT,\n};\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name to use in shaders\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|import(\"../transform\").Transform} UniformLiteralValue\n */\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../PluggableMap.js\").FrameState):UniformLiteralValue} UniformValue\n */\n/**\n * @typedef {Object} PostProcessesOptions\n
  * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object.<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} Options\n * @property {Object.<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue=} value Value\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n/**\n * @classdesc\n * This class is intended to provide low-level functions rel
 ated to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n *   *Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n *   Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n *   Outputs are:\n *\n *   * `gl_Position`: position of the vertex in screen space\n *\n *   * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n *   Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n *   Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n *   can be changed at every frame and can be of type float, arrays of float or
  images.\n *\n *   Shaders must be compiled and assembled into a program like so:\n *   ```js\n *   // here we simply create two shaders and assemble them in a program which is then used\n *   // for subsequent rendering calls\n *   const vertexShader = new WebGLVertex(VERTEX_SHADER);\n *   const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n *   const program = this.context.getProgram(fragmentShader, vertexShader);\n *   helper.useProgram(this.program);\n *   ```\n *\n *   Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n *   You can also change their value along the way like so:\n *   ```js\n *   helper.setUniformFloatValue('u_value', valueAsNumber);\n *   ```\n *\n * ### Defining post processing passes\n *\n *   *Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n *   while applying special effects in screen space.\
 n *   Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n *   The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n *   A post process step accepts the following options:\n *\n *   * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n *   * `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n *   * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n *     This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n *   The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n *   
 Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n *   A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n *   This is done using {@link bindBuffer}.\n *   When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n *   {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n *   When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n *   (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n *   Examples below:\n *   ```js\n *   // at initialization phase\n *   const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *   const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n
  *   // when array values have changed\n *   helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n *   // at rendering phase\n *   helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *   ```\n *\n * ### Specifying attributes\n *\n *   The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n *   Attributes are used to specify these uses. Use {@link enableAttributeArray_} and either\n *   the default attribute names in {@link module:ol/webgl/Helper.DefaultAttrib} or custom ones.\n *\n *   Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingC
 ontext/vertexAttribPointer) for more explanation.\n *   ```js\n *   // here we indicate that the data array has the following structure:\n *   // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n *   helper.enableAttributes([\n *     {\n *        name: 'a_position',\n *        size: 2\n *     },\n *     {\n *       name: 'a_offset',\n *       size: 2\n *     },\n *     {\n *       name: 'a_texCoord',\n *       size: 2\n *     }\n *   ])\n *   ```\n *\n * ### Rendering primitives\n *\n *   Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n *   ```js\n *   // frame preparation step\n *   helper.prepareDraw(frameState);\n *\n *   // call this for every data array that has to be rendered on screen\n *   helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n *   // finalize the rendering by applying post processes\n *   helper.finalizeDraw(fr
 ameState);\n *   ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n *\n * @api\n */\nvar WebGLHelper = /** @class */ (function (_super) {\n    __extends(WebGLHelper, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function WebGLHelper(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /** @private */\n        _this.boundHandleWebGLContextLost_ = _this.handleWebGLContextLost.bind(_this);\n        /** @private */\n        _this.boundHandleWebGLContextRestored_ = _this.handleWebGLContextRestored.bind(_this);\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = document.createElement('canvas');\n        _this.canvas_.style.position = 'absolute';\n        _this.canvas_.style.left = '0';\n        /**\n         * @private\n         * @type {WebGLRenderingConte
 xt}\n         */\n        _this.gl_ = getContext(_this.canvas_);\n        var gl = _this.getGL();\n        /**\n         * @private\n         * @type {!Object<string, BufferCacheEntry>}\n         */\n        _this.bufferCache_ = {};\n        /**\n         * @private\n         * @type {WebGLProgram}\n         */\n        _this.currentProgram_ = null;\n        assert(includes(getSupportedExtensions(), 'OES_element_index_uint'), 63);\n        gl.getExtension('OES_element_index_uint');\n        _this.canvas_.addEventListener(ContextEventType.LOST, _this.boundHandleWebGLContextLost_);\n        _this.canvas_.addEventListener(ContextEventType.RESTORED, _this.boundHandleWebGLContextRestored_);\n        /**\n         * @private\n         * @type {import(\"../transform.js\").Transform}\n         */\n        _this.offsetRotateMatrix_ = createTransform();\n        /**\n         * @private\n         * @type {import(\"../transform.js\").Transform}\n         */\n        _this.offsetScaleMatrix_ = 
 createTransform();\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.tmpMat4_ = create();\n        /**\n         * @private\n         * @type {Object.<string, WebGLUniformLocation>}\n         */\n        _this.uniformLocations_ = {};\n        /**\n         * @private\n         * @type {Object.<string, number>}\n         */\n        _this.attribLocations_ = {};\n        /**\n         * Holds info about custom uniforms used in the post processing pass.\n         * If the uniform is a texture, the WebGL Texture object will be stored here.\n         * @type {Array<UniformInternalDescription>}\n         * @private\n         */\n        _this.uniforms_ = [];\n        if (options.uniforms) {\n            for (var name_1 in options.uniforms) {\n                _this.uniforms_.push({\n                    name: name_1,\n                    value: options.uniforms[name_1],\n                });\n            }\n        }\n        /**\n         * An a
 rray of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n         * options. If no post process was given, a default one is used (so as not to have to make an exception to\n         * the frame buffer logic).\n         * @type {Array<WebGLPostProcessingPass>}\n         * @private\n         */\n        _this.postProcessPasses_ = options.postProcesses\n            ? options.postProcesses.map(function (options) {\n                return new WebGLPostProcessingPass({\n                    webGlContext: gl,\n                    scaleRatio: options.scaleRatio,\n                    vertexShader: options.vertexShader,\n                    fragmentShader: options.fragmentShader,\n                    uniforms: options.uniforms,\n                });\n            })\n            : [new WebGLPostProcessingPass({ webGlContext: gl })];\n        /**\n         * @type {string|null}\n         * @private\n         */\n        _this.shaderCompileErrors_ = null;\
 n        /**\n         * @type {number}\n         * @private\n         */\n        _this.startTime_ = Date.now();\n        return _this;\n    }\n    /**\n     * Just bind the buffer if it's in the cache. Otherwise create\n     * the WebGL buffer, bind it, populate it, and add an entry to\n     * the cache.\n     * @param {import(\"./Buffer\").default} buffer Buffer.\n     * @api\n     */\n    WebGLHelper.prototype.bindBuffer = function (buffer) {\n        var gl = this.getGL();\n        var bufferKey = getUid(buffer);\n        var bufferCache = this.bufferCache_[bufferKey];\n        if (!bufferCache) {\n            var webGlBuffer = gl.createBuffer();\n            bufferCache = {\n                buffer: buffer,\n                webGlBuffer: webGlBuffer,\n            };\n            this.bufferCache_[bufferKey] = bufferCache;\n        }\n        gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n    };\n    /**\n     * Update the data contained in the buffer array; this is r
 equired for the\n     * new data to be rendered\n     * @param {import(\"./Buffer\").default} buffer Buffer.\n     * @api\n     */\n    WebGLHelper.prototype.flushBufferData = function (buffer) {\n        var gl = this.getGL();\n        this.bindBuffer(buffer);\n        gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n    };\n    /**\n     * @param {import(\"./Buffer.js\").default} buf Buffer.\n     */\n    WebGLHelper.prototype.deleteBuffer = function (buf) {\n        var gl = this.getGL();\n        var bufferKey = getUid(buf);\n        var bufferCacheEntry = this.bufferCache_[bufferKey];\n        if (!gl.isContextLost()) {\n            gl.deleteBuffer(bufferCacheEntry.buffer);\n        }\n        delete this.bufferCache_[bufferKey];\n    };\n    /**\n     * Clean up.\n     */\n    WebGLHelper.prototype.disposeInternal = function () {\n        this.canvas_.removeEventListener(ContextEventType.LOST, this.boundHandleWebGLContextLost_);\n        this.canvas_.rem
 oveEventListener(ContextEventType.RESTORED, this.boundHandleWebGLContextRestored_);\n    };\n    /**\n     * Clear the buffer & set the viewport to draw.\n     * Post process passes will be initialized here, the first one being bound as a render target for\n     * subsequent draw calls.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLHelper.prototype.prepareDraw = function (frameState) {\n        var gl = this.getGL();\n        var canvas = this.getCanvas();\n        var size = frameState.size;\n        var pixelRatio = frameState.pixelRatio;\n        canvas.width = size[0] * pixelRatio;\n        canvas.height = size[1] * pixelRatio;\n        canvas.style.width = size[0] + 'px';\n        canvas.style.height = size[1] + 'px';\n        gl.useProgram(this.currentProgram_);\n        // loop backwards in post processes list\n        for (var i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n            this.p
 ostProcessPasses_[i].init(frameState);\n        }\n        gl.bindTexture(gl.TEXTURE_2D, null);\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(this.currentProgram_);\n        this.applyFrameState(frameState);\n        this.applyUniforms(frameState);\n    };\n    /**\n     * Clear the render target & bind it for future draw operations.\n     * This is similar to `prepareDraw`, only post processes will not be applied.\n     * Note: the whole viewport will be drawn to the render target, regardless of its size.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n     * @param {boolean} [opt_disableAlphaBlend] If true, no alpha blending will happen.\n     */\n    WebGLHelper.prototype.prepareDrawToRenderTarget = fun
 ction (frameState, renderTarget, opt_disableAlphaBlend) {\n        var gl = this.getGL();\n        var size = renderTarget.getSize();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, opt_disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(this.currentProgram_);\n        this.applyFrameState(frameState);\n        this.applyUniforms(frameState);\n    };\n    /**\n     * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n     * @param {number} start Start index.\n     * @param {number} end End index.\n     * @api\n     */\n    WebGLHelper.prototype.drawElements = function (start, end) {\n        var gl = this.getGL();\n        var elementType =
  gl.UNSIGNED_INT;\n        var elementSize = 4;\n        var numItems = end - start;\n        var offsetInBytes = start * elementSize;\n        gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n    };\n    /**\n     * Apply the successive post process passes which will eventually render to the actual canvas.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLHelper.prototype.finalizeDraw = function (frameState) {\n        // apply post processes using the next one as target\n        for (var i = 0; i < this.postProcessPasses_.length; i++) {\n            this.postProcessPasses_[i].apply(frameState, this.postProcessPasses_[i + 1] || null);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Canvas.\n     * @api\n     */\n    WebGLHelper.prototype.getCanvas = function () {\n        return this.canvas_;\n    };\n    /**\n     * Get the WebGL rendering context\n     * @return {WebGLRend
 eringContext} The rendering context.\n     * @api\n     */\n    WebGLHelper.prototype.getGL = function () {\n        return this.gl_;\n    };\n    /**\n     * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLHelper.prototype.applyFrameState = function (frameState) {\n        var size = frameState.size;\n        var rotation = frameState.viewState.rotation;\n        var offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n        scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n        var offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n        if (rotation !== 0) {\n            rotateTransform(offsetRotateMatrix, -rotation);\n        }\n        this.setUniformMatrixValue(DefaultUniform.OFFSET_SCALE_MATRIX, fromTransform(this.tmpMat4_, offsetScaleMatrix));\n        this.setUnif
 ormMatrixValue(DefaultUniform.OFFSET_ROTATION_MATRIX, fromTransform(this.tmpMat4_, offsetRotateMatrix));\n        this.setUniformFloatValue(DefaultUniform.TIME, (Date.now() - this.startTime_) * 0.001);\n        this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n        this.setUniformFloatValue(DefaultUniform.RESOLUTION, frameState.viewState.resolution);\n    };\n    /**\n     * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLHelper.prototype.applyUniforms = function (frameState) {\n        var gl = this.getGL();\n        var value;\n        var textureSlot = 0;\n        this.uniforms_.forEach(function (uniform) {\n            value =\n                typeof uniform.value === 'function'\n                    ? uniform.value(frameState)\n                    : uniform.value;\n    
         // apply value based on type\n            if (value instanceof HTMLCanvasElement ||\n                value instanceof HTMLImageElement ||\n                value instanceof ImageData) {\n                // create a texture & put data\n                if (!uniform.texture) {\n                    uniform.prevValue = undefined;\n                    uniform.texture = gl.createTexture();\n                }\n                gl.activeTexture(gl[\"TEXTURE\" + textureSlot]);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                var imageReady = !(value instanceof HTMLImageElement) ||\n                    /** @type {HTMLImageElement} */ (value).complete;\n                if (imageReady && uniform.prevValu
 e !== value) {\n                    uniform.prevValue = value;\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                // fill texture slots by increasing index\n                gl.uniform1i(this.getUniformLocation(uniform.name), textureSlot++);\n            }\n            else if (Array.isArray(value) && value.length === 6) {\n                this.setUniformMatrixValue(uniform.name, fromTransform(this.tmpMat4_, value));\n            }\n            else if (Array.isArray(value) && value.length <= 4) {\n                switch (value.length) {\n                    case 2:\n                        gl.uniform2f(this.getUniformLocation(uniform.name), value[0], value[1]);\n                        return;\n                    case 3:\n                        gl.uniform3f(this.getUniformLocation(uniform.name), value[0], value[1], value[2]);\n                        return;\n                    case 4:\n            
             gl.uniform4f(this.getUniformLocation(uniform.name), value[0], value[1], value[2], value[3]);\n                        return;\n                    default:\n                        return;\n                }\n            }\n            else if (typeof value === 'number') {\n                gl.uniform1f(this.getUniformLocation(uniform.name), value);\n            }\n        }.bind(this));\n    };\n    /**\n     * Use a program.  If the program is already in use, this will return `false`.\n     * @param {WebGLProgram} program Program.\n     * @return {boolean} Changed.\n     * @api\n     */\n    WebGLHelper.prototype.useProgram = function (program) {\n        if (program == this.currentProgram_) {\n            return false;\n        }\n        else {\n            var gl = this.getGL();\n            gl.useProgram(program);\n            this.currentProgram_ = program;\n            this.uniformLocations_ = {};\n            this.attribLocations_ = {};\n            return true;\
 n        }\n    };\n    /**\n     * Will attempt to compile a vertex or fragment shader based on source\n     * On error, the shader will be returned but\n     * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n     * Use `gl.getShaderInfoLog(shader)` to have details\n     * @param {string} source Shader source\n     * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n     * @return {WebGLShader} Shader object\n     */\n    WebGLHelper.prototype.compileShader = function (source, type) {\n        var gl = this.getGL();\n        var shader = gl.createShader(type);\n        gl.shaderSource(shader, source);\n        gl.compileShader(shader);\n        return shader;\n    };\n    /**\n     * Create a program for a vertex and fragment shader. The shaders compilation may have failed:\n     * use `WebGLHelper.getShaderCompileErrors()`to have details if any.\n     * @param {string} fragmentShaderSource Fragment shader source.\n     * @param {string} vertexShader
 Source Vertex shader source.\n     * @return {WebGLProgram} Program\n     * @api\n     */\n    WebGLHelper.prototype.getProgram = function (fragmentShaderSource, vertexShaderSource) {\n        var gl = this.getGL();\n        var fragmentShader = this.compileShader(fragmentShaderSource, gl.FRAGMENT_SHADER);\n        var vertexShader = this.compileShader(vertexShaderSource, gl.VERTEX_SHADER);\n        this.shaderCompileErrors_ = null;\n        if (gl.getShaderInfoLog(fragmentShader)) {\n            this.shaderCompileErrors_ = \"Fragment shader compilation failed:\\n\" + gl.getShaderInfoLog(fragmentShader);\n        }\n        if (gl.getShaderInfoLog(vertexShader)) {\n            this.shaderCompileErrors_ =\n                (this.shaderCompileErrors_ || '') +\n                    (\"Vertex shader compilation failed:\\n\" + gl.getShaderInfoLog(vertexShader));\n        }\n        var program = gl.createProgram();\n        gl.attachShader(program, fragmentShader);\n        gl.attachShader
 (program, vertexShader);\n        gl.linkProgram(program);\n        return program;\n    };\n    /**\n     * Will return the last shader compilation errors. If no error happened, will return null;\n     * @return {string|null} Errors description, or null if last compilation was successful\n     * @api\n     */\n    WebGLHelper.prototype.getShaderCompileErrors = function () {\n        return this.shaderCompileErrors_;\n    };\n    /**\n     * Will get the location from the shader or the cache\n     * @param {string} name Uniform name\n     * @return {WebGLUniformLocation} uniformLocation\n     * @api\n     */\n    WebGLHelper.prototype.getUniformLocation = function (name) {\n        if (this.uniformLocations_[name] === undefined) {\n            this.uniformLocations_[name] = this.getGL().getUniformLocation(this.currentProgram_, name);\n        }\n        return this.uniformLocations_[name];\n    };\n    /**\n     * Will get the location from the shader or the cache\n     * @param {st
 ring} name Attribute name\n     * @return {number} attribLocation\n     * @api\n     */\n    WebGLHelper.prototype.getAttributeLocation = function (name) {\n        if (this.attribLocations_[name] === undefined) {\n            this.attribLocations_[name] = this.getGL().getAttribLocation(this.currentProgram_, name);\n        }\n        return this.attribLocations_[name];\n    };\n    /**\n     * Modifies the given transform to apply the rotation/translation/scaling of the given frame state.\n     * The resulting transform can be used to convert world space coordinates to view coordinates.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../transform\").Transform} transform Transform to update.\n     * @return {import(\"../transform\").Transform} The updated transform object.\n     * @api\n     */\n    WebGLHelper.prototype.makeProjectionTransform = function (frameState, transform) {\n        var size = frameState.size;\n     
    var rotation = frameState.viewState.rotation;\n        var resolution = frameState.viewState.resolution;\n        var center = frameState.viewState.center;\n        resetTransform(transform);\n        composeTransform(transform, 0, 0, 2 / (resolution * size[0]), 2 / (resolution * size[1]), -rotation, -center[0], -center[1]);\n        return transform;\n    };\n    /**\n     * Give a value for a standard float uniform\n     * @param {string} uniform Uniform name\n     * @param {number} value Value\n     * @api\n     */\n    WebGLHelper.prototype.setUniformFloatValue = function (uniform, value) {\n        this.getGL().uniform1f(this.getUniformLocation(uniform), value);\n    };\n    /**\n     * Give a value for a standard matrix4 uniform\n     * @param {string} uniform Uniform name\n     * @param {Array<number>} value Matrix value\n     * @api\n     */\n    WebGLHelper.prototype.setUniformMatrixValue = function (uniform, value) {\n        this.getGL().uniformMatrix4fv(this.getUnifor
 mLocation(uniform), false, value);\n    };\n    /**\n     * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n     * internally.\n     * @param {string} attribName Attribute name\n     * @param {number} size Number of components per attributes\n     * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n     * @param {number} stride Stride in bytes (0 means attribs are packed)\n     * @param {number} offset Offset in bytes\n     * @private\n     */\n    WebGLHelper.prototype.enableAttributeArray_ = function (attribName, size, type, stride, offset) {\n        var location = this.getAttributeLocation(attribName);\n        // the attribute has not been found in the shaders; do not enable it\n        if (location < 0) {\n            return;\n        }\n        this.getGL().enableVertexAttribArray(location);\n        this.getGL().vertexAttribPointer(location, size, type, false, stride, offset);\n    };\n    /**\n
      * Will enable the following attributes to be read from the currently bound buffer,\n     * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n     * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n     * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n     * @api\n     */\n    WebGLHelper.prototype.enableAttributes = function (attributes) {\n        var stride = computeAttributesStride(attributes);\n        var offset = 0;\n        for (var i = 0; i < attributes.length; i++) {\n            var attr = attributes[i];\n            this.enableAttributeArray_(attr.name, attr.size, attr.type || FLOAT, stride, offset);\n            offset += attr.size * getByteSizeFromType(attr.type);\n        }\n    };\n    /**\n     * WebGL context was lost\n     * @private\n     */\n    WebGLHelper.prototype.handleWebGLContextLost = function () {\n        clear(
 this.bufferCache_);\n        this.currentProgram_ = null;\n    };\n    /**\n     * WebGL context was restored\n     * @private\n     */\n    WebGLHelper.prototype.handleWebGLContextRestored = function () { };\n    /**\n     * Will create or reuse a given webgl texture and apply the given size. If no image data\n     * specified, the texture will be empty, otherwise image data will be used and the `size`\n     * parameter will be ignored.\n     * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n     * @param {Array<number>} size Expected size of the texture\n     * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [opt_data] Image data/object to bind to the texture\n     * @param {WebGLTexture} [opt_texture] Existing texture to reuse\n     * @return {WebGLTexture} The generated texture\n     * @api\n     */\n    WebGLHelper.prototype.createTexture = function (size, opt_data, opt_texture) {\n        var gl = this.getGL();\n        var texture = opt_tex
 ture || gl.createTexture();\n        // set params & size\n        var level = 0;\n        var internalFormat = gl.RGBA;\n        var border = 0;\n        var format = gl.RGBA;\n        var type = gl.UNSIGNED_BYTE;\n        gl.bindTexture(gl.TEXTURE_2D, texture);\n        if (opt_data) {\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, opt_data);\n        }\n        else {\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, size[0], size[1], border, format, type, null);\n        }\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n        return texture;\n    };\n    return WebGLHelper;\n}(Disposable));\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @returns {n
 umber} Stride, ie amount of values for each vertex in the vertex buffer\n * @api\n */\nexport function computeAttributesStride(attributes) {\n    var stride = 0;\n    for (var i = 0; i < attributes.length; i++) {\n        var attr = attributes[i];\n        stride += attr.size * getByteSizeFromType(attr.type);\n    }\n    return stride;\n}\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @returns {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n    switch (type) {\n        case AttributeType.UNSIGNED_BYTE:\n            return Uint8Array.BYTES_PER_ELEMENT;\n        case AttributeType.UNSIGNED_SHORT:\n            return Uint16Array.BYTES_PER_ELEMENT;\n        case AttributeType.UNSIGNED_INT:\n            return Uint32Array.BYTES_PER_ELEMENT;\n        case AttributeType.FLOAT:\n        default:\n            return Float32Array.BYTES_PER_ELEMENT;\n    }\n}\nexport default WebGLHelper;\n//# sourceMappingURL=H
 elper.js.map","/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport { equals } from '../array.js';\n// for pixel color reading\nvar tmpArray4 = new Uint8Array(4);\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n * @api\n */\nvar WebGLRenderTarget = /** @class */ (function () {\n    /**\n     * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n     * @param {Array<number>} [opt_size] Expected size of the render target texture; note: this can be changed later on.\n     */\n    function WebGLRenderTarget(helper, opt_size) {\n        /**\n         * @private\n         * @type {import(\"./Helper.js\").default}\n         */\n        this.helper_ = helper;\n        var gl = helper.getGL();\n        /**\n         * @private\n         * @type {WebG
 LTexture}\n         */\n        this.texture_ = gl.createTexture();\n        /**\n         * @private\n         * @type {WebGLFramebuffer}\n         */\n        this.framebuffer_ = gl.createFramebuffer();\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        this.size_ = opt_size || [1, 1];\n        /**\n         * @type {Uint8Array}\n         * @private\n         */\n        this.data_ = new Uint8Array(0);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.dataCacheDirty_ = true;\n        this.updateSize_();\n    }\n    /**\n     * Changes the size of the render target texture. Note: will do nothing if the size\n     * is already the same.\n     * @param {Array<number>} size Expected size of the render target texture\n     * @api\n     */\n    WebGLRenderTarget.prototype.setSize = function (size) {\n        if (equals(size, this.size_)) {\n            return;\n        }\n        this.size_[0] = size[0];\n    
     this.size_[1] = size[1];\n        this.updateSize_();\n    };\n    /**\n     * Returns the size of the render target texture\n     * @return {Array<number>} Size of the render target texture\n     * @api\n     */\n    WebGLRenderTarget.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n     * render target into memory, which is an expensive operation.\n     * This content will be kept in cache but should be cleared after each new render.\n     * @api\n     */\n    WebGLRenderTarget.prototype.clearCachedData = function () {\n        this.dataCacheDirty_ = true;\n    };\n    /**\n     * Returns the full content of the frame buffer as a series of r, g, b, a components\n     * in the 0-255 range (unsigned byte).\n     * @return {Uint8Array} Integer array of color values\n     * @api\n     */\n    WebGLRenderTarget.prototype.readAll = function () {\n      
   if (this.dataCacheDirty_) {\n            var size = this.size_;\n            var gl = this.helper_.getGL();\n            gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n            gl.readPixels(0, 0, size[0], size[1], gl.RGBA, gl.UNSIGNED_BYTE, this.data_);\n            this.dataCacheDirty_ = false;\n        }\n        return this.data_;\n    };\n    /**\n     * Reads one pixel of the frame buffer as an array of r, g, b, a components\n     * in the 0-255 range (unsigned byte).\n     * If x and/or y are outside of existing data, an array filled with 0 is returned.\n     * @param {number} x Pixel coordinate\n     * @param {number} y Pixel coordinate\n     * @returns {Uint8Array} Integer array with one color value (4 components)\n     * @api\n     */\n    WebGLRenderTarget.prototype.readPixel = function (x, y) {\n        if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n            tmpArray4[0] = 0;\n            tmpArray4[1] = 0;\n            tmpArray4[2] = 0
 ;\n            tmpArray4[3] = 0;\n            return tmpArray4;\n        }\n        this.readAll();\n        var index = Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n        tmpArray4[0] = this.data_[index * 4];\n        tmpArray4[1] = this.data_[index * 4 + 1];\n        tmpArray4[2] = this.data_[index * 4 + 2];\n        tmpArray4[3] = this.data_[index * 4 + 3];\n        return tmpArray4;\n    };\n    /**\n     * @return {WebGLTexture} Texture to render to\n     */\n    WebGLRenderTarget.prototype.getTexture = function () {\n        return this.texture_;\n    };\n    /**\n     * @return {WebGLFramebuffer} Frame buffer of the render target\n     */\n    WebGLRenderTarget.prototype.getFramebuffer = function () {\n        return this.framebuffer_;\n    };\n    /**\n     * @private\n     */\n    WebGLRenderTarget.prototype.updateSize_ = function () {\n        var size = this.size_;\n        var gl = this.helper_.getGL();\n        this.texture_ = this.helper_.cre
 ateTexture(size, null, this.texture_);\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture_, 0);\n        this.data_ = new Uint8Array(size[0] * size[1] * 4);\n    };\n    return WebGLRenderTarget;\n}());\nexport default WebGLRenderTarget;\n//# sourceMappingURL=RenderTarget.js.map","/**\n * @module ol/tilegrid/WMTS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === n
 ull ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileGrid from './TileGrid.js';\nimport { find } from '../array.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles\n * outside this extent will be requested by {@link module:ol/source/Tile} sources.\n * When no `origin` or `origins` are configured, the `origin` will be set to the\n * top-left corner of the extent.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e.\n * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left\n * to right and downwards. If not specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins,\n * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If\n * given, the array length s
 hould match the length of the `resolutions` array, i.e.\n * each resolution can have a different origin. Tile coordinates increase left to\n * right and downwards. If not specified, `extent` or `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each\n * resolution needs to match the zoom level. This means that even if a `minZoom`\n * is configured, the resolutions array will have a length of `maxZoom + 1`\n * @property {!Array<string>} matrixIds matrix IDs. The length of this array needs\n * to match the length of the `resolutions` array.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. The values here are the `TileMatrixWidth` and\n * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further
  limit the extent for\n * which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. The length of\n * this array needs to match the length of the `resolutions` array.\n */\n/**\n * @classdesc\n * Set the grid pattern for sources accessing WMTS tiled-image servers.\n * @api\n */\nvar WMTSTileGrid = /** @class */ (function (_super) {\n    __extends(WMTSTileGrid, _super);\n    /**\n     * @param {Options} options WMTS options.\n     */\n    function WMTSTileGrid(options) {\n        var _this = _super.call(this, {\n            extent: options.extent,\n            origin: options.origin,\n            origins: options.origins,\n            resolutions: options.resolutions,\n    
         tileSize: options.tileSize,\n            tileSizes: options.tileSizes,\n            sizes: options.sizes,\n        }) || this;\n        /**\n         * @private\n         * @type {!Array<string>}\n         */\n        _this.matrixIds_ = options.matrixIds;\n        return _this;\n    }\n    /**\n     * @param {number} z Z.\n     * @return {string} MatrixId..\n     */\n    WMTSTileGrid.prototype.getMatrixId = function (z) {\n        return this.matrixIds_[z];\n    };\n    /**\n     * Get the list of matrix identifiers.\n     * @return {Array<string>} MatrixIds.\n     * @api\n     */\n    WMTSTileGrid.prototype.getMatrixIds = function () {\n        return this.matrixIds_;\n    };\n    return WMTSTileGrid;\n}(TileGrid));\nexport default WMTSTileGrid;\n/**\n * Create a tile grid from a WMTS capabilities matrix set and an\n * optional TileMatrixSetLimits.\n * @param {Object} matrixSet An object representing a matrixSet in the\n *     capabilities document.\n * @param {import(\"../
 extent.js\").Extent=} opt_extent An optional extent to restrict the tile\n *     ranges the server provides.\n * @param {Array<Object>=} opt_matrixLimits An optional object representing\n *     the available matrices for tileGrid.\n * @return {WMTSTileGrid} WMTS tileGrid instance.\n * @api\n */\nexport function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) {\n    /** @type {!Array<number>} */\n    var resolutions = [];\n    /** @type {!Array<string>} */\n    var matrixIds = [];\n    /** @type {!Array<import(\"../coordinate.js\").Coordinate>} */\n    var origins = [];\n    /** @type {!Array<import(\"../size.js\").Size>} */\n    var tileSizes = [];\n    /** @type {!Array<import(\"../size.js\").Size>} */\n    var sizes = [];\n    var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];\n    var supportedCRSPropName = 'SupportedCRS';\n    var matrixIdsPropName = 'TileMatrix';\n    var identifierPropName = 'Identifier';\n    var scaleDenominat
 orPropName = 'ScaleDenominator';\n    var topLeftCornerPropName = 'TopLeftCorner';\n    var tileWidthPropName = 'TileWidth';\n    var tileHeightPropName = 'TileHeight';\n    var code = matrixSet[supportedCRSPropName];\n    var projection = getProjection(code.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) || getProjection(code);\n    var metersPerUnit = projection.getMetersPerUnit();\n    // swap origin x and y coordinates if axis orientation is lat/long\n    var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n    matrixSet[matrixIdsPropName].sort(function (a, b) {\n        return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];\n    });\n    matrixSet[matrixIdsPropName].forEach(function (elt) {\n        var matrixAvailable;\n        // use of matrixLimits to filter TileMatrices from GetCapabilities\n        // TileMatrixSet from unavailable matrix levels.\n        if (matrixLimits.length > 0) {\n            matrixAvailable = find(matrixLi
 mits, function (elt_ml) {\n                if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {\n                    return true;\n                }\n                // Fallback for tileMatrix identifiers that don't get prefixed\n                // by their tileMatrixSet identifiers.\n                if (elt[identifierPropName].indexOf(':') === -1) {\n                    return (matrixSet[identifierPropName] + ':' + elt[identifierPropName] ===\n                        elt_ml[matrixIdsPropName]);\n                }\n                return false;\n            });\n        }\n        else {\n            matrixAvailable = true;\n        }\n        if (matrixAvailable) {\n            matrixIds.push(elt[identifierPropName]);\n            var resolution = (elt[scaleDenominatorPropName] * 0.28e-3) / metersPerUnit;\n            var tileWidth = elt[tileWidthPropName];\n            var tileHeight = elt[tileHeightPropName];\n            if (switchOriginXY) {\n                origins.push
 ([\n                    elt[topLeftCornerPropName][1],\n                    elt[topLeftCornerPropName][0],\n                ]);\n            }\n            else {\n                origins.push(elt[topLeftCornerPropName]);\n            }\n            resolutions.push(resolution);\n            tileSizes.push(tileWidth == tileHeight ? tileWidth : [tileWidth, tileHeight]);\n            sizes.push([elt['MatrixWidth'], elt['MatrixHeight']]);\n        }\n    });\n    return new WMTSTileGrid({\n        extent: opt_extent,\n        origins: origins,\n        resolutions: resolutions,\n        matrixIds: matrixIds,\n        tileSizes: tileSizes,\n        sizes: sizes,\n    });\n}\n//# sourceMappingURL=WMTS.js.map","/**\n * @module ol/style/Image\n */\nimport { abstract } from '../util.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {number} opacity\n * @property {boolean} rotateWithView\n * @property {number} rotation\n * @property {number|import(\"
 ../size.js\").Size} scale\n * @property {Array<number>} displacement\n */\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nvar ImageStyle = /** @class */ (function () {\n    /**\n     * @param {Options} options Options.\n     */\n    function ImageStyle(options) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.opacity_ = options.opacity;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.rotateWithView_ = options.rotateWithView;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.rotation_ = options.rotation;\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size}\n         */\n        this.scale_ = options.sc
 ale;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.scaleArray_ = toSize(options.scale);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.displacement_ = options.displacement;\n    }\n    /**\n     * Clones the style.\n     * @return {ImageStyle} The cloned style.\n     * @api\n     */\n    ImageStyle.prototype.clone = function () {\n        var scale = this.getScale();\n        return new ImageStyle({\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n        });\n    };\n    /**\n     * Get the symbolizer opacity.\n     * @return {number} Opacity.\n     * @api\n     */\n    ImageStyle.prototype.getOpacity = function () {\n        return this.opacity_;\n    };\n    
 /**\n     * Determine whether the symbolizer rotates with the map.\n     * @return {boolean} Rotate with map.\n     * @api\n     */\n    ImageStyle.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Get the symoblizer rotation.\n     * @return {number} Rotation.\n     * @api\n     */\n    ImageStyle.prototype.getRotation = function () {\n        return this.rotation_;\n    };\n    /**\n     * Get the symbolizer scale.\n     * @return {number|import(\"../size.js\").Size} Scale.\n     * @api\n     */\n    ImageStyle.prototype.getScale = function () {\n        return this.scale_;\n    };\n    /**\n     * Get the symbolizer scale array.\n     * @return {import(\"../size.js\").Size} Scale array.\n     */\n    ImageStyle.prototype.getScaleArray = function () {\n        return this.scaleArray_;\n    };\n    /**\n     * Get the displacement of the shape\n     * @return {Array<number>} Shape's center displacement\n     * @api\n     */\n
     ImageStyle.prototype.getDisplacement = function () {\n        return this.displacement_;\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @abstract\n     * @return {Array<number>} Anchor.\n     */\n    ImageStyle.prototype.getAnchor = function () {\n        return abstract();\n    };\n    /**\n     * Get the image element for the symbolizer.\n     * @abstract\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n     */\n    ImageStyle.prototype.getImage = function (pixelRatio) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n     */\n    ImageStyle.prototype.getHitDetectionImage = function (pixelRatio) {\n        return abstract();\n    };\n    /*\n     * Get the image p
 ixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * */\n    ImageStyle.prototype.getPixelRatio = function (pixelRatio) {\n        return 1;\n    };\n    /**\n     * @abstract\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    ImageStyle.prototype.getImageState = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    ImageStyle.prototype.getImageSize = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n     */\n    ImageStyle.prototype.getHitDetectionImageSize = function () {\n        return abstract();\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @abstract\n     * @return {Array<number>} Origin.\n     */\n    ImageStyle.prototype.getOrigin = function () {\n        return abstract();\n    };\n    /**\n     * Get the siz
 e of the symbolizer (in pixels).\n     * @abstract\n     * @return {import(\"../size.js\").Size} Size.\n     */\n    ImageStyle.prototype.getSize = function () {\n        return abstract();\n    };\n    /**\n     * Set the opacity.\n     *\n     * @param {number} opacity Opacity.\n     * @api\n     */\n    ImageStyle.prototype.setOpacity = function (opacity) {\n        this.opacity_ = opacity;\n    };\n    /**\n     * Set whether to rotate the style with the view.\n     *\n     * @param {boolean} rotateWithView Rotate with map.\n     * @api\n     */\n    ImageStyle.prototype.setRotateWithView = function (rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    };\n    /**\n     * Set the rotation.\n     *\n     * @param {number} rotation Rotation.\n     * @api\n     */\n    ImageStyle.prototype.setRotation = function (rotation) {\n        this.rotation_ = rotation;\n    };\n    /**\n     * Set the scale.\n     *\n     * @param {number|import(\"../size.js\").Size} scale
  Scale.\n     * @api\n     */\n    ImageStyle.prototype.setScale = function (scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = toSize(scale);\n    };\n    /**\n     * @abstract\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    ImageStyle.prototype.listenImageChange = function (listener) {\n        abstract();\n    };\n    /**\n     * Load not yet loaded URI.\n     * @abstract\n     */\n    ImageStyle.prototype.load = function () {\n        abstract();\n    };\n    /**\n     * @abstract\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    ImageStyle.prototype.unlistenImageChange = function (listener) {\n        abstract();\n    };\n    return ImageStyle;\n}());\nexport default ImageStyle;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/style/RegularShape\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendSta
 tics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { asColorLike } from '../colorlike.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { defaultFillStyle, defaultLineCap, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../render/canvas.js';\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Opti
 ons\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] Outer radius of a star.\n * @property {number} [radius2] Inner radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {Array<number>} [displacement=[0,0]] Displacement of the shape\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n */\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {number} strokeWidth\n * @proper
 ty {number} size\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} miterLimit\n */\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nvar RegularShape = /** @class */ (function (_super) {\n    __extends(RegularShape, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function RegularShape(options) {\n        var _this = this;\n        /**\n         * @type {boolean}\n         */\n        var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        _this = _super.call(this, {\n            opacity: 1,\n            rotateWithView: rotateWithView,\n            rotation: options.rotation !== undefined ? options.rotation : 0,\n          
   scale: 1,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n        }) || this;\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.canvas_ = {};\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.hitDetectionCanvas_ = {};\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        _this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.origin_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.points_ = options.points;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.radius_ =\n            options.radius !== undefined ? options.radius : options.radius1;\n        /**\n     
     * @private\n         * @type {number|undefined}\n         */\n        _this.radius2_ = options.radius2;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.angle_ = options.angle !== undefined ? options.angle : 0;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        _this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.hitDetectionImageSize_ = null;\n        _this.render();\n        return _this;\n    }\n  
   /**\n     * Clones the style.\n     * @return {RegularShape} The cloned style.\n     * @api\n     */\n    RegularShape.prototype.clone = function () {\n        var style = new RegularShape({\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            points: this.getPoints(),\n            radius: this.getRadius(),\n            radius2: this.getRadius2(),\n            angle: this.getAngle(),\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n        });\n        style.setOpacity(this.getOpacity());\n        style.setScale(this.getScale());\n        return style;\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @return {Array<number>} Anchor.\n     * @api\n     */\n    RegularShape.prototype.get
 Anchor = function () {\n        return this.anchor_;\n    };\n    /**\n     * Get the angle used in generating the shape.\n     * @return {number} Shape's rotation in radians.\n     * @api\n     */\n    RegularShape.prototype.getAngle = function () {\n        return this.angle_;\n    };\n    /**\n     * Get the fill style for the shape.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    RegularShape.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement} Image element.\n     */\n    RegularShape.prototype.getHitDetectionImage = function (pixelRatio) {\n        if (!this.hitDetectionCanvas_[pixelRatio || 1]) {\n            var renderOptions = this.createRenderOptions();\n            this.createHitDetectionCanvas_(renderOptions, pixelRatio || 1);\n        }\n        return this.hitDetectionCanvas_[pixelRatio || 1];\n    };\n    /**\n     * Get 
 the image icon.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement} Image or Canvas element.\n     * @api\n     */\n    RegularShape.prototype.getImage = function (pixelRatio) {\n        if (!this.canvas_[pixelRatio || 1]) {\n            var renderOptions = this.createRenderOptions();\n            var context = createCanvasContext2D(renderOptions.size * pixelRatio || 1, renderOptions.size * pixelRatio || 1);\n            this.draw_(renderOptions, context, 0, 0, pixelRatio || 1);\n            this.canvas_[pixelRatio || 1] = context.canvas;\n        }\n        return this.canvas_[pixelRatio || 1];\n    };\n    /*\n     * Get the image pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * */\n    RegularShape.prototype.getPixelRatio = function (pixelRatio) {\n        return pixelRatio;\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    RegularShape.prototype.getImageSize = function () {\n        return
  this.imageSize_;\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n     */\n    RegularShape.prototype.getHitDetectionImageSize = function () {\n        return this.hitDetectionImageSize_;\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    RegularShape.prototype.getImageState = function () {\n        return ImageState.LOADED;\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @return {Array<number>} Origin.\n     * @api\n     */\n    RegularShape.prototype.getOrigin = function () {\n        return this.origin_;\n    };\n    /**\n     * Get the number of points for generating the shape.\n     * @return {number} Number of points for stars and regular polygons.\n     * @api\n     */\n    RegularShape.prototype.getPoints = function () {\n        return this.points_;\n    };\n    /**\n     * Get the (primary) radius for the shape.\n     * @return {number} Radius.\n     * @api\n
      */\n    RegularShape.prototype.getRadius = function () {\n        return this.radius_;\n    };\n    /**\n     * Get the secondary radius for the shape.\n     * @return {number|undefined} Radius2.\n     * @api\n     */\n    RegularShape.prototype.getRadius2 = function () {\n        return this.radius2_;\n    };\n    /**\n     * Get the size of the symbolizer (in pixels).\n     * @return {import(\"../size.js\").Size} Size.\n     * @api\n     */\n    RegularShape.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * Get the stroke style for the shape.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    RegularShape.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    RegularShape.prototype.listenImageChange = function (listener) { };\n    /**\n     * Load not yet loade
 d URI.\n     */\n    RegularShape.prototype.load = function () { };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    RegularShape.prototype.unlistenImageChange = function (listener) { };\n    /**\n     * @returns {RenderOptions}  The render options\n     * @protected\n     */\n    RegularShape.prototype.createRenderOptions = function () {\n        var lineCap = defaultLineCap;\n        var lineJoin = defaultLineJoin;\n        var miterLimit = 0;\n        var lineDash = null;\n        var lineDashOffset = 0;\n        var strokeStyle;\n        var strokeWidth = 0;\n        if (this.stroke_) {\n            strokeStyle = this.stroke_.getColor();\n            if (strokeStyle === null) {\n                strokeStyle = defaultStrokeStyle;\n            }\n            strokeStyle = asColorLike(strokeStyle);\n            strokeWidth = this.stroke_.getWidth();\n            if (strokeWidth === undefined) {\n              
   strokeWidth = defaultLineWidth;\n            }\n            lineDash = this.stroke_.getLineDash();\n            lineDashOffset = this.stroke_.getLineDashOffset();\n            lineJoin = this.stroke_.getLineJoin();\n            if (lineJoin === undefined) {\n                lineJoin = defaultLineJoin;\n            }\n            lineCap = this.stroke_.getLineCap();\n            if (lineCap === undefined) {\n                lineCap = defaultLineCap;\n            }\n            miterLimit = this.stroke_.getMiterLimit();\n            if (miterLimit === undefined) {\n                miterLimit = defaultMiterLimit;\n            }\n        }\n        var size = 2 * (this.radius_ + strokeWidth) + 1;\n        return {\n            strokeStyle: strokeStyle,\n            strokeWidth: strokeWidth,\n            size: size,\n            lineCap: lineCap,\n            lineDash: lineDash,\n            lineDashOffset: lineDashOffset,\n            lineJoin: lineJoin,\n            miterLimit: miter
 Limit,\n        };\n    };\n    /**\n     * @protected\n     */\n    RegularShape.prototype.render = function () {\n        var renderOptions = this.createRenderOptions();\n        var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n        this.draw_(renderOptions, context, 0, 0, 1);\n        this.canvas_[1] = context.canvas;\n        // canvas.width and height are rounded to the closest integer\n        var size = context.canvas.width;\n        var imageSize = size;\n        var displacement = this.getDisplacement();\n        this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];\n        this.createHitDetectionCanvas_(renderOptions, 1);\n        this.anchor_ = [size / 2 - displacement[0], size / 2 + displacement[1]];\n        this.size_ = [size, size];\n        this.imageSize_ = [imageSize, imageSize];\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {CanvasRenderingContext2D} 
 context The rendering context.\n     * @param {number} x The origin for the symbol (x).\n     * @param {number} y The origin for the symbol (y).\n     * @param {number} pixelRatio The pixel ratio.\n     */\n    RegularShape.prototype.draw_ = function (renderOptions, context, x, y, pixelRatio) {\n        var i, angle0, radiusC;\n        // reset transform\n        context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n        // then move to (x, y)\n        context.translate(x, y);\n        context.beginPath();\n        var points = this.points_;\n        if (points === Infinity) {\n            context.arc(renderOptions.size / 2, renderOptions.size / 2, this.radius_, 0, 2 * Math.PI, true);\n        }\n        else {\n            var radius2 = this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n            if (radius2 !== this.radius_) {\n                points = 2 * points;\n            }\n            for (i = 0; i <= points; i++) {\n                angle0 = (i * 2 * Mat
 h.PI) / points - Math.PI / 2 + this.angle_;\n                radiusC = i % 2 === 0 ? this.radius_ : radius2;\n                context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0), renderOptions.size / 2 + radiusC * Math.sin(angle0));\n            }\n        }\n        if (this.fill_) {\n            var color = this.fill_.getColor();\n            if (color === null) {\n                color = defaultFillStyle;\n            }\n            context.fillStyle = asColorLike(color);\n            context.fill();\n        }\n        if (this.stroke_) {\n            context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (context.setLineDash && renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.lineCap = renderOptions.lineCap;\n            context.lineJoin = renderOpti
 ons.lineJoin;\n            context.miterLimit = renderOptions.miterLimit;\n            context.stroke();\n        }\n        context.closePath();\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {number} pixelRatio The pixel ratio.\n     */\n    RegularShape.prototype.createHitDetectionCanvas_ = function (renderOptions, pixelRatio) {\n        this.hitDetectionCanvas_[pixelRatio] = this.getImage(pixelRatio);\n        if (this.fill_) {\n            var color = this.fill_.getColor();\n            // determine if fill is transparent (or pattern or gradient)\n            var opacity = 0;\n            if (typeof color === 'string') {\n                color = asArray(color);\n            }\n            if (color === null) {\n                opacity = 1;\n            }\n            else if (Array.isArray(color)) {\n                opacity = color.length === 4 ? color[3] : 1;\n            }\n            if (opacity === 0) {\n      
           // if a transparent fill style is set, create an extra hit-detection image\n                // with a default fill style\n                var context = createCanvasContext2D(renderOptions.size * pixelRatio, renderOptions.size * pixelRatio);\n                this.hitDetectionCanvas_[pixelRatio] = context.canvas;\n                this.drawHitDetectionCanvas_(renderOptions, context, 0, 0, pixelRatio);\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {CanvasRenderingContext2D} context The context.\n     * @param {number} x The origin for the symbol (x).\n     * @param {number} y The origin for the symbol (y).\n     * @param {number} pixelRatio The pixel ratio.\n     */\n    RegularShape.prototype.drawHitDetectionCanvas_ = function (renderOptions, context, x, y, pixelRatio) {\n        // reset transform\n        context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n        // then move t
 o (x, y)\n        context.translate(x, y);\n        context.beginPath();\n        var points = this.points_;\n        if (points === Infinity) {\n            context.arc(renderOptions.size / 2, renderOptions.size / 2, this.radius_, 0, 2 * Math.PI, true);\n        }\n        else {\n            var radius2 = this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n            if (radius2 !== this.radius_) {\n                points = 2 * points;\n            }\n            var i = void 0, radiusC = void 0, angle0 = void 0;\n            for (i = 0; i <= points; i++) {\n                angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n                radiusC = i % 2 === 0 ? this.radius_ : radius2;\n                context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0), renderOptions.size / 2 + radiusC * Math.sin(angle0));\n            }\n        }\n        context.fillStyle = defaultFillStyle;\n        context.fill();\n        if (this.stroke_) {\n       
      context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.stroke();\n        }\n        context.closePath();\n    };\n    return RegularShape;\n}(ImageStyle));\nexport default RegularShape;\n//# sourceMappingURL=RegularShape.js.map","/**\n * @module ol/style/Circle\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function
  __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport RegularShape from './RegularShape.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n */\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nvar CircleStyle = /** @class */ (function (_super) {\n    __extends(CircleStyle, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function CircleStyle(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            points: Infinity,\n            fill: options.fill,\n            radius: options.radius,\n            stroke: options.s
 troke,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n        }) || this;\n        return _this;\n    }\n    /**\n     * Clones the style.\n     * @return {CircleStyle} The cloned style.\n     * @api\n     */\n    CircleStyle.prototype.clone = function () {\n        var style = new CircleStyle({\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            radius: this.getRadius(),\n            displacement: this.getDisplacement().slice(),\n        });\n        style.setOpacity(this.getOpacity());\n        style.setScale(this.getScale());\n        return style;\n    };\n    /**\n     * Set the circle radius.\n     *\n     * @param {number} radius Circle radius.\n     * @api\n     */\n    CircleStyle.prototype.setRadius = function (radius) {\n        this.radius_ = radius;\n        this.render();\n    };\n    return CircleStyle;\n}(Regu
 larShape));\nexport default CircleStyle;\n//# sourceMappingURL=Circle.js.map","/**\n * @module ol/style/Fill\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nvar Fill = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Fill(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n         */\n        this.color_ = options.color !== undefined ? options.color : null;\n    }\n    /**\n     * Clones the style. The color is not cloned if it i
 s an {@link module:ol/colorlike~ColorLike}.\n     * @return {Fill} The cloned style.\n     * @api\n     */\n    Fill.prototype.clone = function () {\n        var color = this.getColor();\n        return new Fill({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n        });\n    };\n    /**\n     * Get the fill color.\n     * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n     * @api\n     */\n    Fill.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Set the color.\n     *\n     * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n     * @api\n     */\n    Fill.prototype.setColor = function (color) {\n        this.color_ = color;\n    };\n    return Fill;\n}());\nexport default Fill;\n//# sourceMappingURL=Fill.js.map","/**\n * @module ol/style/IconAnchorUnits\n */\n/**\n * Icon anchor units. One of 'fraction', 'pixels'.\n * @enum {stri
 ng}\n */\nexport default {\n    /**\n     * Anchor is a fraction\n     * @api\n     */\n    FRACTION: 'fraction',\n    /**\n     * Anchor is in pixels\n     * @api\n     */\n    PIXELS: 'pixels',\n};\n//# sourceMappingURL=IconAnchorUnits.js.map","/**\n * @module ol/style/IconOrigin\n */\n/**\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n * @enum {string}\n */\nexport default {\n    /**\n     * Origin is at bottom left\n     * @api\n     */\n    BOTTOM_LEFT: 'bottom-left',\n    /**\n     * Origin is at bottom right\n     * @api\n     */\n    BOTTOM_RIGHT: 'bottom-right',\n    /**\n     * Origin is at top left\n     * @api\n     */\n    TOP_LEFT: 'top-left',\n    /**\n     * Origin is at top right\n     * @api\n     */\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=IconOrigin.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n       
      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageBase\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { abstract } from './util.js';\n/**\n * @abstract\n */\nvar ImageBase = /** @class */ (function (_super) {\n    __extends(ImageBase, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./ImageState.js\").default} state State.\n     */\n    function ImageBase(ext
 ent, resolution, pixelRatio, state) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.extent = extent;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @protected\n         * @type {number|undefined}\n         */\n        _this.resolution = resolution;\n        /**\n         * @protected\n         * @type {import(\"./ImageState.js\").default}\n         */\n        _this.state = state;\n        return _this;\n    }\n    /**\n     * @protected\n     */\n    ImageBase.prototype.changed = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * @return {import(\"./extent.js\").Extent} Extent.\n     */\n    ImageBase.prototype.getExtent = function () {\n        return this.extent;\n    };\n    /**\n     * @abstract\n     * @return {HTMLCanvasElement|HTMLIma
 geElement|HTMLVideoElement} Image.\n     */\n    ImageBase.prototype.getImage = function () {\n        return abstract();\n    };\n    /**\n     * @return {number} PixelRatio.\n     */\n    ImageBase.prototype.getPixelRatio = function () {\n        return this.pixelRatio_;\n    };\n    /**\n     * @return {number} Resolution.\n     */\n    ImageBase.prototype.getResolution = function () {\n        return /** @type {number} */ (this.resolution);\n    };\n    /**\n     * @return {import(\"./ImageState.js\").default} State.\n     */\n    ImageBase.prototype.getState = function () {\n        return this.state;\n    };\n    /**\n     * Load not yet loaded URI.\n     * @abstract\n     */\n    ImageBase.prototype.load = function () {\n        abstract();\n    };\n    return ImageBase;\n}(EventTarget));\nexport default ImageBase;\n//# sourceMappingURL=ImageBase.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStati
 cs = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Image\n */\nimport EventType from './events/EventType.js';\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport { IMAGE_DECODE } from './has.js';\nimport { getHeight } from './extent.js';\nimport { listenOnce, unlistenByKey } from './events.js';\n/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~Image#getImage
 } is assigned the\n * content specified by the src. If not specified, the default is\n *\n *     function(image, src) {\n *       image.getImage().src = src;\n *     }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\nvar ImageWrapper = /** @class */ (function (_super) {\n    __extends(ImageWrapper, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {LoadFunction} imageLoadFunction Image load function.\n     */\n    function ImageWrapper(extent, resolution, pixelRatio, src, cros
 sOrigin, imageLoadFunction) {\n        var _this = _super.call(this, extent, resolution, pixelRatio, ImageState.IDLE) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n         */\n        _this.image_ = new Image();\n        if (crossOrigin !== null) {\n            _this.image_.crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @protected\n         * @type {import(\"./ImageState.js\").default}\n         */\n        _this.state = ImageState.IDLE;\n        /**\n         * @private\n         * @type {LoadFunction}\n         */\n        _this.imageLoadFunction_ = imageLoadFunction;\n        return _this;\n    }\n    /**\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
 \n     * @api\n     */\n    ImageWrapper.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * Tracks loading or read errors.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.handleImageError_ = function () {\n        this.state = ImageState.ERROR;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Tracks successful image load.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.handleImageLoad_ = function () {\n        if (this.resolution === undefined) {\n            this.resolution = getHeight(this.extent) / this.image_.height;\n        }\n        this.state = ImageState.LOADED;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Load the image or retry if loading previously failed.\n     * Loading is taken care of by the tile queue, and calling this method is\n     * only needed for preloading or for reloading in case of an error.\n     * @api\n     */\n    Imag
 eWrapper.prototype.load = function () {\n        if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            this.imageLoadFunction_(this, this.src_);\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n     */\n    ImageWrapper.prototype.setImage = function (image) {\n        this.image_ = image;\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return ImageWrapper;\n}(ImageBase));\n/**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} 
 image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n    var img = /** @type {HTMLImageElement} */ (image);\n    if (img.src && IMAGE_DECODE) {\n        var promise = img.decode();\n        var listening_1 = true;\n        var unlisten = function () {\n            listening_1 = false;\n        };\n        promise\n            .then(function () {\n            if (listening_1) {\n                loadHandler();\n            }\n        })\n            .catch(function (error) {\n            if (listening_1) {\n                // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream:\n                //        https://bugs.webkit.org/show_bug.cgi?id=198527\n                if (error.name === 'EncodingError' &&\n                    error.message 
 === 'Invalid image type.') {\n                    loadHandler();\n                }\n                else {\n                    errorHandler();\n                }\n            }\n        });\n        return unlisten;\n    }\n    var listenerKeys = [\n        listenOnce(img, EventType.LOAD, loadHandler),\n        listenOnce(img, EventType.ERROR, errorHandler),\n    ];\n    return function unlisten() {\n        listenerKeys.forEach(unlistenByKey);\n    };\n}\nexport default ImageWrapper;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/style/IconImage\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendSta
 tics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { shared as iconImageCache } from './IconImageCache.js';\nimport { listenImage } from '../Image.js';\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar taintedTestContext = null;\nvar IconImage = /** @class */ (function (_super) {\n    __extends(IconImage, _super);\n    /**\n     * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n     * @param {string|undefined} src Src.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../ImageState.js\").default} imageState Image state.\n     * @param {import(\"../color.js\").Color} color Col
 or.\n     */\n    function IconImage(image, src, size, crossOrigin, imageState, color) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {Object<number, HTMLImageElement|HTMLCanvasElement>}\n         */\n        _this.hitDetectionImage_ = {};\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.image_ = !image ? new Image() : image;\n        if (crossOrigin !== null) {\n            /** @type {HTMLImageElement} */ (_this.image_).crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.canvas_ = {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color}\n         */\n        _this.color_ = color;\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @private\n 
         * @type {import(\"../ImageState.js\").default}\n         */\n        _this.imageState_ = imageState;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = size;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         */\n        _this.tainted_;\n        return _this;\n    }\n    /**\n     * @private\n     * @return {boolean} The image canvas is tainted.\n     */\n    IconImage.prototype.isTainted_ = function () {\n        if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n            if (!taintedTestContext) {\n                taintedTestContext = createCanvasContext2D(1, 1);\n            }\n            taintedTestContext.drawImage(this.image_, 0, 0);\n            try {\n                taintedTestContext.getImageData(0, 0, 1, 1);\n                this.tainted_ = false;\n            }\n  
           catch (e) {\n                taintedTestContext = null;\n                this.tainted_ = true;\n            }\n        }\n        return this.tainted_ === true;\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.dispatchChangeEvent_ = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.handleImageError_ = function () {\n        this.imageState_ = ImageState.ERROR;\n        this.unlistenImage_();\n        this.dispatchChangeEvent_();\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.handleImageLoad_ = function () {\n        this.imageState_ = ImageState.LOADED;\n        if (this.size_) {\n            this.image_.width = this.size_[0];\n            this.image_.height = this.size_[1];\n        }\n        else {\n            this.size_ = [this.image_.width, this.image_.height];\n        }\n        this.unlistenImage_();\n        this.dispatchChangeEvent_();\n    };\n
     /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n     */\n    IconImage.prototype.getImage = function (pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Image or Canvas element.\n     */\n    IconImage.prototype.getPixelRatio = function (pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? pixelRatio : 1;\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    IconImage.prototype.getImageState = function () {\n        return this.imageState_;\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n     */\n    IconImage.prototype.getHitDetectionImage = function
  (pixelRatio) {\n        if (!this.hitDetectionImage_[pixelRatio]) {\n            if (this.isTainted_()) {\n                var usedPixelRatio = this.color_ ? pixelRatio : 1;\n                var width = this.size_[0];\n                var height = this.size_[1];\n                var context = createCanvasContext2D(Math.ceil(width * usedPixelRatio), Math.ceil(height * usedPixelRatio));\n                context.scale(usedPixelRatio, usedPixelRatio);\n                context.fillRect(0, 0, width, height);\n                this.hitDetectionImage_[pixelRatio] = context.canvas;\n            }\n            else {\n                this.hitDetectionImage_[pixelRatio] = this.image_;\n            }\n        }\n        return this.hitDetectionImage_[pixelRatio];\n    };\n    /**\n     * Get the size of the icon (in pixels).\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    IconImage.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * @re
 turn {string|undefined} Image src.\n     */\n    IconImage.prototype.getSrc = function () {\n        return this.src_;\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    IconImage.prototype.load = function () {\n        if (this.imageState_ == ImageState.IDLE) {\n            this.imageState_ = ImageState.LOADING;\n            try {\n                /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n            }\n            catch (e) {\n                this.handleImageError_();\n            }\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @private\n     */\n    IconImage.prototype.replaceColor_ = function (pixelRatio) {\n        if (!this.color_ || this.canvas_[pixelRatio]) {\n            return;\n        }\n        var canvas = document.createElement('canvas');\n        this.canvas_[pixelRatio] =
  canvas;\n        canvas.width = Math.ceil(this.image_.width * pixelRatio);\n        canvas.height = Math.ceil(this.image_.height * pixelRatio);\n        var ctx = canvas.getContext('2d');\n        ctx.scale(pixelRatio, pixelRatio);\n        ctx.drawImage(this.image_, 0, 0);\n        if (this.isTainted_()) {\n            // If reading from the canvas throws a SecurityError the same effect can be\n            // achieved with globalCompositeOperation.\n            // This could be used as the default, but it is not fully supported by all\n            // browsers. E. g. Internet Explorer 11 does not support the multiply\n            // operation and the resulting image shape will be completelly filled with\n            // the provided color.\n            // So this is only used as a fallback. It is still better than having no icon\n            // at all.\n            var c = this.color_;\n            ctx.globalCompositeOperation = 'multiply';\n            ctx.fillStyle = 'rgb(' + c[0]
  + ',' + c[1] + ',' + c[2] + ')';\n            ctx.fillRect(0, 0, canvas.width, canvas.height);\n            ctx.globalCompositeOperation = 'destination-in';\n            ctx.drawImage(this.image_, 0, 0);\n            return;\n        }\n        var imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n        var data = imgData.data;\n        var r = this.color_[0] / 255.0;\n        var g = this.color_[1] / 255.0;\n        var b = this.color_[2] / 255.0;\n        for (var i = 0, ii = data.length; i < ii; i += 4) {\n            data[i] *= r;\n            data[i + 1] *= g;\n            data[i + 2] *= b;\n        }\n        ctx.putImageData(imgData, 0, 0);\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    IconImage.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return IconImage;\n
 }(EventTarget));\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n    var iconImage = iconImageCache.get(src, crossOrigin, color);\n    if (!iconImage) {\n        iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n        iconImageCache.set(src, crossOrigin, color, iconImage);\n    }\n    return iconImage;\n}\nexport default IconImage;\n//# sourceMappingURL=IconImage.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array 
 && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/style/Icon\n */\nimport EventType from '../events/EventType.js';\nimport IconAnchorUnits from './IconAnchorUnits.js';\nimport IconOrigin from './IconOrigin.js';\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { assert } from '../asserts.js';\nimport { get as getIconImage } from './IconImage.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./IconOrigin
 .js\").default} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\
 n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image must already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {Array<number>} [displacement=[0,0]] Displacement the icon\n * @property {import(\"./IconOrigin.js\").default} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @propert
 y {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {import(\"../size.js\").Size} [size] Icon size in pixel. Can be used together with `offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not, and\n * for SVG images in Internet Explorer 11. The provided `imgSize` needs to match the actual size of the image.\n * @property {string} [src] Image source URI.\n */\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nvar Icon = /** @class */ (function (_super) {\n    __extends(Icon, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Icon(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        /**\n         * @type {number}\n         */\n        var opacity = options.opacity !== undefined ? options.opacity : 1;\
 n        /**\n         * @type {number}\n         */\n        var rotation = options.rotation !== undefined ? options.rotation : 0;\n        /**\n         * @type {number|import(\"../size.js\").Size}\n         */\n        var scale = options.scale !== undefined ? options.scale : 1;\n        /**\n         * @type {boolean}\n         */\n        var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        _this = _super.call(this, {\n            opacity: opacity,\n            rotation: rotation,\n            scale: scale,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n            rotateWithView: rotateWithView,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.normaliz
 edAnchor_ = null;\n        /**\n         * @private\n         * @type {import(\"./IconOrigin.js\").default}\n         */\n        _this.anchorOrigin_ =\n            options.anchorOrigin !== undefined\n                ? options.anchorOrigin\n                : IconOrigin.TOP_LEFT;\n        /**\n         * @private\n         * @type {import(\"./IconAnchorUnits.js\").default}\n         */\n        _this.anchorXUnits_ =\n            options.anchorXUnits !== undefined\n                ? options.anchorXUnits\n                : IconAnchorUnits.FRACTION;\n        /**\n         * @private\n         * @type {import(\"./IconAnchorUnits.js\").default}\n         */\n        _this.anchorYUnits_ =\n            options.anchorYUnits !== undefined\n                ? options.anchorYUnits\n                : IconAnchorUnits.FRACTION;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin
  : null;\n        /**\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        var image = options.img !== undefined ? options.img : null;\n        /**\n         * @type {import(\"../size.js\").Size}\n         */\n        var imgSize = options.imgSize !== undefined ? options.imgSize : null;\n        /**\n         * @type {string|undefined}\n         */\n        var src = options.src;\n        assert(!(src !== undefined && image), 4); // `image` and `src` cannot be provided at the same time\n        assert(!image || (image && imgSize), 5); // `imgSize` must be set when `image` is provided\n        if ((src === undefined || src.length === 0) && image) {\n            src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n        }\n        assert(src !== undefined && src.length > 0, 6); // A defined and non-empty `src` or `image` must be provided\n        /**\n         * @type {import(\"../ImageState.js\").default}\n         */\n        var imageState 
 = options.src !== undefined ? ImageState.IDLE : ImageState.LOADED;\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color}\n         */\n        _this.color_ = options.color !== undefined ? asArray(options.color) : null;\n        /**\n         * @private\n         * @type {import(\"./IconImage.js\").default}\n         */\n        _this.iconImage_ = getIconImage(image, \n        /** @type {string} */ (src), imgSize, _this.crossOrigin_, imageState, _this.color_);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n        /**\n         * @private\n         * @type {import(\"./IconOrigin.js\").default}\n         */\n        _this.offsetOrigin_ =\n            options.offsetOrigin !== undefined\n                ? options.offsetOrigin\n                : IconOrigin.TOP_LEFT;\n        /**\n         * @private\n         * @type {Array<number>}\n         *
 /\n        _this.origin_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = options.size !== undefined ? options.size : null;\n        return _this;\n    }\n    /**\n     * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n     * @return {Icon} The cloned style.\n     * @api\n     */\n    Icon.prototype.clone = function () {\n        var scale = this.getScale();\n        return new Icon({\n            anchor: this.anchor_.slice(),\n            anchorOrigin: this.anchorOrigin_,\n            anchorXUnits: this.anchorXUnits_,\n            anchorYUnits: this.anchorYUnits_,\n            crossOrigin: this.crossOrigin_,\n            color: this.color_ && this.color_.slice\n                ? this.color_.slice()\n                : this.color_ || undefined,\n            src: this.getSrc(),\n            offset: this.offset_.slice(),\n            offsetOrigin: this.offsetOrigin_,\n            size:
  this.size_ !== null ? this.size_.slice() : undefined,\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n        });\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @return {Array<number>} Anchor.\n     * @api\n     */\n    Icon.prototype.getAnchor = function () {\n        if (this.normalizedAnchor_) {\n            return this.normalizedAnchor_;\n        }\n        var anchor = this.anchor_;\n        var size = this.getSize();\n        if (this.anchorXUnits_ == IconAnchorUnits.FRACTION ||\n            this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n            if (!size) {\n                return null;\n            }\n            anchor = this.anchor_.slice();\n            if (this.anchorXUnits_ == IconAnchorUnits.FRACTION) {\n                a
 nchor[0] *= size[0];\n            }\n            if (this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n                anchor[1] *= size[1];\n            }\n        }\n        if (this.anchorOrigin_ != IconOrigin.TOP_LEFT) {\n            if (!size) {\n                return null;\n            }\n            if (anchor === this.anchor_) {\n                anchor = this.anchor_.slice();\n            }\n            if (this.anchorOrigin_ == IconOrigin.TOP_RIGHT ||\n                this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                anchor[0] = -anchor[0] + size[0];\n            }\n            if (this.anchorOrigin_ == IconOrigin.BOTTOM_LEFT ||\n                this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                anchor[1] = -anchor[1] + size[1];\n            }\n        }\n        this.normalizedAnchor_ = anchor;\n        return this.normalizedAnchor_;\n    };\n    /**\n     * Set the anchor point. The anchor determines the center point for the\n     * symbol
 izer.\n     *\n     * @param {Array<number>} anchor Anchor.\n     * @api\n     */\n    Icon.prototype.setAnchor = function (anchor) {\n        this.anchor_ = anchor;\n        this.normalizedAnchor_ = null;\n    };\n    /**\n     * Get the icon color.\n     * @return {import(\"../color.js\").Color} Color.\n     * @api\n     */\n    Icon.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Get the image icon.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n     * @api\n     */\n    Icon.prototype.getImage = function (pixelRatio) {\n        return this.iconImage_.getImage(pixelRatio);\n    };\n    /**\n     * Get the pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} The pixel ration of the image.\n     * @api\n     */\n    Icon.prototype.getPixelRatio = function (pixelRatio) {\n        return this.iconImage_.getPixelRatio(pixelRatio);\n 
    };\n    /**\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    Icon.prototype.getImageSize = function () {\n        return this.iconImage_.getSize();\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n     */\n    Icon.prototype.getHitDetectionImageSize = function () {\n        return this.getImageSize();\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    Icon.prototype.getImageState = function () {\n        return this.iconImage_.getImageState();\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n     */\n    Icon.prototype.getHitDetectionImage = function (pixelRatio) {\n        return this.iconImage_.getHitDetectionImage(pixelRatio);\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @return {Array<number>} Origin.\n     * @api\n     */\n    Icon.prototype.getOrigin =
  function () {\n        if (this.origin_) {\n            return this.origin_;\n        }\n        var offset = this.offset_;\n        var displacement = this.getDisplacement();\n        if (this.offsetOrigin_ != IconOrigin.TOP_LEFT) {\n            var size = this.getSize();\n            var iconImageSize = this.iconImage_.getSize();\n            if (!size || !iconImageSize) {\n                return null;\n            }\n            offset = offset.slice();\n            if (this.offsetOrigin_ == IconOrigin.TOP_RIGHT ||\n                this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                offset[0] = iconImageSize[0] - size[0] - offset[0];\n            }\n            if (this.offsetOrigin_ == IconOrigin.BOTTOM_LEFT ||\n                this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                offset[1] = iconImageSize[1] - size[1] - offset[1];\n            }\n        }\n        offset[0] += displacement[0];\n        offset[1] += displacement[1];\n        this.orig
 in_ = offset;\n        return this.origin_;\n    };\n    /**\n     * Get the image URL.\n     * @return {string|undefined} Image src.\n     * @api\n     */\n    Icon.prototype.getSrc = function () {\n        return this.iconImage_.getSrc();\n    };\n    /**\n     * Get the size of the icon (in pixels).\n     * @return {import(\"../size.js\").Size} Image size.\n     * @api\n     */\n    Icon.prototype.getSize = function () {\n        return !this.size_ ? this.iconImage_.getSize() : this.size_;\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    Icon.prototype.listenImageChange = function (listener) {\n        this.iconImage_.addEventListener(EventType.CHANGE, listener);\n    };\n    /**\n     * Load not yet loaded URI.\n     * When rendering a feature with an icon style, the vector renderer will\n     * automatically call this method. However, you might want to call this\n     * method yourself for preload
 ing or other purposes.\n     * @api\n     */\n    Icon.prototype.load = function () {\n        this.iconImage_.load();\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    Icon.prototype.unlistenImageChange = function (listener) {\n        this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n    };\n    return Icon;\n}(ImageStyle));\nexport default Icon;\n//# sourceMappingURL=Icon.js.map","/**\n * @module ol/style/Stroke\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'
 ] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nvar Stroke = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Stroke(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @priva
 te\n         * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n         */\n        this.color_ = options.color !== undefined ? options.color : null;\n        /**\n         * @private\n         * @type {CanvasLineCap|undefined}\n         */\n        this.lineCap_ = options.lineCap;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.lineDashOffset_ = options.lineDashOffset;\n        /**\n         * @private\n         * @type {CanvasLineJoin|undefined}\n         */\n        this.lineJoin_ = options.lineJoin;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.miterLimit_ = options.miterLimit;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.width_ = optio
 ns.width;\n    }\n    /**\n     * Clones the style.\n     * @return {Stroke} The cloned style.\n     * @api\n     */\n    Stroke.prototype.clone = function () {\n        var color = this.getColor();\n        return new Stroke({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n            lineCap: this.getLineCap(),\n            lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n            lineDashOffset: this.getLineDashOffset(),\n            lineJoin: this.getLineJoin(),\n            miterLimit: this.getMiterLimit(),\n            width: this.getWidth(),\n        });\n    };\n    /**\n     * Get the stroke color.\n     * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n     * @api\n     */\n    Stroke.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Get the line cap type for the stroke.\n     * @return {CanvasLineCap|undefined} Line cap.\n     * @api\n   
   */\n    Stroke.prototype.getLineCap = function () {\n        return this.lineCap_;\n    };\n    /**\n     * Get the line dash style for the stroke.\n     * @return {Array<number>} Line dash.\n     * @api\n     */\n    Stroke.prototype.getLineDash = function () {\n        return this.lineDash_;\n    };\n    /**\n     * Get the line dash offset for the stroke.\n     * @return {number|undefined} Line dash offset.\n     * @api\n     */\n    Stroke.prototype.getLineDashOffset = function () {\n        return this.lineDashOffset_;\n    };\n    /**\n     * Get the line join type for the stroke.\n     * @return {CanvasLineJoin|undefined} Line join.\n     * @api\n     */\n    Stroke.prototype.getLineJoin = function () {\n        return this.lineJoin_;\n    };\n    /**\n     * Get the miter limit for the stroke.\n     * @return {number|undefined} Miter limit.\n     * @api\n     */\n    Stroke.prototype.getMiterLimit = function () {\n        return this.miterLimit_;\n    };\n    /**\n     * G
 et the stroke width.\n     * @return {number|undefined} Width.\n     * @api\n     */\n    Stroke.prototype.getWidth = function () {\n        return this.width_;\n    };\n    /**\n     * Set the color.\n     *\n     * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n     * @api\n     */\n    Stroke.prototype.setColor = function (color) {\n        this.color_ = color;\n    };\n    /**\n     * Set the line cap.\n     *\n     * @param {CanvasLineCap|undefined} lineCap Line cap.\n     * @api\n     */\n    Stroke.prototype.setLineCap = function (lineCap) {\n        this.lineCap_ = lineCap;\n    };\n    /**\n     * Set the line dash.\n     *\n     * Please note that Internet Explorer 10 and lower [do not support][mdn] the\n     * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n     * property will have no visual effect in these browsers.\n     *\n     * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderi
 ngContext2D/setLineDash#Browser_compatibility\n     *\n     * @param {Array<number>} lineDash Line dash.\n     * @api\n     */\n    Stroke.prototype.setLineDash = function (lineDash) {\n        this.lineDash_ = lineDash;\n    };\n    /**\n     * Set the line dash offset.\n     *\n     * @param {number|undefined} lineDashOffset Line dash offset.\n     * @api\n     */\n    Stroke.prototype.setLineDashOffset = function (lineDashOffset) {\n        this.lineDashOffset_ = lineDashOffset;\n    };\n    /**\n     * Set the line join.\n     *\n     * @param {CanvasLineJoin|undefined} lineJoin Line join.\n     * @api\n     */\n    Stroke.prototype.setLineJoin = function (lineJoin) {\n        this.lineJoin_ = lineJoin;\n    };\n    /**\n     * Set the miter limit.\n     *\n     * @param {number|undefined} miterLimit Miter limit.\n     * @api\n     */\n    Stroke.prototype.setMiterLimit = function (miterLimit) {\n        this.miterLimit_ = miterLimit;\n    };\n    /**\n     * Set the width.\n   
   *\n     * @param {number|undefined} width Width.\n     * @api\n     */\n    Stroke.prototype.setWidth = function (width) {\n        this.width_ = width;\n    };\n    return Stroke;\n}());\nexport default Stroke;\n//# sourceMappingURL=Stroke.js.map","/**\n * @module ol/style/Style\n */\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Stroke from './Stroke.js';\nimport { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link 
 StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n/**\n * A function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>),import(\"../render.js\").State): void}\n * RenderFunction\n */\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feat
 ure property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from
  'ol/style';\n *\n *  var fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)'\n *  });\n *  var stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25\n *  });\n *  var styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5\n *      }),\n *      fill: fill,\n *      stroke: stroke\n *    })\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *  import GeometryType from 'ol/geom/GeometryType';\n *\n *  var white = [255, 255, 255, 1];\n *  var blue = [0, 153, 255, 1];\n *  var width = 3;\n *  styles[GeometryType.POLYGON] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5]\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POLYGON] =\n *      styles[GeometryType.POLYGON];\n *  styles[GeometryType.LINE_STRING] = [\n *    new Style({\n *      stroke: new Strok
 e({\n *        color: white,\n *        width: width + 2\n *      })\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_LINE_STRING] =\n *      styles[GeometryType.LINE_STRING];\n *  styles[GeometryType.POINT] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2\n *        })\n *      }),\n *      zIndex: Infinity\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POINT] =\n *      styles[GeometryType.POINT];\n *  styles[GeometryType.GEOMETRY_COLLECTION] =\n *      styles[GeometryType.POLYGON].concat(\n *          styles[GeometryType.LINE_STRING],\n *          styles[GeometryType.POINT]\n *      );\n * ```\n *\n * @api\n */\nvar Style = /** @class */ (function () {\n    /**\n     * @par
 am {Options=} opt_options Style options.\n     */\n    function Style(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n         */\n        this.geometry_ = null;\n        /**\n         * @private\n         * @type {!GeometryFunction}\n         */\n        this.geometryFunction_ = defaultGeometryFunction;\n        if (options.geometry !== undefined) {\n            this.setGeometry(options.geometry);\n        }\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n         * @private\n         * @type {import(\"./Image.js\").default}\n         */\n        this.image_ = options.image !== undefined ? options.image : null;\n        /**\n         * @private\n         * @type {RenderFunction|null}\n         */\n        this.renderer_ = o
 ptions.renderer !== undefined ? options.renderer : null;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {import(\"./Text.js\").default}\n         */\n        this.text_ = options.text !== undefined ? options.text : null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.zIndex_ = options.zIndex;\n    }\n    /**\n     * Clones the style.\n     * @return {Style} The cloned style.\n     * @api\n     */\n    Style.prototype.clone = function () {\n        var geometry = this.getGeometry();\n        if (geometry && typeof geometry === 'object') {\n            geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n        }\n        return new Style({\n            geometry: geometry,\n            fill: this.getFill() ? this.getFill(
 ).clone() : undefined,\n            image: this.getImage() ? this.getImage().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            text: this.getText() ? this.getText().clone() : undefined,\n            zIndex: this.getZIndex(),\n        });\n    };\n    /**\n     * Get the custom renderer function that was configured with\n     * {@link #setRenderer} or the `renderer` constructor option.\n     * @return {RenderFunction|null} Custom renderer function.\n     * @api\n     */\n    Style.prototype.getRenderer = function () {\n        return this.renderer_;\n    };\n    /**\n     * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n     * and `image` options of the style will be ignored.\n     * @param {RenderFunction|null} renderer Custom renderer function.\n     * @api\n     */\n    Style.prototype.setRenderer = function (renderer) {\n        this.renderer_ = renderer;\n    };\n    /**\n     * Get the ge
 ometry to be rendered.\n     * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n     * Feature property or geometry or function that returns the geometry that will\n     * be rendered with this style.\n     * @api\n     */\n    Style.prototype.getGeometry = function () {\n        return this.geometry_;\n    };\n    /**\n     * Get the function used to generate a geometry for rendering.\n     * @return {!GeometryFunction} Function that is called with a feature\n     * and returns the geometry to render instead of the feature's geometry.\n     * @api\n     */\n    Style.prototype.getGeometryFunction = function () {\n        return this.geometryFunction_;\n    };\n    /**\n     * Get the fill style.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Style.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * Set the fill style.\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n
      * @api\n     */\n    Style.prototype.setFill = function (fill) {\n        this.fill_ = fill;\n    };\n    /**\n     * Get the image style.\n     * @return {import(\"./Image.js\").default} Image style.\n     * @api\n     */\n    Style.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * Set the image style.\n     * @param {import(\"./Image.js\").default} image Image style.\n     * @api\n     */\n    Style.prototype.setImage = function (image) {\n        this.image_ = image;\n    };\n    /**\n     * Get the stroke style.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Style.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * Set the stroke style.\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Style.prototype.setStroke = function (stroke) {\n        this.stroke_ = stroke;\n    };\n    /**\n     * Get the text style.
 \n     * @return {import(\"./Text.js\").default} Text style.\n     * @api\n     */\n    Style.prototype.getText = function () {\n        return this.text_;\n    };\n    /**\n     * Set the text style.\n     * @param {import(\"./Text.js\").default} text Text style.\n     * @api\n     */\n    Style.prototype.setText = function (text) {\n        this.text_ = text;\n    };\n    /**\n     * Get the z-index for the style.\n     * @return {number|undefined} ZIndex.\n     * @api\n     */\n    Style.prototype.getZIndex = function () {\n        return this.zIndex_;\n    };\n    /**\n     * Set a geometry that is rendered instead of the feature's geometry.\n     *\n     * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction} geometry\n     *     Feature property or geometry or function returning a geometry to render\n     *     for this style.\n     * @api\n     */\n    Style.prototype.setGeometry = function (geometry) {\n        if (typeof geometry === 'function') {\n      
       this.geometryFunction_ = geometry;\n        }\n        else if (typeof geometry === 'string') {\n            this.geometryFunction_ = function (feature) {\n                return /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(geometry));\n            };\n        }\n        else if (!geometry) {\n            this.geometryFunction_ = defaultGeometryFunction;\n        }\n        else if (geometry !== undefined) {\n            this.geometryFunction_ = function () {\n                return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n            };\n        }\n        this.geometry_ = geometry;\n    };\n    /**\n     * Set the z-index.\n     *\n     * @param {number|undefined} zIndex ZIndex.\n     * @api\n     */\n    Style.prototype.setZIndex = function (zIndex) {\n        this.zIndex_ = zIndex;\n    };\n    return Style;\n}());\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays o
 f Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n    var styleFunction;\n    if (typeof obj === 'function') {\n        styleFunction = obj;\n    }\n    else {\n        /**\n         * @type {Array<Style>}\n         */\n        var styles_1;\n        if (Array.isArray(obj)) {\n            styles_1 = obj;\n        }\n        else {\n            assert(typeof ( /** @type {?} */(obj).getZIndex) === 'function', 41); // Expected an `Style` or an array of `Style`\n            var style = /** @type {Style} */ (obj);\n            styles_1 = [style];\n        }\n        styleFunction = function () {\n            return styles_1;\n        };\n    }\n    return styleFunction;\n}\n/**\n * @type {Array<Style>}\n */\nvar defaultStyles = null;\n/**\n * @param {import(\"../Feature.
 js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n    // We don't use an immediately-invoked function\n    // and a closure so we don't get an error at script evaluation time in\n    // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n    // canvas.getContext('2d') at construction time, which will cause an.error\n    // in such browsers.)\n    if (!defaultStyles) {\n        var fill = new Fill({\n            color: 'rgba(255,255,255,0.4)',\n        });\n        var stroke = new Stroke({\n            color: '#3399CC',\n            width: 1.25,\n        });\n        defaultStyles = [\n            new Style({\n                image: new CircleStyle({\n                    fill: fill,\n                    stroke: stroke,\n                    radius: 5,\n                }),\n                fill: fill,\n                stroke: strok
 e,\n            }),\n        ];\n    }\n    return defaultStyles;\n}\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n    /** @type {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} */\n    var styles = {};\n    var white = [255, 255, 255, 1];\n    var blue = [0, 153, 255, 1];\n    var width = 3;\n    styles[GeometryType.POLYGON] = [\n        new Style({\n            fill: new Fill({\n                color: [255, 255, 255, 0.5],\n            }),\n        }),\n    ];\n    styles[GeometryType.MULTI_POLYGON] = styles[GeometryType.POLYGON];\n    styles[GeometryType.LINE_STRING] = [\n        new Style({\n            stroke: new Stroke({\n                color: white,\n                width: width + 2,\n            }),\n        }),\n        new Style({\n            stroke: new Stroke({\n                color: blue,\n                width: widt
 h,\n            }),\n        }),\n    ];\n    styles[GeometryType.MULTI_LINE_STRING] = styles[GeometryType.LINE_STRING];\n    styles[GeometryType.CIRCLE] = styles[GeometryType.POLYGON].concat(styles[GeometryType.LINE_STRING]);\n    styles[GeometryType.POINT] = [\n        new Style({\n            image: new CircleStyle({\n                radius: width * 2,\n                fill: new Fill({\n                    color: blue,\n                }),\n                stroke: new Stroke({\n                    color: white,\n                    width: width / 2,\n                }),\n            }),\n            zIndex: Infinity,\n        }),\n    ];\n    styles[GeometryType.MULTI_POINT] = styles[GeometryType.POINT];\n    styles[GeometryType.GEOMETRY_COLLECTION] = styles[GeometryType.POLYGON].concat(styles[GeometryType.LINE_STRING], styles[GeometryType.POINT]);\n    return styles;\n}\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feat
 ure.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n    return feature.getGeometry();\n}\nexport default Style;\n//# sourceMappingURL=Style.js.map","/**\n * @module ol/style/TextPlacement\n */\n/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n * @enum {string}\n */\nexport default {\n    POINT: 'point',\n    LINE: 'line',\n};\n//# sourceMappingURL=TextPlacement.js.map","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\nimport { toSize } from '../s
 ize.js';\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nvar DEFAULT_FILL_COLOR = '#333';\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS 'font' value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length
  of the path that it follows.\n * @property {import(\"./TextPlacement.js\").default|string} [placement='point'] Text placement.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string} [text] Text content.\n * @property {string} [textAlign] Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.\n * Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {string} [textBaseline='middle'] Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',\n * 'hanging', 'ideographic'.\n * @property {import(\"./Fill.js\").default} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333).\n * @property {import(\"./Stro
 ke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n */\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nvar Text = /** @class */ (function () {\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Text(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.font_ = options.font;\n        /**\n         * @private\n         * @type {number|undefined}
 \n         */\n        this.rotation_ = options.rotation;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        this.rotateWithView_ = options.rotateWithView;\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size|undefined}\n         */\n        this.scale_ = options.scale;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.text_ = options.text;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.textAlign_ = options.textAlign;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.textBaseline_ = options.textBaseline;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default
 }\n         */\n        this.fill_ =\n            options.fill !== undefined\n                ? options.fill\n                : new Fill({ color: DEFAULT_FILL_COLOR });\n        /**\n         * @private\n         * @type {number}\n         */\n        this.maxAngle_ =\n            options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n        /**\n         * @private\n         * @type {import(\"./TextPlacement.js\").default|string}\n         */\n        this.placement_ =\n            options.placement !== undefined ? options.placement : TextPlacement.POINT;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.overflow_ = !!options.overflow;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.offsetX_ = options.offsetX !== undef
 ined ? options.offsetX : 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.backgroundFill_ = options.backgroundFill\n            ? options.backgroundFill\n            : null;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.backgroundStroke_ = options.backgroundStroke\n            ? options.backgroundStroke\n            : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.padding_ = options.padding === undefined ? null : options.padding;\n    }\n    /**\n     * Clones the style.\n     * @return {Text} The cloned style.\n     * @api\n     */\n    Text.prototype.clone = function () {\n        var scale = this.getScale();\n        return new Text({\n            
 font: this.getFont(),\n            placement: this.getPlacement(),\n            maxAngle: this.getMaxAngle(),\n            overflow: this.getOverflow(),\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            text: this.getText(),\n            textAlign: this.getTextAlign(),\n            textBaseline: this.getTextBaseline(),\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            offsetX: this.getOffsetX(),\n            offsetY: this.getOffsetY(),\n            backgroundFill: this.getBackgroundFill()\n                ? this.getBackgroundFill().clone()\n                : undefined,\n            backgroundStroke: this.getBackgroundStroke()\n                ? this.getBackgroundStroke().clone()\n                : undefined,\n            padding: this.getPadding()
 ,\n        });\n    };\n    /**\n     * Get the `overflow` configuration.\n     * @return {boolean} Let text overflow the length of the path they follow.\n     * @api\n     */\n    Text.prototype.getOverflow = function () {\n        return this.overflow_;\n    };\n    /**\n     * Get the font name.\n     * @return {string|undefined} Font.\n     * @api\n     */\n    Text.prototype.getFont = function () {\n        return this.font_;\n    };\n    /**\n     * Get the maximum angle between adjacent characters.\n     * @return {number} Angle in radians.\n     * @api\n     */\n    Text.prototype.getMaxAngle = function () {\n        return this.maxAngle_;\n    };\n    /**\n     * Get the label placement.\n     * @return {import(\"./TextPlacement.js\").default|string} Text placement.\n     * @api\n     */\n    Text.prototype.getPlacement = function () {\n        return this.placement_;\n    };\n    /**\n     * Get the x-offset for the text.\n     * @return {number} Horizontal text offset.\n 
     * @api\n     */\n    Text.prototype.getOffsetX = function () {\n        return this.offsetX_;\n    };\n    /**\n     * Get the y-offset for the text.\n     * @return {number} Vertical text offset.\n     * @api\n     */\n    Text.prototype.getOffsetY = function () {\n        return this.offsetY_;\n    };\n    /**\n     * Get the fill style for the text.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Text.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * Determine whether the text rotates with the map.\n     * @return {boolean|undefined} Rotate with map.\n     * @api\n     */\n    Text.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Get the text rotation.\n     * @return {number|undefined} Rotation.\n     * @api\n     */\n    Text.prototype.getRotation = function () {\n        return this.rotation_;\n    };\n    /**\n     * Get the text scale.\n  
    * @return {number|import(\"../size.js\").Size|undefined} Scale.\n     * @api\n     */\n    Text.prototype.getScale = function () {\n        return this.scale_;\n    };\n    /**\n     * Get the symbolizer scale array.\n     * @return {import(\"../size.js\").Size} Scale array.\n     */\n    Text.prototype.getScaleArray = function () {\n        return this.scaleArray_;\n    };\n    /**\n     * Get the stroke style for the text.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Text.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * Get the text to be rendered.\n     * @return {string|undefined} Text.\n     * @api\n     */\n    Text.prototype.getText = function () {\n        return this.text_;\n    };\n    /**\n     * Get the text alignment.\n     * @return {string|undefined} Text align.\n     * @api\n     */\n    Text.prototype.getTextAlign = function () {\n        return this.textAlign_;\n    };\n    /
 **\n     * Get the text baseline.\n     * @return {string|undefined} Text baseline.\n     * @api\n     */\n    Text.prototype.getTextBaseline = function () {\n        return this.textBaseline_;\n    };\n    /**\n     * Get the background fill style for the text.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Text.prototype.getBackgroundFill = function () {\n        return this.backgroundFill_;\n    };\n    /**\n     * Get the background stroke style for the text.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Text.prototype.getBackgroundStroke = function () {\n        return this.backgroundStroke_;\n    };\n    /**\n     * Get the padding for the text.\n     * @return {Array<number>} Padding.\n     * @api\n     */\n    Text.prototype.getPadding = function () {\n        return this.padding_;\n    };\n    /**\n     * Set the `overflow` property.\n     *\n     * @param {boolean} overflow Let text overfl
 ow the path that it follows.\n     * @api\n     */\n    Text.prototype.setOverflow = function (overflow) {\n        this.overflow_ = overflow;\n    };\n    /**\n     * Set the font.\n     *\n     * @param {string|undefined} font Font.\n     * @api\n     */\n    Text.prototype.setFont = function (font) {\n        this.font_ = font;\n    };\n    /**\n     * Set the maximum angle between adjacent characters.\n     *\n     * @param {number} maxAngle Angle in radians.\n     * @api\n     */\n    Text.prototype.setMaxAngle = function (maxAngle) {\n        this.maxAngle_ = maxAngle;\n    };\n    /**\n     * Set the x offset.\n     *\n     * @param {number} offsetX Horizontal text offset.\n     * @api\n     */\n    Text.prototype.setOffsetX = function (offsetX) {\n        this.offsetX_ = offsetX;\n    };\n    /**\n     * Set the y offset.\n     *\n     * @param {number} offsetY Vertical text offset.\n     * @api\n     */\n    Text.prototype.setOffsetY = function (offsetY) {\n        this.off
 setY_ = offsetY;\n    };\n    /**\n     * Set the text placement.\n     *\n     * @param {import(\"./TextPlacement.js\").default|string} placement Placement.\n     * @api\n     */\n    Text.prototype.setPlacement = function (placement) {\n        this.placement_ = placement;\n    };\n    /**\n     * Set whether to rotate the text with the view.\n     *\n     * @param {boolean} rotateWithView Rotate with map.\n     * @api\n     */\n    Text.prototype.setRotateWithView = function (rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    };\n    /**\n     * Set the fill.\n     *\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Text.prototype.setFill = function (fill) {\n        this.fill_ = fill;\n    };\n    /**\n     * Set the rotation.\n     *\n     * @param {number|undefined} rotation Rotation.\n     * @api\n     */\n    Text.prototype.setRotation = function (rotation) {\n        this.rotation_ = rotation;\n    };\n    /**\n  
    * Set the scale.\n     *\n     * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n     * @api\n     */\n    Text.prototype.setScale = function (scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n    };\n    /**\n     * Set the stroke.\n     *\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Text.prototype.setStroke = function (stroke) {\n        this.stroke_ = stroke;\n    };\n    /**\n     * Set the text.\n     *\n     * @param {string|undefined} text Text.\n     * @api\n     */\n    Text.prototype.setText = function (text) {\n        this.text_ = text;\n    };\n    /**\n     * Set the text alignment.\n     *\n     * @param {string|undefined} textAlign Text align.\n     * @api\n     */\n    Text.prototype.setTextAlign = function (textAlign) {\n        this.textAlign_ = textAlign;\n    };\n    /**\n     * Set the text baseline.\n     *\n     * @param {strin
 g|undefined} textBaseline Text baseline.\n     * @api\n     */\n    Text.prototype.setTextBaseline = function (textBaseline) {\n        this.textBaseline_ = textBaseline;\n    };\n    /**\n     * Set the background fill.\n     *\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Text.prototype.setBackgroundFill = function (fill) {\n        this.backgroundFill_ = fill;\n    };\n    /**\n     * Set the background stroke.\n     *\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Text.prototype.setBackgroundStroke = function (stroke) {\n        this.backgroundStroke_ = stroke;\n    };\n    /**\n     * Set the padding (`[top, right, bottom, left]`).\n     *\n     * @param {!Array<number>} padding Padding.\n     * @api\n     */\n    Text.prototype.setPadding = function (padding) {\n        this.padding_ = padding;\n    };\n    return Text;\n}());\nexport default Text;\n//# sourceMappingURL=Text.js.map",
 "var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Tile\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport TileState from './TileState.js';\nimport { abstract } from './util.js';\nimport { easeIn } from './easing.js';\n/**\n * A function that takes an {@link module:ol/Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.s
 etTileLoadFunction(function(tile, src) {\n *   tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile, src) {\n *   var xhr = new XMLHttpRequest();\n *   xhr.responseType = 'blob';\n *   xhr.addEventListener('loadend', function (evt) {\n *     var data = this.response;\n *     if (data !== undefined) {\n *       tile.getImage().src = URL.createObjectURL(data);\n *     } else {\n *       tile.setState(TileState.ERROR);\n *     }\n *   });\n *   xhr.addEventListener('error', function () {\n *     tile.setState(TileState.ERROR);\n *   });\n *   xhr.open('GET', src);\n *   xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n/**\n * {@link module:ol/source/Tile~Tile} sources use a function of this type to get\n * the url that prov
 ides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection} for the projection  as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n *           import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @api\n */\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /** @class */ (function (_super) {\n    __extends(Tile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coor
 dinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {Options=} opt_options Tile options.\n     */\n    function Tile(tileCoord, state, opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"./tilecoord.js\").TileCoord}\n         */\n        _this.tileCoord = tileCoord;\n        /**\n         * @protected\n         * @type {import(\"./TileState.js\").default}\n         */\n        _this.state = state;\n        /**\n         * An \"interim\" tile for this tile. The interim tile may be used while this\n         * one is loading, for \"smooth\" transitions when changing params/dimensions\n         * on the source.\n         * @type {Tile}\n         */\n        _this.interimTile = null;\n        /**\n         * The tile is available at the highest possible resolution. Subclasses can\n         * set this to `false` initially. Tile load listeners will 
 not be\n         * unregistered before this is set to `true` and a `#changed()` is called.\n         * @type {boolean}\n         */\n        _this.hifi = true;\n        /**\n         * A key assigned to the tile. This is used by the tile source to determine\n         * if this tile can effectively be used, or if a new tile should be created\n         * and this one be used as an interim tile for this new tile.\n         * @type {string}\n         */\n        _this.key = '';\n        /**\n         * The duration for the opacity transition.\n         * @type {number}\n         */\n        _this.transition_ =\n            options.transition === undefined ? 250 : options.transition;\n        /**\n         * Lookup of start times for rendering transitions.  If the start time is\n         * equal to -1, the transition is complete.\n         * @type {Object<string, number>}\n         */\n        _this.transitionStarts_ = {};\n        return _this;\n    }\n    /**\n     * @protected\n     *
 /\n    Tile.prototype.changed = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * Called by the tile cache when the tile is removed from the cache due to expiry\n     */\n    Tile.prototype.release = function () { };\n    /**\n     * @return {string} Key.\n     */\n    Tile.prototype.getKey = function () {\n        return this.key + '/' + this.tileCoord;\n    };\n    /**\n     * Get the interim tile most suitable for rendering using the chain of interim\n     * tiles. This corresponds to the  most recent tile that has been loaded, if no\n     * such tile exists, the original tile is returned.\n     * @return {!Tile} Best tile for rendering.\n     */\n    Tile.prototype.getInterimTile = function () {\n        if (!this.interimTile) {\n            //empty chain\n            return this;\n        }\n        var tile = this.interimTile;\n        // find the first loaded tile and return it. Since the chain is sorted in\n        // decreasing order of c
 reation time, there is no need to search the remainder\n        // of the list (all those tiles correspond to older requests and will be\n        // cleaned up by refreshInterimChain)\n        do {\n            if (tile.getState() == TileState.LOADED) {\n                // Show tile immediately instead of fading it in after loading, because\n                // the interim tile is in place already\n                this.transition_ = 0;\n                return tile;\n            }\n            tile = tile.interimTile;\n        } while (tile);\n        // we can not find a better tile\n        return this;\n    };\n    /**\n     * Goes through the chain of interim tiles and discards sections of the chain\n     * that are no longer relevant.\n     */\n    Tile.prototype.refreshInterimChain = function () {\n        if (!this.interimTile) {\n            return;\n        }\n        var tile = this.interimTile;\n        var prev = /** @type {Tile} */ (this);\n        do {\n            if (t
 ile.getState() == TileState.LOADED) {\n                //we have a loaded tile, we can discard the rest of the list\n                //we would could abort any LOADING tile request\n                //older than this tile (i.e. any LOADING tile following this entry in the chain)\n                tile.interimTile = null;\n                break;\n            }\n            else if (tile.getState() == TileState.LOADING) {\n                //keep this LOADING tile any loaded tiles later in the chain are\n                //older than this tile, so we're still interested in the request\n                prev = tile;\n            }\n            else if (tile.getState() == TileState.IDLE) {\n                //the head of the list is the most current tile, we don't need\n                //to start any other requests for this chain\n                prev.interimTile = tile.interimTile;\n            }\n            else {\n                prev = tile;\n            }\n            tile = prev.interi
 mTile;\n        } while (tile);\n    };\n    /**\n     * Get the tile coordinate for this tile.\n     * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n     * @api\n     */\n    Tile.prototype.getTileCoord = function () {\n        return this.tileCoord;\n    };\n    /**\n     * @return {import(\"./TileState.js\").default} State.\n     */\n    Tile.prototype.getState = function () {\n        return this.state;\n    };\n    /**\n     * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n     * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n     * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n     * the tile queue and will block other requests.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @api\n     */\n    Tile.prototype.setState = function (state) {\n        if (this.state !== TileState.ERROR && this.state > state) {\n 
            throw new Error('Tile load sequence violation');\n        }\n        this.state = state;\n        this.changed();\n    };\n    /**\n     * Load the image or retry if loading previously failed.\n     * Loading is taken care of by the tile queue, and calling this method is\n     * only needed for preloading or for reloading in case of an error.\n     * @abstract\n     * @api\n     */\n    Tile.prototype.load = function () {\n        abstract();\n    };\n    /**\n     * Get the alpha value for rendering.\n     * @param {string} id An id for the renderer.\n     * @param {number} time The render frame time.\n     * @return {number} A number between 0 and 1.\n     */\n    Tile.prototype.getAlpha = function (id, time) {\n        if (!this.transition_) {\n            return 1;\n        }\n        var start = this.transitionStarts_[id];\n        if (!start) {\n            start = time;\n            this.transitionStarts_[id] = start;\n        }\n        else if (start === -1) {\n 
            return 1;\n        }\n        var delta = time - start + 1000 / 60; // avoid rendering at 0\n        if (delta >= this.transition_) {\n            return 1;\n        }\n        return easeIn(delta / this.transition_);\n    };\n    /**\n     * Determine if a tile is in an alpha transition.  A tile is considered in\n     * transition if tile.getAlpha() has not yet been called or has been called\n     * and returned 1.\n     * @param {string} id An id for the renderer.\n     * @return {boolean} The tile is in transition.\n     */\n    Tile.prototype.inTransition = function (id) {\n        if (!this.transition_) {\n            return false;\n        }\n        return this.transitionStarts_[id] !== -1;\n    };\n    /**\n     * Mark a transition as complete.\n     * @param {string} id An id for the renderer.\n     */\n    Tile.prototype.endTransition = function (id) {\n        if (this.transition_) {\n            this.transitionStarts_[id] = -1;\n        }\n    };\n    return T
 ile;\n}(EventTarget));\nexport default Tile;\n//# sourceMappingURL=Tile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { listenImage } from './Image.js';\nvar ImageTile = /** @class */ (function (_super) {\n    __extends(ImageTile, _super);\n    /**\n     * @param {impor
 t(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n     */\n    function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, opt_options) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ = crossOrigin;\n        /**\n         * Image URI\n         *\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.image_ = new Image();\n        if (crossOrigin !== null) {\n 
            _this.image_.crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @private\n         * @type {import(\"./Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction_ = tileLoadFunction;\n        return _this;\n    }\n    /**\n     * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @api\n     */\n    ImageTile.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * @return {string} Key.\n     */\n    ImageTile.prototype.getKey = function () {\n        return this.src_;\n    };\n    /**\n     * Tracks loading or read errors.\n     *\n     * @private\n     */\n    ImageTile.prototype.handleImageError_ = function () {\n        this.state = TileState.ERROR;\n        this.unlistenImage_();\n        t
 his.image_ = getBlankImage();\n        this.changed();\n    };\n    /**\n     * Tracks successful image load.\n     *\n     * @private\n     */\n    ImageTile.prototype.handleImageLoad_ = function () {\n        var image = /** @type {HTMLImageElement} */ (this.image_);\n        if (image.naturalWidth && image.naturalHeight) {\n            this.state = TileState.LOADED;\n        }\n        else {\n            this.state = TileState.EMPTY;\n        }\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     * @api\n     */\n    ImageTile.prototype.load = function () {\n        if (this.state == TileState.ERROR) {\n            this.state = TileState.IDLE;\n            this.image_ = new Image();\n            if (this.crossOrigin_ !== null) {\n                this.image_.crossOrigin = this.crossOrigin_;\n            }\n        }\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            thi
 s.changed();\n            this.tileLoadFunction_(this, this.src_);\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    ImageTile.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return ImageTile;\n}(Tile));\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n    var ctx = createCanvasContext2D(1, 1);\n    ctx.fillStyle = 'rgba(0,0,0,0)';\n    ctx.fillRect(0, 0, 1, 1);\n    return ctx.canvas;\n}\nexport default ImageTile;\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/reproj\n */\nimport { IMAGE_SMOOTHING_DISABLED } from './source/common.js';\nimport { assign } from './obj.js';\nimport
  { containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth, } from './extent.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getPointResolution, transform } from './proj.js';\nimport { solveLinearSystem } from './math.js';\nvar brokenDiagonalRendering_;\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n    ctx.beginPath();\n    ctx.moveTo(0, 0);\n    ctx.lineTo(u1, v1);\n    ctx.lineTo(u2, v2);\n    ctx.closePath();\n    ctx.save();\
 n    ctx.clip();\n    ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n    ctx.restore();\n}\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n    // the values ought to be close to the rgba(210, 0, 0, 0.75)\n    return (Math.abs(data[offset * 4] - 210) > 2 ||\n        Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2);\n}\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show
 _bug.cgi?id=1606976\n * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n    if (brokenDiagonalRendering_ === undefined) {\n        var ctx = document.createElement('canvas').getContext('2d');\n        ctx.globalCompositeOperation = 'lighter';\n        ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n        drawTestTriangle(ctx, 4, 5, 4, 0);\n        drawTestTriangle(ctx, 4, 5, 0, 5);\n        var data = ctx.getImageData(0, 0, 3, 3).data;\n        brokenDiagonalRendering_ =\n            verifyBrokenDiagonalRendering(data, 0) ||\n                verifyBrokenDiagonalRendering(data, 4) ||\n                verifyBrokenDiagonalRendering(data, 8);\n    }\n    return brokenDiagonalRendering_;\n}\
 n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution) {\n    var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n    // calculate the ideal resolution of the source data\n    var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n    
 var targetMetersPerUnit = targetProj.getMetersPerUnit();\n    if (targetMetersPerUnit !== undefined) {\n        sourceResolution *= targetMetersPerUnit;\n    }\n    var sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n    if (sourceMetersPerUnit !== undefined) {\n        sourceResolution /= sourceMetersPerUnit;\n    }\n    // Based on the projection properties, the point resolution at the specified\n    // coordinates may be slightly different. We need to reverse-compensate this\n    // in order to achieve optimal results.\n    var sourceExtent = sourceProj.getExtent();\n    if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n        var compensationFactor = getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n            sourceResolution;\n        if (isFinite(compensationFactor) && compensationFactor > 0) {\n            sourceResolution /= compensationFactor;\n        }\n    }\n    return sourceResolution;\n}\n/**\n * Calculates ideal resoluti
 on to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(sourceProj, targetProj, targetExtent, targetResolution) {\n    var targetCenter = getCenter(targetExtent);\n    var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n        forEachCorner(targetExtent, fun
 ction (corner) {\n            sourceResolution = calculateSourceResolution(sourceProj, targetProj, corner, targetResolution);\n            return isFinite(sourceResolution) && sourceResolution > 0;\n        });\n    }\n    return sourceResolution;\n}\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation\n * Calculated triangulation.\n * @param {Array<{extent: import(\"./extent.js\").Extent,\n *                 image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources\n *
  Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean=} opt_renderEdges Render reprojection edges.\n * @param {object=} opt_contextOptions Properties to set on the canvas context.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width, height, pixelRatio, sourceResolution, sourceExtent, targetResolution, targetExtent, triangulation, sources, gutter, opt_renderEdges, opt_contextOptions) {\n    var context = createCanvasContext2D(Math.round(pixelRatio * width), Math.round(pixelRatio * height));\n    assign(context, opt_contextOptions);\n    if (sources.length === 0) {\n        return context.canvas;\n    }\n    context.scale(pixelRatio, pixelRatio);\n    function pixelRound(value) {\n        return Math.round(value * pixelRatio) / pixelRatio;\n    }\n    context.globalCompositeOperation = 'lighter';\n    var sourceDataExtent = createEmpty();\n    sources.forEach(function (src, i, arr) {\n        extend(source
 DataExtent, src.extent);\n    });\n    var canvasWidthInUnits = getWidth(sourceDataExtent);\n    var canvasHeightInUnits = getHeight(sourceDataExtent);\n    var stitchContext = createCanvasContext2D(Math.round((pixelRatio * canvasWidthInUnits) / sourceResolution), Math.round((pixelRatio * canvasHeightInUnits) / sourceResolution));\n    assign(stitchContext, opt_contextOptions);\n    var stitchScale = pixelRatio / sourceResolution;\n    sources.forEach(function (src, i, arr) {\n        var xPos = src.extent[0] - sourceDataExtent[0];\n        var yPos = -(src.extent[3] - sourceDataExtent[3]);\n        var srcWidth = getWidth(src.extent);\n        var srcHeight = getHeight(src.extent);\n        // This test should never fail -- but it does. Need to find a fix the upstream condition\n        if (src.image.width > 0 && src.image.height > 0) {\n            stitchContext.drawImage(src.image, gutter, gutter, src.image.width - 2 * gutter, src.image.height - 2 * gutter, xPos * stitchScale, yP
 os * stitchScale, srcWidth * stitchScale, srcHeight * stitchScale);\n        }\n    });\n    var targetTopLeft = getTopLeft(targetExtent);\n    triangulation.getTriangles().forEach(function (triangle, i, arr) {\n        /* Calculate affine transform (src -> dst)\n         * Resulting matrix can be used to transform coordinate\n         * from `sourceProjection` to destination pixels.\n         *\n         * To optimize number of context calls and increase numerical stability,\n         * we also do the following operations:\n         * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n         * here before solving the linear system so [ui, vi] are pixel coordinates.\n         *\n         * Src points: xi, yi\n         * Dst points: ui, vi\n         * Affine coefficients: aij\n         *\n         * | x0 y0 1  0  0 0 |   |a00|   |u0|\n         * | x1 y1 1  0  0 0 |   |a01|   |u1|\n         * | x2 y2 1  0  0 0 | x |a02| = |u2|\n         * |  0  0 0 x0 y0 1 |   |
 a10|   |v0|\n         * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n         * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n         */\n        var source = triangle.source;\n        var target = triangle.target;\n        var x0 = source[0][0], y0 = source[0][1];\n        var x1 = source[1][0], y1 = source[1][1];\n        var x2 = source[2][0], y2 = source[2][1];\n        // Make sure that everything is on pixel boundaries\n        var u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n        var v0 = pixelRound(-(target[0][1] - targetTopLeft[1]) / targetResolution);\n        var u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n        var v1 = pixelRound(-(target[1][1] - targetTopLeft[1]) / targetResolution);\n        var u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n        var v2 = pixelRound(-(target[2][1] - targetTopLeft[1]) / targetResolution);\n        // Shift all the source points to improve numerical stability\n       
  // of all the subsequent calculations. The [x0, y0] is used here.\n        // This is also used to simplify the linear system.\n        var sourceNumericalShiftX = x0;\n        var sourceNumericalShiftY = y0;\n        x0 = 0;\n        y0 = 0;\n        x1 -= sourceNumericalShiftX;\n        y1 -= sourceNumericalShiftY;\n        x2 -= sourceNumericalShiftX;\n        y2 -= sourceNumericalShiftY;\n        var augmentedMatrix = [\n            [x1, y1, 0, 0, u1 - u0],\n            [x2, y2, 0, 0, u2 - u0],\n            [0, 0, x1, y1, v1 - v0],\n            [0, 0, x2, y2, v2 - v0],\n        ];\n        var affineCoefs = solveLinearSystem(augmentedMatrix);\n        if (!affineCoefs) {\n            return;\n        }\n        context.save();\n        context.beginPath();\n        if (isBrokenDiagonalRendering() ||\n            opt_contextOptions === IMAGE_SMOOTHING_DISABLED) {\n            // Make sure that all lines are horizontal or vertical\n            context.moveTo(u1, v1);\n           
  // This is the diagonal line. Do it in 4 steps\n            var steps = 4;\n            var ud = u0 - u1;\n            var vd = v0 - v1;\n            for (var step = 0; step < steps; step++) {\n                // Go horizontally\n                context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound((step * vd) / (steps - 1)));\n                // Go vertically\n                if (step != steps - 1) {\n                    context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound(((step + 1) * vd) / (steps - 1)));\n                }\n            }\n            // We are almost at u0r, v0r\n            context.lineTo(u2, v2);\n        }\n        else {\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n        }\n        context.clip();\n        context.transform(affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n        context.translate(sourceDataExtent[0] - sou
 rceNumericalShiftX, sourceDataExtent[3] - sourceNumericalShiftY);\n        context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio);\n        context.drawImage(stitchContext.canvas, 0, 0);\n        context.restore();\n    });\n    if (opt_renderEdges) {\n        context.save();\n        context.globalCompositeOperation = 'source-over';\n        context.strokeStyle = 'black';\n        context.lineWidth = 1;\n        triangulation.getTriangles().forEach(function (triangle, i, arr) {\n            var target = triangle.target;\n            var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n            var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n            var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n            var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n            var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n            var v2 = -(target[2][1] - targetTopLeft[1]) / targetR
 esolution;\n            context.beginPath();\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n            context.closePath();\n            context.stroke();\n        });\n        context.restore();\n    }\n    return context.canvas;\n}\n//# sourceMappingURL=reproj.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport { boundingExtent, createEmpty, extendCoordinate, getArea, getBottomLeft, getBottomRight, getTopLeft, getTopRight, getWidth, intersects, } from '../extent.js';\nimport { getTransform } from '../proj.js';\nimport { log2, modulo } from '../math.js';\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target\n */\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high mem
 ory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nvar MAX_SUBDIVISION = 10;\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nvar MAX_TRIANGLE_WIDTH = 0.25;\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nvar Triangulation = /** @class */ (function () {\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n     * @param {import(\"../proj
 /Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n     * @param {import(\"../extent.js\").Extent} maxSourceExtent Maximal source extent that can be used.\n     * @param {number} errorThreshold Acceptable error (in source units).\n     * @param {?number} opt_destinationResolution The (optional) resolution of the destination.\n     */\n    function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, opt_destinationResolution) {\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         * @private\n         */\n        this.sourceProj_ = sourceProj;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         * @private\n         */\n        this.targetProj_ = targetProj;\n        /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n        var transformInvCache = {};\n        var trans
 formInv = getTransform(this.targetProj_, this.sourceProj_);\n        /**\n         * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n         * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n         * @private\n         */\n        this.transformInv_ = function (c) {\n            var key = c[0] + '/' + c[1];\n            if (!transformInvCache[key]) {\n                transformInvCache[key] = transformInv(c);\n            }\n            return transformInvCache[key];\n        };\n        /**\n         * @type {import(\"../extent.js\").Extent}\n         * @private\n         */\n        this.maxSourceExtent_ = maxSourceExtent;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n        /**\n         * @type {Array<Triangle>}\n         * @private\n         */\n        this.triangles_ = [];\n        /**\n         * Indicates that the triangulation
  crosses edge of the source projection.\n         * @type {boolean}\n         * @private\n         */\n        this.wrapsXInSource_ = false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.canWrapXInSource_ =\n            this.sourceProj_.canWrapX() &&\n                !!maxSourceExtent &&\n                !!this.sourceProj_.getExtent() &&\n                getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent());\n        /**\n         * @type {?number}\n         * @private\n         */\n        this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n            ? getWidth(this.sourceProj_.getExtent())\n            : null;\n        /**\n         * @type {?number}\n         * @private\n         */\n        this.targetWorldWidth_ = this.targetProj_.getExtent()\n            ? getWidth(this.targetProj_.getExtent())\n            : null;\n        var destinationTopLeft = getTopLeft(targetExtent);\n        var destinationTopRight = getTopR
 ight(targetExtent);\n        var destinationBottomRight = getBottomRight(targetExtent);\n        var destinationBottomLeft = getBottomLeft(targetExtent);\n        var sourceTopLeft = this.transformInv_(destinationTopLeft);\n        var sourceTopRight = this.transformInv_(destinationTopRight);\n        var sourceBottomRight = this.transformInv_(destinationBottomRight);\n        var sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n        /*\n         * The maxSubdivision controls how many splittings of the target area can\n         * be done. The idea here is to do a linear mapping of the target areas\n         * but the actual overal reprojection (can be) extremely non-linear. The\n         * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n         * tile size. However this function is also called to remap canvas rendered\n         * layers which can be much larger. This calculation increases the maxSubdivision\n         * value by the right fac
 tor so that each 256x256 pixel area has\n         * MAX_SUBDIVISION divisions.\n         */\n        var maxSubdivision = MAX_SUBDIVISION +\n            (opt_destinationResolution\n                ? Math.max(0, Math.ceil(log2(getArea(targetExtent) /\n                    (opt_destinationResolution *\n                        opt_destinationResolution *\n                        256 *\n                        256))))\n                : 0);\n        this.addQuad_(destinationTopLeft, destinationTopRight, destinationBottomRight, destinationBottomLeft, sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft, maxSubdivision);\n        if (this.wrapsXInSource_) {\n            var leftBound_1 = Infinity;\n            this.triangles_.forEach(function (triangle, i, arr) {\n                leftBound_1 = Math.min(leftBound_1, triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n            });\n            // Shift triangles to be as close to `leftBound` as possible\n 
            // (if the distance is more than `worldWidth / 2` it can be closer.\n            this.triangles_.forEach(function (triangle) {\n                if (Math.max(triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]) -\n                    leftBound_1 >\n                    this.sourceWorldWidth_ / 2) {\n                    var newTriangle = [\n                        [triangle.source[0][0], triangle.source[0][1]],\n                        [triangle.source[1][0], triangle.source[1][1]],\n                        [triangle.source[2][0], triangle.source[2][1]],\n                    ];\n                    if (newTriangle[0][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[0][0] -= this.sourceWorldWidth_;\n                    }\n                    if (newTriangle[1][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[1][0] -= this.sourceWorldWidth_;\n                    }\n                    if 
 (newTriangle[2][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[2][0] -= this.sourceWorldWidth_;\n                    }\n                    // Rarely (if the extent contains both the dateline and prime meridian)\n                    // the shift can in turn break some triangles.\n                    // Detect this here and don't shift in such cases.\n                    var minX = Math.min(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    var maxX = Math.max(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    if (maxX - minX < this.sourceWorldWidth_ / 2) {\n                        triangle.source = newTriangle;\n                    }\n                }\n            }.bind(this));\n        }\n        transformInvCache = {};\n    }\n    /**\n     * Adds triangle to the triangulation.\n     * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n     * @param {import(\"
 ../coordinate.js\").Coordinate} b The target b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n     * @private\n     */\n    Triangulation.prototype.addTriangle_ = function (a, b, c, aSrc, bSrc, cSrc) {\n        this.triangles_.push({\n            source: [aSrc, bSrc, cSrc],\n            target: [a, b, c],\n        });\n    };\n    /**\n     * Adds quad (points in clock-wise order) to the triangulation\n     * (and reprojects the vertices) if valid.\n     * Performs quad subdivision if needed to increase precision.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} b The target b co
 ordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n     * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n     * @private\n     */\n    Triangulation.prototype.addQuad_ = function (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n        var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n        var sourceCoverageX = this.sourceWorldWidth_\n            ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n            : null;\n        var sourceWorldWidth = /** @type {nu
 mber} */ (this.sourceWorldWidth_);\n        // when the quad is wrapped in the source projection\n        // it covers most of the projection extent, but not fully\n        var wrapsX = this.sourceProj_.canWrapX() &&\n            sourceCoverageX > 0.5 &&\n            sourceCoverageX < 1;\n        var needsSubdivision = false;\n        if (maxSubdivision > 0) {\n            if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n                var targetQuadExtent = boundingExtent([a, b, c, d]);\n                var targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;\n                needsSubdivision =\n                    targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n            if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n                needsSubdivision =\n                    sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n        }\n        if (!needsSubdivision && this.maxSourceE
 xtent_) {\n            if (isFinite(sourceQuadExtent[0]) &&\n                isFinite(sourceQuadExtent[1]) &&\n                isFinite(sourceQuadExtent[2]) &&\n                isFinite(sourceQuadExtent[3])) {\n                if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n                    // whole quad outside source projection extent -> ignore\n                    return;\n                }\n            }\n        }\n        var isNotFinite = 0;\n        if (!needsSubdivision) {\n            if (!isFinite(aSrc[0]) ||\n                !isFinite(aSrc[1]) ||\n                !isFinite(bSrc[0]) ||\n                !isFinite(bSrc[1]) ||\n                !isFinite(cSrc[0]) ||\n                !isFinite(cSrc[1]) ||\n                !isFinite(dSrc[0]) ||\n                !isFinite(dSrc[1])) {\n                if (maxSubdivision > 0) {\n                    needsSubdivision = true;\n                }\n                else {\n                    // It might be the case that 
 only 1 of the points is infinite. In this case\n                    // we can draw a single triangle with the other three points\n                    isNotFinite =\n                        (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n                            (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) +\n                            (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n                            (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n                    if (isNotFinite != 1 &&\n                        isNotFinite != 2 &&\n                        isNotFinite != 4 &&\n                        isNotFinite != 8) {\n                        return;\n                    }\n                }\n            }\n        }\n        if (maxSubdivision > 0) {\n            if (!needsSubdivision) {\n                var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n                var centerSrc = this.transformInv_(center);\n                var dx =
  void 0;\n                if (wrapsX) {\n                    var centerSrcEstimX = (modulo(aSrc[0], sourceWorldWidth) +\n                        modulo(cSrc[0], sourceWorldWidth)) /\n                        2;\n                    dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n                }\n                else {\n                    dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n                }\n                var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n                var centerSrcErrorSquared = dx * dx + dy * dy;\n                needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n            }\n            if (needsSubdivision) {\n                if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n                    // split horizontally (top & bottom)\n                    var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n                    var bcSrc = this.transformInv_(bc);\n                    var da = [(d[0] + a[0]) / 2
 , (d[1] + a[1]) / 2];\n                    var daSrc = this.transformInv_(da);\n                    this.addQuad_(a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n                    this.addQuad_(da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n                }\n                else {\n                    // split vertically (left & right)\n                    var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n                    var abSrc = this.transformInv_(ab);\n                    var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n                    var cdSrc = this.transformInv_(cd);\n                    this.addQuad_(a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n                    this.addQuad_(ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n                }\n                return;\n            }\n        }\n        if (wrapsX) {\n            if (!this.canWrapXInSource_) {\n                return;\n            }\n   
          this.wrapsXInSource_ = true;\n        }\n        // Exactly zero or one of *Src is not finite\n        // The triangles must have the diagonal line as the first side\n        // This is to allow easy code in reproj.s to make it straight for broken\n        // browsers that can't handle diagonal clipping\n        if ((isNotFinite & 0xb) == 0) {\n            this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n        }\n        if ((isNotFinite & 0xe) == 0) {\n            this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n        }\n        if (isNotFinite) {\n            // Try the other two triangles\n            if ((isNotFinite & 0xd) == 0) {\n                this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n            }\n            if ((isNotFinite & 0x7) == 0) {\n                this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n            }\n        }\n    };\n    /**\n     * Calculates extent of the 'source' coordinates from all the triangles.\n     *\n     * @return {import(\"../
 extent.js\").Extent} Calculated extent.\n     */\n    Triangulation.prototype.calculateSourceExtent = function () {\n        var extent = createEmpty();\n        this.triangles_.forEach(function (triangle, i, arr) {\n            var src = triangle.source;\n            extendCoordinate(extent, src[0]);\n            extendCoordinate(extent, src[1]);\n            extendCoordinate(extent, src[2]);\n        });\n        return extent;\n    };\n    /**\n     * @return {Array<Triangle>} Array of the calculated triangles.\n     */\n    Triangulation.prototype.getTriangles = function () {\n        return this.triangles_;\n    };\n    return Triangulation;\n}());\nexport default Triangulation;\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/source/common\n */\n/**\n * Default WMS version.\n * @type {string}\n */\nexport var DEFAULT_WMS_VERSION = '1.3.0';\n/**\n * Context options to disable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_DISABLED = {\n    i
 mageSmoothingEnabled: false,\n    msImageSmoothingEnabled: false,\n};\n//# sourceMappingURL=common.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/reproj/Tile\n */\nimport { ERROR_THRESHOLD } from './common.js';\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceExtentRes
 olution, render as renderReprojected, } from '../reproj.js';\nimport { clamp } from '../math.js';\nimport { getArea, getIntersection } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /** @class */ (function (_super) {\n    __extends(ReprojTile, _super);\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of
  the tile.\n     * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {number} gutter Gutter of the source tiles.\n     * @param {FunctionType} getTileFunction\n     *     Function returning source tiles (z, x, y, pixelRatio).\n     * @param {number=} opt_errorThreshold Acceptable reprojection error (in px).\n     * @param {boolean=} opt_renderEdges Render reprojection edges.\n     * @param {object=} opt_contextOptions Properties to set on the canvas context.\n     */\n    function ReprojTile(sourceProj, sourceTileGrid, targetProj, targetTileGrid, tileCoord, wrappedTileCoord, pixelRatio, gutter, getTileFunction, opt_errorThreshold, opt_renderEdges, opt_contextOptions) {\n        var _this = _super.call(this, tileCoord, TileState.IDLE) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderEdges_ = opt_renderEdges !== undef
 ined ? opt_renderEdges : false;\n        /**\n         * @private\n         * @type {object}\n         */\n        _this.contextOptions_ = opt_contextOptions;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.gutter_ = gutter;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.sourceTileGrid_ = sourceTileGrid;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.targetTileGrid_ = targetTileGrid;\n        /**\n         * @private\n         * @type {import(\"../tilecoord.js\").TileCoord}\n         */\n        _this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : ti
 leCoord;\n        /**\n         * @private\n         * @type {!Array<import(\"../Tile.js\").default>}\n         */\n        _this.sourceTiles_ = [];\n        /**\n         * @private\n         * @type {?Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.sourcesListenerKeys_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.sourceZ_ = 0;\n        var targetExtent = targetTileGrid.getTileCoordExtent(_this.wrappedTileCoord_);\n        var maxTargetExtent = _this.targetTileGrid_.getExtent();\n        var maxSourceExtent = _this.sourceTileGrid_.getExtent();\n        var limitedTargetExtent = maxTargetExtent\n            ? getIntersection(targetExtent, maxTargetExtent)\n            : targetExtent;\n        if (getArea(limitedTargetExtent) === 0) {\n            // Tile is completely outside range -> EMPTY\n            // TODO: is it actually correct that the source even creates the tile ?\n            _this.state = TileStat
 e.EMPTY;\n            return _this;\n        }\n        var sourceProjExtent = sourceProj.getExtent();\n        if (sourceProjExtent) {\n            if (!maxSourceExtent) {\n                maxSourceExtent = sourceProjExtent;\n            }\n            else {\n                maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n            }\n        }\n        var targetResolution = targetTileGrid.getResolution(_this.wrappedTileCoord_[0]);\n        var sourceResolution = calculateSourceExtentResolution(sourceProj, targetProj, limitedTargetExtent, targetResolution);\n        if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n            // invalid sourceResolution -> EMPTY\n            // probably edges of the projections when no extent is defined\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        var errorThresholdInPixels = opt_errorThreshold !== undefined ? opt_errorThreshold : ERROR_THRESHOLD;\n        /**\n   
       * @private\n         * @type {!import(\"./Triangulation.js\").default}\n         */\n        _this.triangulation_ = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        if (_this.triangulation_.getTriangles().length === 0) {\n            // no valid triangles -> EMPTY\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        _this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n        var sourceExtent = _this.triangulation_.calculateSourceExtent();\n        if (maxSourceExtent) {\n            if (sourceProj.canWrapX()) {\n                sourceExtent[1] = clamp(sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n                sourceExtent[3] = clamp(sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n            }\n            else {\n                sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n  
           }\n        }\n        if (!getArea(sourceExtent)) {\n            _this.state = TileState.EMPTY;\n        }\n        else {\n            var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(sourceExtent, _this.sourceZ_);\n            for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n                for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n                    var tile = getTileFunction(_this.sourceZ_, srcX, srcY, pixelRatio);\n                    if (tile) {\n                        _this.sourceTiles_.push(tile);\n                    }\n                }\n            }\n            if (_this.sourceTiles_.length === 0) {\n                _this.state = TileState.EMPTY;\n            }\n        }\n        return _this;\n    }\n    /**\n     * Get the HTML Canvas element for this tile.\n     * @return {HTMLCanvasElement} Canvas.\n     */\n    ReprojTile.prototype.getImage = function () {\n        return this.canvas_;\n    }
 ;\n    /**\n     * @private\n     */\n    ReprojTile.prototype.reproject_ = function () {\n        var sources = [];\n        this.sourceTiles_.forEach(function (tile, i, arr) {\n            if (tile && tile.getState() == TileState.LOADED) {\n                sources.push({\n                    extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n                    image: tile.getImage(),\n                });\n            }\n        }.bind(this));\n        this.sourceTiles_.length = 0;\n        if (sources.length === 0) {\n            this.state = TileState.ERROR;\n        }\n        else {\n            var z = this.wrappedTileCoord_[0];\n            var size = this.targetTileGrid_.getTileSize(z);\n            var width = typeof size === 'number' ? size : size[0];\n            var height = typeof size === 'number' ? size : size[1];\n            var targetResolution = this.targetTileGrid_.getResolution(z);\n            var sourceResolution = this.sourceTileGrid_.getResol
 ution(this.sourceZ_);\n            var targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n            this.canvas_ = renderReprojected(width, height, this.pixelRatio_, sourceResolution, this.sourceTileGrid_.getExtent(), targetResolution, targetExtent, this.triangulation_, sources, this.gutter_, this.renderEdges_, this.contextOptions_);\n            this.state = TileState.LOADED;\n        }\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ReprojTile.prototype.load = function () {\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            this.changed();\n            var leftToLoad_1 = 0;\n            this.sourcesListenerKeys_ = [];\n            this.sourceTiles_.forEach(function (tile, i, arr) {\n                var state = tile.getState();\n                if (state == TileState.IDLE || state == TileState.LOADING) {\n                    leftToLoad_1++;\n                 
    var sourceListenKey_1 = listen(tile, EventType.CHANGE, function (e) {\n                        var state = tile.getState();\n                        if (state == TileState.LOADED ||\n                            state == TileState.ERROR ||\n                            state == TileState.EMPTY) {\n                            unlistenByKey(sourceListenKey_1);\n                            leftToLoad_1--;\n                            if (leftToLoad_1 === 0) {\n                                this.unlistenSources_();\n                                this.reproject_();\n                            }\n                        }\n                    }, this);\n                    this.sourcesListenerKeys_.push(sourceListenKey_1);\n                }\n            }.bind(this));\n            this.sourceTiles_.forEach(function (tile, i, arr) {\n                var state = tile.getState();\n                if (state == TileState.IDLE) {\n                    tile.load();\n                }\n    
         });\n            if (leftToLoad_1 === 0) {\n                setTimeout(this.reproject_.bind(this), 0);\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    ReprojTile.prototype.unlistenSources_ = function () {\n        this.sourcesListenerKeys_.forEach(unlistenByKey);\n        this.sourcesListenerKeys_ = null;\n    };\n    return ReprojTile;\n}(Tile));\nexport default ReprojTile;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/reproj/common\n */\n/**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport var ERROR_THRESHOLD = 0.5;\n/**\n * Enable automatic reprojection of raster sources. Default is `true`.\n * TODO: decide if we want to expose this as a build flag or remove it\n * @type {boolean}\n */\nexport var ENABLE_RASTER_REPROJECTION = true;\n//# sourceMappingURL=common.js.map","/**\n * @module ol/structs/LRUCache\n */\nimport { assert } from '../asserts.js';\n/**\n * @typedef {
 Object} Entry\n * @property {string} key_\n * @property {Object} newer\n * @property {Object} older\n * @property {*} value_\n */\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nvar LRUCache = /** @class */ (function () {\n    /**\n     * @param {number=} opt_highWaterMark High water mark.\n     */\n    function LRUCache(opt_highWaterMark) {\n        /**\n         * Desired max cache size after expireCache(). If set to 0, no cache entries\n         * will be pruned at all.\n         * @type {number}\n         */\n        this.highWaterMark =\n            opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.count_ = 0;\n      
   /**\n         * @private\n         * @type {!Object<string, Entry>}\n         */\n        this.entries_ = {};\n        /**\n         * @private\n         * @type {?Entry}\n         */\n        this.oldest_ = null;\n        /**\n         * @private\n         * @type {?Entry}\n         */\n        this.newest_ = null;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    LRUCache.prototype.canExpireCache = function () {\n        return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    LRUCache.prototype.clear = function () {\n        this.count_ = 0;\n        this.entries_ = {};\n        this.oldest_ = null;\n        this.newest_ = null;\n    };\n    /**\n     * @param {string} key Key.\n     * @return {boolean} Contains key.\n     */\n    LRUCache.prototype.containsKey = function (key) {\n        return this.entries_.hasOwnProperty(key);\n    };\n    /**\n     * @param {functi
 on(T, string, LRUCache<T>): ?} f The function\n     *     to call for every entry from the oldest to the newer. This function takes\n     *     3 arguments (the entry value, the entry key and the LRUCache object).\n     *     The return value is ignored.\n     */\n    LRUCache.prototype.forEach = function (f) {\n        var entry = this.oldest_;\n        while (entry) {\n            f(entry.value_, entry.key_, this);\n            entry = entry.newer;\n        }\n    };\n    /**\n     * @param {string} key Key.\n     * @param {*=} opt_options Options (reserverd for subclasses).\n     * @return {T} Value.\n     */\n    LRUCache.prototype.get = function (key, opt_options) {\n        var entry = this.entries_[key];\n        assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n        if (entry === this.newest_) {\n            return entry.value_;\n        }\n        else if (entry === this.oldest_) {\n            this.oldest_ = /** @type {
 Entry} */ (this.oldest_.newer);\n            this.oldest_.older = null;\n        }\n        else {\n            entry.newer.older = entry.older;\n            entry.older.newer = entry.newer;\n        }\n        entry.newer = null;\n        entry.older = this.newest_;\n        this.newest_.newer = entry;\n        this.newest_ = entry;\n        return entry.value_;\n    };\n    /**\n     * Remove an entry from the cache.\n     * @param {string} key The entry key.\n     * @return {T} The removed entry.\n     */\n    LRUCache.prototype.remove = function (key) {\n        var entry = this.entries_[key];\n        assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n        if (entry === this.newest_) {\n            this.newest_ = /** @type {Entry} */ (entry.older);\n            if (this.newest_) {\n                this.newest_.newer = null;\n            }\n        }\n        else if (entry === this.oldest_) {\n            this.oldest_ = /** @
 type {Entry} */ (entry.newer);\n            if (this.oldest_) {\n                this.oldest_.older = null;\n            }\n        }\n        else {\n            entry.newer.older = entry.older;\n            entry.older.newer = entry.newer;\n        }\n        delete this.entries_[key];\n        --this.count_;\n        return entry.value_;\n    };\n    /**\n     * @return {number} Count.\n     */\n    LRUCache.prototype.getCount = function () {\n        return this.count_;\n    };\n    /**\n     * @return {Array<string>} Keys.\n     */\n    LRUCache.prototype.getKeys = function () {\n        var keys = new Array(this.count_);\n        var i = 0;\n        var entry;\n        for (entry = this.newest_; entry; entry = entry.older) {\n            keys[i++] = entry.key_;\n        }\n        return keys;\n    };\n    /**\n     * @return {Array<T>} Values.\n     */\n    LRUCache.prototype.getValues = function () {\n        var values = new Array(this.count_);\n        var i = 0;\n        
 var entry;\n        for (entry = this.newest_; entry; entry = entry.older) {\n            values[i++] = entry.value_;\n        }\n        return values;\n    };\n    /**\n     * @return {T} Last value.\n     */\n    LRUCache.prototype.peekLast = function () {\n        return this.oldest_.value_;\n    };\n    /**\n     * @return {string} Last key.\n     */\n    LRUCache.prototype.peekLastKey = function () {\n        return this.oldest_.key_;\n    };\n    /**\n     * Get the key of the newest item in the cache.  Throws if the cache is empty.\n     * @return {string} The newest key.\n     */\n    LRUCache.prototype.peekFirstKey = function () {\n        return this.newest_.key_;\n    };\n    /**\n     * @return {T} value Value.\n     */\n    LRUCache.prototype.pop = function () {\n        var entry = this.oldest_;\n        delete this.entries_[entry.key_];\n        if (entry.newer) {\n            entry.newer.older = null;\n        }\n        this.oldest_ = /** @type {Entry} */ (entry.ne
 wer);\n        if (!this.oldest_) {\n            this.newest_ = null;\n        }\n        --this.count_;\n        return entry.value_;\n    };\n    /**\n     * @param {string} key Key.\n     * @param {T} value Value.\n     */\n    LRUCache.prototype.replace = function (key, value) {\n        this.get(key); // update `newest_`\n        this.entries_[key].value_ = value;\n    };\n    /**\n     * @param {string} key Key.\n     * @param {T} value Value.\n     */\n    LRUCache.prototype.set = function (key, value) {\n        assert(!(key in this.entries_), 16); // Tried to set a value for a key that is used already\n        var entry = {\n            key_: key,\n            newer: null,\n            older: this.newest_,\n            value_: value,\n        };\n        if (!this.newest_) {\n            this.oldest_ = entry;\n        }\n        else {\n            this.newest_.newer = entry;\n        }\n        this.newest_ = entry;\n        this.entries_[key] = entry;\n        ++this.coun
 t_;\n    };\n    /**\n     * Set a maximum number of entries for the cache.\n     * @param {number} size Cache size.\n     * @api\n     */\n    LRUCache.prototype.setSize = function (size) {\n        this.highWaterMark = size;\n    };\n    return LRUCache;\n}());\nexport default LRUCache;\n//# sourceMappingURL=LRUCache.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/L
 RUCache.js';\nimport { fromKey, getKey } from './tilecoord.js';\nvar TileCache = /** @class */ (function (_super) {\n    __extends(TileCache, _super);\n    function TileCache() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileCache.prototype.expireCache = function (usedTiles) {\n        while (this.canExpireCache()) {\n            var tile = this.peekLast();\n            if (tile.getKey() in usedTiles) {\n                break;\n            }\n            else {\n                this.pop().release();\n            }\n        }\n    };\n    /**\n     * Prune all tiles from the cache that don't have the same z as the newest tile.\n     */\n    TileCache.prototype.pruneExceptNewestZ = function () {\n        if (this.getCount() === 0) {\n            return;\n        }\n        var key = this.peekFirstKey();\n        var tileCoord = fromKey(key);\n        var z = ti
 leCoord[0];\n        this.forEach(function (tile) {\n            if (tile.tileCoord[0] !== z) {\n                this.remove(getKey(tile.tileCoord));\n                tile.release();\n            }\n        }.bind(this));\n    };\n    return TileCache;\n}(LRUCache));\nexport default TileCache;\n//# sourceMappingURL=TileCache.js.map","/**\n * @module ol/source/TileEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a tile starts loading.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n     * @api\n     */\n    TILELOADSTART: 'tileloadstart',\n    /**\n     * Triggered when a tile finishes loading, either when its data is loaded,\n     * or when loading was aborted because the tile is no longer needed.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n     * @api\n     */\n    TILELOADEND: 'tileloadend',\n    /**\n     * Triggered if tile loading results in an error.\n     * @event module:ol/source/Tile.Tile
 SourceEvent#tileloaderror\n     * @api\n     */\n    TILELOADERROR: 'tileloaderror',\n};\n//# sourceMappingURL=TileEventType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport SourceState from './State.js';\nimport { abstract } from '../util.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * A function that returns a string or an array o
 f strings representing source\n * attributions.\n *\n * @typedef {function(import(\"../PluggableMap.js\").FrameState): (string|Array<string>)} Attribution\n */\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * * a simple string (e.g. `'© Acme Inc.'`)\n * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./State.js\").default} [state='ready']\n * @property {boolean} [wrapX=false]\n */\n/**\n * @classdesc\n * Abstract base 
 class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nvar Source = /** @class */ (function (_super) {\n    __extends(Source, _super);\n    /**\n     * @param {Options} options Source options.\n     */\n    function Source(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = getProjection(options.projection);\n        /**\n         * @private\n         * @type {?Attribution}\n         */\n        _this.attributions_ = adaptAttributions(options.attributions);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.attributionsCollapsible_ =\n            options.attributionsCollapsible !== undefined\n       
          ? options.attributionsCollapsible\n                : true;\n        /**\n         * This source is currently loading data. Sources that defer loading to the\n         * map's tile queue never set this to `true`.\n         * @type {boolean}\n         */\n        _this.loading = false;\n        /**\n         * @private\n         * @type {import(\"./State.js\").default}\n         */\n        _this.state_ =\n            options.state !== undefined ? options.state : SourceState.READY;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n        return _this;\n    }\n    /**\n     * Get the attribution function for the source.\n     * @return {?Attribution} Attribution function.\n     */\n    Source.prototype.getAttributions = function () {\n        return this.attributions_;\n    };\n    /**\n     * @return {boolean} Attributions are collapsible.\n     */\n    Source.prototype.get
 AttributionsCollapsible = function () {\n        return this.attributionsCollapsible_;\n    };\n    /**\n     * Get the projection of the source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    Source.prototype.getProjection = function () {\n        return this.projection_;\n    };\n    /**\n     * @abstract\n     * @return {Array<number>|undefined} Resolutions.\n     */\n    Source.prototype.getResolutions = function () {\n        return abstract();\n    };\n    /**\n     * Get the state of the source, see {@link module:ol/source/State~State} for possible states.\n     * @return {import(\"./State.js\").default} State.\n     * @api\n     */\n    Source.prototype.getState = function () {\n        return this.state_;\n    };\n    /**\n     * @return {boolean|undefined} Wrap X.\n     */\n    Source.prototype.getWrapX = function () {\n        return this.wrapX_;\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     
 */\n    Source.prototype.getContextOptions = function () {\n        return undefined;\n    };\n    /**\n     * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n     * @api\n     */\n    Source.prototype.refresh = function () {\n        this.changed();\n    };\n    /**\n     * Set the attributions of the source.\n     * @param {AttributionLike|undefined} attributions Attributions.\n     *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n     *     or `undefined`.\n     * @api\n     */\n    Source.prototype.setAttributions = function (attributions) {\n        this.attributions_ = adaptAttributions(attributions);\n        this.changed();\n    };\n    /**\n     * Set the state of the source.\n     * @param {import(\"./State.js\").default} state State.\n     */\n    Source.prototype.setState = function (state) {\n        this.state_ = state;\n        this.changed();\n    };\n    return Source;\n}(Ba
 seObject));\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {?Attribution} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n    if (!attributionLike) {\n        return null;\n    }\n    if (Array.isArray(attributionLike)) {\n        return function (frameState) {\n            return attributionLike;\n        };\n    }\n    if (typeof attributionLike === 'function') {\n        return attributionLike;\n    }\n    return function (frameState) {\n        return [attributionLike];\n    };\n}\nexport default Source;\n//# sourceMappingURL=Source.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b
 ) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport Source from './Source.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport { abstract } from '../util.js';\nimport { equivalent } from '../proj.js';\nimport { getKeyZXY, withinExtentAndZ } from '../tilecoord.js';\nimport { getForProjection as getTileGridForProjection, wrapX, } from '../tilegrid.js';\nimport { scale as scaleSize, toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @prope
 rty {number} [cacheSize]\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {number} [tilePixelRatio]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n * @property {number} [zDirection=0]\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n * @abstract\n * @api\n */\nvar TileSource = /** @class */ (function (_super) {\n    __extends(TileSource, _super);\n    /**\n     * @param {Options} options SourceTile source options.\n     */\n    function TileSource(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            
 attributionsCollapsible: options.attributionsCollapsible,\n            projection: options.projection,\n            state: options.state,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.opaque_ = options.opaque !== undefined ? options.opaque : false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.tilePixelRatio_ =\n            options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n        /**\n         * @protected\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n        var tileSize = [256, 256];\n        var tileGrid = options.tileGrid;\n        if (tileGrid) {\n            toSize(tileGrid.getTileSize(tileGrid.getMinZoom()), tileSize);\n        }\n        /**\n         * @protected\n         * @type {import(\"../TileCac
 he.js\").default}\n         */\n        _this.tileCache = new TileCache(options.cacheSize || 0);\n        /**\n         * @protected\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tmpSize = [0, 0];\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.key_ = options.key || '';\n        /**\n         * @protected\n         * @type {import(\"../Tile.js\").Options}\n         */\n        _this.tileOptions = { transition: options.transition };\n        /**\n         * zDirection hint, read by the renderer. Indicates which resolution should be used\n         * by a renderer if the views resolution does not match any resolution of the tile source.\n         * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n         * will be used. If -1, the nearest higher resolution will be used.\n         * @type {number}\n         */\n        _this.zDirection = options.zDirection ? options.zDirection : 0;\n   
      return _this;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    TileSource.prototype.canExpireCache = function () {\n        return this.tileCache.canExpireCache();\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileSource.prototype.expireCache = function (projection, usedTiles) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (tileCache) {\n            tileCache.expireCache(usedTiles);\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {number} z Zoom level.\n     * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n     * @param {function(import(\"../Tile.js\").default):(boolean|void)} callback Called with each\n     *     loaded tile.  If the callback returns `false`, the tile will not be\n     *     
 considered loaded.\n     * @return {boolean} The tile range is fully covered with loaded tiles.\n     */\n    TileSource.prototype.forEachLoadedTile = function (projection, z, tileRange, callback) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (!tileCache) {\n            return false;\n        }\n        var covered = true;\n        var tile, tileCoordKey, loaded;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                tileCoordKey = getKeyZXY(z, x, y);\n                loaded = false;\n                if (tileCache.containsKey(tileCoordKey)) {\n                    tile = /** @type {!import(\"../Tile.js\").default} */ (tileCache.get(tileCoordKey));\n                    loaded = tile.getState() === TileState.LOADED;\n                    if (loaded) {\n                        loaded = callback(tile) !== false;\n                    }\n                }\n 
                if (!loaded) {\n                    covered = false;\n                }\n            }\n        }\n        return covered;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {number} Gutter.\n     */\n    TileSource.prototype.getGutterForProjection = function (projection) {\n        return 0;\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     * @protected\n     */\n    TileSource.prototype.getKey = function () {\n        return this.key_;\n    };\n    /**\n     * Set the value to be used as the key for all tiles in the source.\n     * @param {string} key The key for tiles.\n     * @protected\n     */\n    TileSource.prototype.setKey = function (key) {\n        if (this.key_ !== key) {\n            this.key_ = key;\n            this.changed();\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").defa
 ult} projection Projection.\n     * @return {boolean} Opaque.\n     */\n    TileSource.prototype.getOpaque = function (projection) {\n        return this.opaque_;\n    };\n    /**\n     * @return {Array<number>} Resolutions.\n     */\n    TileSource.prototype.getResolutions = function () {\n        return this.tileGrid.getResolutions();\n    };\n    /**\n     * @abstract\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     */\n    TileSource.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        return abstract();\n    };\n    /**\n     * Return the tile grid of the tile source.\n     * @return {import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     * @api\n     */\n    TileSource.prototy
 pe.getTileGrid = function () {\n        return this.tileGrid;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    TileSource.prototype.getTileGridForProjection = function (projection) {\n        if (!this.tileGrid) {\n            return getTileGridForProjection(projection);\n        }\n        else {\n            return this.tileGrid;\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../TileCache.js\").default} Tile cache.\n     * @protected\n     */\n    TileSource.prototype.getTileCacheForProjection = function (projection) {\n        var thisProj = this.getProjection();\n        if (thisProj && !equivalent(thisProj, projection)) {\n            return null;\n        }\n        else {\n            return this.tileCache;\n        }\n    };\n    /**\n     * Get the ti
 le pixel ratio for this source. Subclasses may override this\n     * method, which is meant to return a supported pixel ratio that matches the\n     * provided `pixelRatio` as close as possible.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileSource.prototype.getTilePixelRatio = function (pixelRatio) {\n        return this.tilePixelRatio_;\n    };\n    /**\n     * @param {number} z Z.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../size.js\").Size} Tile size.\n     */\n    TileSource.prototype.getTilePixelSize = function (z, pixelRatio, projection) {\n        var tileGrid = this.getTileGridForProjection(projection);\n        var tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n        var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n        if (tilePixelRatio == 1) {\n            return tileSize
 ;\n        }\n        else {\n            return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n        }\n    };\n    /**\n     * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n     * is outside the resolution and extent range of the tile grid, `null` will be\n     * returned.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n     *     null if no tile URL should be created for the passed `tileCoord`.\n     */\n    TileSource.prototype.getTileCoordForTileUrlFunction = function (tileCoord, opt_projection) {\n        var projection = opt_projection !== undefined ? opt_projection : this.getProjection();\n        var tileGrid = this.getTileGridForProjection(projection);\n        if (this.getWrapX() && projection.isGlobal()
 ) {\n            tileCoord = wrapX(tileGrid, tileCoord, projection);\n        }\n        return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n    };\n    /**\n     * Remove all cached tiles from the source. The next render cycle will fetch new tiles.\n     * @api\n     */\n    TileSource.prototype.clear = function () {\n        this.tileCache.clear();\n    };\n    TileSource.prototype.refresh = function () {\n        this.clear();\n        _super.prototype.refresh.call(this);\n    };\n    /**\n     * Increases the cache size if needed\n     * @param {number} tileCount Minimum number of tiles needed.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    TileSource.prototype.updateCacheSize = function (tileCount, projection) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (tileCount > tileCache.highWaterMark) {\n            tileCache.highWaterMark = tileCount;\n        }\n    };\n    /**\n     * 
 Marks a tile coord as being used, without triggering a load.\n     * @abstract\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    TileSource.prototype.useTile = function (z, x, y, projection) { };\n    return TileSource;\n}(Source));\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nvar TileSourceEvent = /** @class */ (function (_super) {\n    __extends(TileSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Tile.js\").default} tile The tile.\n     */\n    function TileSourceEvent(type, tile) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The tile related to the event.\n         * @type {import(\"../Tile.js\").default}\n         * @api\n         */\n  
       _this.tile = tile;\n        return _this;\n    }\n    return TileSourceEvent;\n}(Event));\nexport { TileSourceEvent };\nexport default TileSource;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/tileurlfunction\n */\nimport { assert } from './asserts.js';\nimport { modulo } from './math.js';\nimport { hash as tileCoordHash } from './tilecoord.js';\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n    var zRegEx = /\\{z\\}/g;\n    var xRegEx = /\\{x\\}/g;\n    var yRegEx = /\\{y\\}/g;\n    var dashYRegEx = /\\{-y\\}/g;\n    return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|un
 defined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n        if (!tileCoord) {\n            return undefined;\n        }\n        else {\n            return template\n                .replace(zRegEx, tileCoord[0].toString())\n                .replace(xRegEx, tileCoord[1].toString())\n                .replace(yRegEx, tileCoord[2].toString())\n                .replace(dashYRegEx, function () {\n                var z = tileCoord[0];\n                var range = tileGrid.getFullTileRange(z);\n                assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n                var y = range.getHeight() - tileCoord[2] - 1;\n                return y.toString();\n            });\n        }\n    });\n}\n/**\n * @param {Array<string>} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(temp
 lates, tileGrid) {\n    var len = templates.length;\n    var tileUrlFunctions = new Array(len);\n    for (var i = 0; i < len; ++i) {\n        tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n    }\n    return createFromTileUrlFunctions(tileUrlFunctions);\n}\n/**\n * @param {Array<import(\"./Tile.js\").UrlFunction>} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n    if (tileUrlFunctions.length === 1) {\n        return tileUrlFunctions[0];\n    }\n    return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n        if (!tileCoord) {\n            return undefined;\n     
    }\n        else {\n            var h = tileCoordHash(tileCoord);\n            var index = modulo(h, tileUrlFunctions.length);\n            return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n        }\n    });\n}\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n    return undefined;\n}\n/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n    var urls = [];\n    var match = /\\{([a-z])-([a-z])\\}/.exec(url);\n    if (match) {\n        // char range\n        var startCharCode = match[1].charCodeAt(0);\n        var stopCharCode = match[2].charCodeAt(0);\n        var charCode = void 0;\n        for (charCode = startCharCode; charCode <
 = stopCharCode; ++charCode) {\n            urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n        }\n        return urls;\n    }\n    match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n    if (match) {\n        // number range\n        var stop_1 = parseInt(match[2], 10);\n        for (var i = parseInt(match[1], 10); i <= stop_1; i++) {\n            urls.push(url.replace(match[0], i.toString()));\n        }\n        return urls;\n    }\n    urls.push(url);\n    return urls;\n}\n//# sourceMappingURL=tileurlfunction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function _
 _() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/UrlTile\n */\nimport TileEventType from './TileEventType.js';\nimport TileSource, { TileSourceEvent } from './Tile.js';\nimport TileState from '../TileState.js';\nimport { createFromTemplates, expandUrl } from '../tileurlfunction.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {import(\"
 ../Tile.js\").LoadFunction} tileLoadFunction\n * @property {number} [tilePixelRatio]\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction]\n * @property {string} [url]\n * @property {Array<string>} [urls]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n * @property {number} [zDirection=0]\n */\n/**\n * @classdesc\n * Base class for sources providing tiles divided into a tile grid over http.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nvar UrlTile = /** @class */ (function (_super) {\n    __extends(UrlTile, _super);\n    /**\n     * @param {Options} options Image tile options.\n     */\n    function UrlTile(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            opaque: options.opaque,\n            projection: options.projection,\n            state: options.state,\n            tileGrid: options.tileGri
 d,\n            tilePixelRatio: options.tilePixelRatio,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            key: options.key,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.generateTileUrlFunction_ =\n            _this.tileUrlFunction === UrlTile.prototype.tileUrlFunction;\n        /**\n         * @protected\n         * @type {import(\"../Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction = options.tileLoadFunction;\n        if (options.tileUrlFunction) {\n            _this.tileUrlFunction = options.tileUrlFunction.bind(_this);\n        }\n        /**\n         * @protected\n         * @type {!Array<string>|null}\n         */\n        _this.urls = null;\n        if (options.urls) {\n            _this.setUrls(options.urls);\n        }\n        else
  if (options.url) {\n            _this.setUrl(options.url);\n        }\n        /**\n         * @private\n         * @type {!Object<string, boolean>}\n         */\n        _this.tileLoadingKeys_ = {};\n        return _this;\n    }\n    /**\n     * Return the tile load function of the source.\n     * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n     * @api\n     */\n    UrlTile.prototype.getTileLoadFunction = function () {\n        return this.tileLoadFunction;\n    };\n    /**\n     * Return the tile URL function of the source.\n     * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n     * @api\n     */\n    UrlTile.prototype.getTileUrlFunction = function () {\n        return this.tileUrlFunction;\n    };\n    /**\n     * Return the URLs used for this source.\n     * When a tileUrlFunction is used instead of url or urls,\n     * null will be returned.\n     * @return {!Array<string>|null} URLs.\n     * @api\n     */\n    UrlTile.prototype.getUrls = f
 unction () {\n        return this.urls;\n    };\n    /**\n     * Handle tile change events.\n     * @param {import(\"../events/Event.js\").default} event Event.\n     * @protected\n     */\n    UrlTile.prototype.handleTileChange = function (event) {\n        var tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n        var uid = getUid(tile);\n        var tileState = tile.getState();\n        var type;\n        if (tileState == TileState.LOADING) {\n            this.tileLoadingKeys_[uid] = true;\n            type = TileEventType.TILELOADSTART;\n        }\n        else if (uid in this.tileLoadingKeys_) {\n            delete this.tileLoadingKeys_[uid];\n            type =\n                tileState == TileState.ERROR\n                    ? TileEventType.TILELOADERROR\n                    : tileState == TileState.LOADED\n                        ? TileEventType.TILELOADEND\n                        : undefined;\n        }\n        if (type != undefined) {\n           
  this.dispatchEvent(new TileSourceEvent(type, tile));\n        }\n    };\n    /**\n     * Set the tile load function of the source.\n     * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @api\n     */\n    UrlTile.prototype.setTileLoadFunction = function (tileLoadFunction) {\n        this.tileCache.clear();\n        this.tileLoadFunction = tileLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the tile URL function of the source.\n     * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n     * @param {string=} key Optional new tile key for the source.\n     * @api\n     */\n    UrlTile.prototype.setTileUrlFunction = function (tileUrlFunction, key) {\n        this.tileUrlFunction = tileUrlFunction;\n        this.tileCache.pruneExceptNewestZ();\n        if (typeof key !== 'undefined') {\n            this.setKey(key);\n        }\n        else {\n            this.changed();\n        }\n    };\n    
 /**\n     * Set the URL to use for requests.\n     * @param {string} url URL.\n     * @api\n     */\n    UrlTile.prototype.setUrl = function (url) {\n        var urls = expandUrl(url);\n        this.urls = urls;\n        this.setUrls(urls);\n    };\n    /**\n     * Set the URLs to use for requests.\n     * @param {Array<string>} urls URLs.\n     * @api\n     */\n    UrlTile.prototype.setUrls = function (urls) {\n        this.urls = urls;\n        var key = urls.join('\\n');\n        if (this.generateTileUrlFunction_) {\n            this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n        }\n        else {\n            this.setKey(key);\n        }\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    UrlTile.prototype.tileUrlFunct
 ion = function (tileCoord, pixelRatio, projection) {\n        return undefined;\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     */\n    UrlTile.prototype.useTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            this.tileCache.get(tileCoordKey);\n        }\n    };\n    return UrlTile;\n}(TileSource));\nexport default UrlTile;\n//# sourceMappingURL=UrlTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStat
 ics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/TileImage\n */\nimport EventType from '../events/EventType.js';\nimport ImageTile from '../ImageTile.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../reproj/common.js';\nimport { IMAGE_SMOOTHING_DISABLED } from './common.js';\nimport { equivalent, get as getProjection } from '../proj.js';\nimport { getKey, getKeyZXY } from '../tilecoord.js';\nimport { getForProjection as getTileGridForProjection } from '../tilegrid.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attribut
 ions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./State.j
 s\").default} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` 
 or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest reso
 lution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Base class for sources providing images divided into a tile grid.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar TileImage = /** @class */ (function (_super) {\n    __extends(TileImage, _super);\n    /**\n     * @param {!Options} options Image tile options.\n     */\n    function TileImage(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            opaque: options.opaque,\n            projection: options.projection,\n            state: options.state,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction\n                ? options.tileLoadFunction\n                : defaultTileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction
 : options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            key: options.key,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @protected\n         * @type {?string}\n         */\n        _this.crossOrigin =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @protected\n         * @type {typeof ImageTile}\n         */\n        _this.tileClass =\n            options.tileClass !== undefined ? options.tileClass : ImageTile;\n        /**\n         * @protected\n         * @type {!Object<string, TileCache>}\n         */\n        _this.tileCacheForProjection = {};\n        /**\n         * @protected\n         * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n         */\n        _this
 .tileGridForProjection = {};\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n        /**\n         * @private\n         * @type {object|undefined}\n         */\n        _this.contextOptions_ =\n            options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderReprojectionEdges_ = false;\n        return _this;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    TileImage.prototype.canExpireCache = function () {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.canExpireCache.call(this);\n        }\n        if (this.tileCache.canExpireCache()) {\n            return true;\n        }\n        else {\n            for (var key in this.tileCacheForProjection) {\n                if (this.tileCacheForProjection
 [key].canExpireCache()) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileImage.prototype.expireCache = function (projection, usedTiles) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            _super.prototype.expireCache.call(this, projection, usedTiles);\n            return;\n        }\n        var usedTileCache = this.getTileCacheForProjection(projection);\n        this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});\n        for (var id in this.tileCacheForProjection) {\n            var tileCache = this.tileCacheForProjection[id];\n            tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n        }\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    TileImage.prototyp
 e.getContextOptions = function () {\n        return this.contextOptions_;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {number} Gutter.\n     */\n    TileImage.prototype.getGutterForProjection = function (projection) {\n        if (ENABLE_RASTER_REPROJECTION &&\n            this.getProjection() &&\n            projection &&\n            !equivalent(this.getProjection(), projection)) {\n            return 0;\n        }\n        else {\n            return this.getGutter();\n        }\n    };\n    /**\n     * @return {number} Gutter.\n     */\n    TileImage.prototype.getGutter = function () {\n        return 0;\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     * @protected\n     */\n    TileImage.prototype.getKey = function () {\n        return (_super.prototype.getKey.call(this) +\n            (this.contextOptions_ ? '\\n' + JSON.str
 ingify(this.contextOptions_) : ''));\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {boolean} Opaque.\n     */\n    TileImage.prototype.getOpaque = function (projection) {\n        if (ENABLE_RASTER_REPROJECTION &&\n            this.getProjection() &&\n            projection &&\n            !equivalent(this.getProjection(), projection)) {\n            return false;\n        }\n        else {\n            return _super.prototype.getOpaque.call(this, projection);\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    TileImage.prototype.getTileGridForProjection = function (projection) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.getTileGridForProjection.call(this, projection);\n        }\n        var thisProj = this.getProjection();\n      
   if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n            return this.tileGrid;\n        }\n        else {\n            var projKey = getUid(projection);\n            if (!(projKey in this.tileGridForProjection)) {\n                this.tileGridForProjection[projKey] = getTileGridForProjection(projection);\n            }\n            return this.tileGridForProjection[projKey];\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../TileCache.js\").default} Tile cache.\n     */\n    TileImage.prototype.getTileCacheForProjection = function (projection) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.getTileCacheForProjection.call(this, projection);\n        }\n        var thisProj = this.getProjection();\n        if (!thisProj || equivalent(thisProj, projection)) {\n            return this.tileCache;\n        }\n        else {\n            
 var projKey = getUid(projection);\n            if (!(projKey in this.tileCacheForProjection)) {\n                this.tileCacheForProjection[projKey] = new TileCache(this.tileCache.highWaterMark);\n            }\n            return this.tileCacheForProjection[projKey];\n        }\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {string} key The key set on the tile.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     * @private\n     */\n    TileImage.prototype.createTile_ = function (z, x, y, pixelRatio, projection, key) {\n        var tileCoord = [z, x, y];\n        var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var tileUrl = urlTileCoord\n            ? this.tileUrlFunction(urlTileCoord, 
 pixelRatio, projection)\n            : undefined;\n        var tile = new this.tileClass(tileCoord, tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY, tileUrl !== undefined ? tileUrl : '', this.crossOrigin, this.tileLoadFunction, this.tileOptions);\n        tile.key = key;\n        tile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this));\n        return tile;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     */\n    TileImage.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var sourceProjection = this.getProjection();\n        if (!ENABLE_RASTER_REPROJECTION ||\n            !sourceProjection ||\n            !projection ||\n            equivalent
 (sourceProjection, projection)) {\n            return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);\n        }\n        else {\n            var cache = this.getTileCacheForProjection(projection);\n            var tileCoord = [z, x, y];\n            var tile = void 0;\n            var tileCoordKey = getKey(tileCoord);\n            if (cache.containsKey(tileCoordKey)) {\n                tile = cache.get(tileCoordKey);\n            }\n            var key = this.getKey();\n            if (tile && tile.key == key) {\n                return tile;\n            }\n            else {\n                var sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n                var targetTileGrid = this.getTileGridForProjection(projection);\n                var wrappedTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n                var newTile = new ReprojTile(sourceProjection, sourceTileGrid, projection, targetTileGrid, tileCoord,
  wrappedTileCoord, this.getTilePixelRatio(pixelRatio), this.getGutter(), function (z, x, y, pixelRatio) {\n                    return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n                }.bind(this), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, this.contextOptions_);\n                newTile.key = key;\n                if (tile) {\n                    newTile.interimTile = tile;\n                    newTile.refreshInterimChain();\n                    cache.replace(tileCoordKey, newTile);\n                }\n                else {\n                    cache.set(tileCoordKey, newTile);\n                }\n                return newTile;\n            }\n        }\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {!import(\"../proj/Projection.js\").default} projection Projection.
 \n     * @return {!import(\"../Tile.js\").default} Tile.\n     * @protected\n     */\n    TileImage.prototype.getTileInternal = function (z, x, y, pixelRatio, projection) {\n        var tile = null;\n        var tileCoordKey = getKeyZXY(z, x, y);\n        var key = this.getKey();\n        if (!this.tileCache.containsKey(tileCoordKey)) {\n            tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n            this.tileCache.set(tileCoordKey, tile);\n        }\n        else {\n            tile = this.tileCache.get(tileCoordKey);\n            if (tile.key != key) {\n                // The source's params changed. If the tile has an interim tile and if we\n                // can use it then we use it. Otherwise we create a new tile.  In both\n                // cases we attempt to assign an interim tile to the new tile.\n                var interimTile = tile;\n                tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n                //make the new 
 tile the head of the list,\n                if (interimTile.getState() == TileState.IDLE) {\n                    //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it\n                    tile.interimTile = interimTile.interimTile;\n                }\n                else {\n                    tile.interimTile = interimTile;\n                }\n                tile.refreshInterimChain();\n                this.tileCache.replace(tileCoordKey, tile);\n            }\n        }\n        return tile;\n    };\n    /**\n     * Sets whether to render reprojection edges or not (usually for debugging).\n     * @param {boolean} render Render the edges.\n     * @api\n     */\n    TileImage.prototype.setRenderReprojectionEdges = function (render) {\n        if (!ENABLE_RASTER_REPROJECTION ||\n            this.renderReprojectionEdges_ == render) {\n            return;\n        }\n        this.renderReprojectionEdges_ = render;\n        for (var id in this.tileC
 acheForProjection) {\n            this.tileCacheForProjection[id].clear();\n        }\n        this.changed();\n    };\n    /**\n     * Sets the tile grid to use when reprojecting the tiles to the given\n     * projection instead of the default tile grid for the projection.\n     *\n     * This can be useful when the default tile grid cannot be created\n     * (e.g. projection has no extent defined) or\n     * for optimization reasons (custom tile size, resolutions, ...).\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n     * @api\n     */\n    TileImage.prototype.setTileGridForProjection = function (projection, tilegrid) {\n        if (ENABLE_RASTER_REPROJECTION) {\n            var proj = getProjection(projection);\n            if (proj) {\n                var projKey = getUid(proj);\n                if (!(projKey in this.tileGridForProje
 ction)) {\n                    this.tileGridForProjection[projKey] = tilegrid;\n                }\n            }\n        }\n    };\n    return TileImage;\n}(UrlTile));\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n    /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src = src;\n}\nexport default TileImage;\n//# sourceMappingURL=TileImage.js.map","/**\n * @module ol/net\n */\nimport { getUid } from './util.js';\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {string} url Request url. A 'callback' query parameter will be\n *     appended.\n * @param {Function} callback Callback on success.\n * @param {function()=} opt_errback Callback on error.\n * @param {string=} opt_callbackParam Custom query parameter for the JSONP\n *     callback. D
 efault is 'callback'.\n */\nexport function jsonp(url, callback, opt_errback, opt_callbackParam) {\n    var script = document.createElement('script');\n    var key = 'olc_' + getUid(callback);\n    function cleanup() {\n        delete window[key];\n        script.parentNode.removeChild(script);\n    }\n    script.async = true;\n    script.src =\n        url +\n            (url.indexOf('?') == -1 ? '?' : '&') +\n            (opt_callbackParam || 'callback') +\n            '=' +\n            key;\n    var timer = setTimeout(function () {\n        cleanup();\n        if (opt_errback) {\n            opt_errback();\n        }\n    }, 10000);\n    window[key] = function (data) {\n        clearTimeout(timer);\n        cleanup();\n        callback(data);\n    };\n    document.getElementsByTagName('head')[0].appendChild(script);\n}\n//# sourceMappingURL=net.js.map","/**\n * @module ol/source/BingMaps\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = fu
 nction (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { createFromTileUrlFunctions } from '../tileurlfunction.js';\nimport { createOrUpdate } from '../tilecoord.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @param {import('
 ../tilecoord.js').TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n    var z = tileCoord[0];\n    var digits = new Array(z);\n    var mask = 1 << (z - 1);\n    var i, charCode;\n    for (i = 0; i < z; ++i) {\n        // 48 is charCode for 0 - '0'.charCodeAt(0)\n        charCode = 48;\n        if (tileCoord[1] & mask) {\n            charCode += 1;\n        }\n        if (tileCoord[2] & mask) {\n            charCode += 2;\n        }\n        digits[i] = String.fromCharCode(charCode);\n        mask >>= 1;\n    }\n    return digits.join('');\n}\n/**\n * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’\n * Terms Of Use.\n * @const\n * @type {string}\n */\nvar TOS_ATTRIBUTION = '<a class=\"ol-attribution-bing-tos\" ' +\n    'href=\"https://www.microsoft.com/maps/product/terms.html\" target=\"_blank\">' +\n    'Terms of Use</a>';\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize]
  Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at http://www.bingmapsportal.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether 
 to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @property {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array<ResourceSet>} resourceSets The array of resource sets\n */\n/**\n * @typedef {Object} ResourceSet\n * @property {Array<Resource>} resources\n */\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array<string>} imageUrlSubdomains The image URL subdomains for rotatio
 n\n * @property {Array<ImageryProvider>} [imageryProviders] The array of ImageryProviders\n */\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array<CoverageArea>} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n/**\n * @typedef {Object} CoverageArea\n * @property {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array<number>} bbox The coverage bounding box\n */\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @api\n */\nvar BingMaps = /** @class */ (function (_super) {\n    __extends(BingMaps, _super);\n    /**\n     * @param {Options} options Bing Maps options.\n     */\n    function BingMaps(options) {\n        var _this = this;\n        var hidpi = options.hidpi !== undefined ? options.hidpi : false;\n        _this = _super.call(this, {\n            cacheSize: options.cacheSize,\n            crossOrigin: 'anonymous',\n            imageSmoothing: options.imageSmo
 othing,\n            opaque: true,\n            projection: getProjection('EPSG:3857'),\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: SourceState.LOADING,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: hidpi ? 2 : 1,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = hidpi;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.apiKey_ = options.key;\n        /**\n       
   * @private\n         * @type {string}\n         */\n        _this.imagerySet_ = options.imagerySet;\n        var url = 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +\n            _this.imagerySet_ +\n            '?uriScheme=https&include=ImageryProviders&key=' +\n            _this.apiKey_ +\n            '&c=' +\n            _this.culture_;\n        requestJSONP(url, _this.handleImageryMetadataResponse.bind(_this), undefined, 'jsonp');\n        return _this;\n    }\n    /**\n     * Get the api key used for this source.\n     *\n     * @return {string} The api key.\n     * @api\n     */\n    BingMaps.prototype.getApiKey = function () {\n        return this.apiKey_;\n    };\n    /**\n     * Get the imagery set associated with this source.\n     *\n     * @return {string} The imagery set.\n     * @api\n     */\n    BingMaps.prototype.getImagerySet = function () {\n        return this.imagerySet_;\n    };\n    /**\n     * @param {BingMapsImageryMetadataResponse} response Re
 sponse.\n     */\n    BingMaps.prototype.handleImageryMetadataResponse = function (response) {\n        if (response.statusCode != 200 ||\n            response.statusDescription != 'OK' ||\n            response.authenticationResultCode != 'ValidCredentials' ||\n            response.resourceSets.length != 1 ||\n            response.resourceSets[0].resources.length != 1) {\n            this.setState(SourceState.ERROR);\n            return;\n        }\n        var resource = response.resourceSets[0].resources[0];\n        var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n        var sourceProjection = this.getProjection();\n        var extent = extentFromProjection(sourceProjection);\n        var scale = this.hidpi_ ? 2 : 1;\n        var tileSize = resource.imageWidth == resource.imageHeight\n            ? resource.imageWidth / scale\n            : [resource.imageWidth / scale, resource.imageHeight / scale];\n        var tileGrid = createXYZ({\n            extent: 
 extent,\n            minZoom: resource.zoomMin,\n            maxZoom: maxZoom,\n            tileSize: tileSize,\n        });\n        this.tileGrid = tileGrid;\n        var culture = this.culture_;\n        var hidpi = this.hidpi_;\n        this.tileUrlFunction = createFromTileUrlFunctions(resource.imageUrlSubdomains.map(function (subdomain) {\n            /** @type {import('../tilecoord.js').TileCoord} */\n            var quadKeyTileCoord = [0, 0, 0];\n            var imageUrl = resource.imageUrl\n                .replace('{subdomain}', subdomain)\n                .replace('{culture}', culture);\n            return (\n            /**\n             * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n             * @param {number} pixelRatio Pixel ratio.\n             * @param {import(\"../proj/Projection.js\").default} projection Projection.\n             * @return {string|undefined} Tile URL.\n             */\n            function (tileCoord, pixelRatio, pr
 ojection) {\n                if (!tileCoord) {\n                    return undefined;\n                }\n                else {\n                    createOrUpdate(tileCoord[0], tileCoord[1], tileCoord[2], quadKeyTileCoord);\n                    var url = imageUrl;\n                    if (hidpi) {\n                        url += '&dpi=d1&device=mobile';\n                    }\n                    return url.replace('{quadkey}', quadKey(quadKeyTileCoord));\n                }\n            });\n        }));\n        if (resource.imageryProviders) {\n            var transform_1 = getTransformFromProjections(getProjection('EPSG:4326'), this.getProjection());\n            this.setAttributions(function (frameState) {\n                var attributions = [];\n                var viewState = frameState.viewState;\n                var tileGrid = this.getTileGrid();\n                var z = tileGrid.getZForResolution(viewState.resolution, this.zDirection);\n                var tileCoord = til
 eGrid.getTileCoordForCoordAndZ(viewState.center, z);\n                var zoom = tileCoord[0];\n                resource.imageryProviders.map(function (imageryProvider) {\n                    var intersecting = false;\n                    var coverageAreas = imageryProvider.coverageAreas;\n                    for (var i = 0, ii = coverageAreas.length; i < ii; ++i) {\n                        var coverageArea = coverageAreas[i];\n                        if (zoom >= coverageArea.zoomMin &&\n                            zoom <= coverageArea.zoomMax) {\n                            var bbox = coverageArea.bbox;\n                            var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n                            var extent_1 = applyTransform(epsg4326Extent, transform_1);\n                            if (intersects(extent_1, frameState.extent)) {\n                                intersecting = true;\n                                break;\n                            }\n      
                   }\n                    }\n                    if (intersecting) {\n                        attributions.push(imageryProvider.attribution);\n                    }\n                });\n                attributions.push(TOS_ATTRIBUTION);\n                return attributions;\n            }.bind(this));\n        }\n        this.setState(SourceState.READY);\n    };\n    return BingMaps;\n}(TileImage));\nexport default BingMaps;\n//# sourceMappingURL=BingMaps.js.map","/**\n * @module ol/source/XYZ\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constr
 uctor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque
 .\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For exampl
 e, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGrid` is provided.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if `url` or `urls` are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition f
 or rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case,\n * {@link module:ol/source/TileImage} can be used with a `tileUrlFunction`\n * such as:\n *\n *  tileUrlFunction: function(coordinate) {\n *    return 'http://mapserve
 r.com/' + coordinate[0] + '/' +\n *        coordinate[1] + '/' + coordinate[2] + '.png';\n *    }\n *\n * @api\n */\nvar XYZ = /** @class */ (function (_super) {\n    __extends(XYZ, _super);\n    /**\n     * @param {Options=} opt_options XYZ options.\n     */\n    function XYZ(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var projection = options.projection !== undefined ? options.projection : 'EPSG:3857';\n        var tileGrid = options.tileGrid !== undefined\n            ? options.tileGrid\n            : createXYZ({\n                extent: extentFromProjection(projection),\n                maxResolution: options.maxResolution,\n                maxZoom: options.maxZoom,\n                minZoom: options.minZoom,\n                tileSize: options.tileSize,\n            });\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.c
 rossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: options.opaque,\n            projection: projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        return _this;\n    }\n    return XYZ;\n}(TileImage));\nexport default XYZ;\n//# sourceMappingURL=XYZ.js.map","/**\n * @module ol/source/CartoDB\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n   
      extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport SourceState from './State.js';\nimport XYZ from './XYZ.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you w
 ant to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [maxZoom=18] Max zoom.\n * @property {number} [minZoom] Minimum zoom.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {Object} [config] If using anonymous maps, the CartoDB config to use. See\n * http://docs.cartodb.com/cartodb-platform/maps-api/anonymous-maps/\n * for more detail.\n * If using named maps, a key-value lookup with the template parameters.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} [map] If using named maps, this will be the name of the template to load.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} account If using named maps, this wi
 ll be the name of the template to load.\n */\n/**\n * @typedef {Object} CartoDBLayerInfo\n * @property {string} layergroupid The layer group ID\n * @property {{https: string}} cdn_url The CDN URL\n */\n/**\n * @classdesc\n * Layer source for the CartoDB Maps API.\n * @api\n */\nvar CartoDB = /** @class */ (function (_super) {\n    __extends(CartoDB, _super);\n    /**\n     * @param {Options} options CartoDB options.\n     */\n    function CartoDB(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,\n            minZoom: options.minZoom,\n            projection: options.projection,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.account_ = options.account;\n        /**\n        
  * @type {string}\n         * @private\n         */\n        _this.mapId_ = options.map || '';\n        /**\n         * @type {!Object}\n         * @private\n         */\n        _this.config_ = options.config || {};\n        /**\n         * @type {!Object<string, CartoDBLayerInfo>}\n         * @private\n         */\n        _this.templateCache_ = {};\n        _this.initializeMap_();\n        return _this;\n    }\n    /**\n     * Returns the current config.\n     * @return {!Object} The current configuration.\n     * @api\n     */\n    CartoDB.prototype.getConfig = function () {\n        return this.config_;\n    };\n    /**\n     * Updates the carto db config.\n     * @param {Object} config a key-value lookup. Values will replace current values\n     *     in the config.\n     * @api\n     */\n    CartoDB.prototype.updateConfig = function (config) {\n        assign(this.config_, config);\n        this.initializeMap_();\n    };\n    /**\n     * Sets the CartoDB config\n     * @param
  {Object} config In the case of anonymous maps, a CartoDB configuration\n     *     object.\n     * If using named maps, a key-value lookup with the template parameters.\n     * @api\n     */\n    CartoDB.prototype.setConfig = function (config) {\n        this.config_ = config || {};\n        this.initializeMap_();\n    };\n    /**\n     * Issue a request to initialize the CartoDB map.\n     * @private\n     */\n    CartoDB.prototype.initializeMap_ = function () {\n        var paramHash = JSON.stringify(this.config_);\n        if (this.templateCache_[paramHash]) {\n            this.applyTemplate_(this.templateCache_[paramHash]);\n            return;\n        }\n        var mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';\n        if (this.mapId_) {\n            mapUrl += '/named/' + this.mapId_;\n        }\n        var client = new XMLHttpRequest();\n        client.addEventListener('load', this.handleInitResponse_.bind(this, paramHash));\n        client.addEventListene
 r('error', this.handleInitError_.bind(this));\n        client.open('POST', mapUrl);\n        client.setRequestHeader('Content-type', 'application/json');\n        client.send(JSON.stringify(this.config_));\n    };\n    /**\n     * Handle map initialization response.\n     * @param {string} paramHash a hash representing the parameter set that was used\n     *     for the request\n     * @param {Event} event Event.\n     * @private\n     */\n    CartoDB.prototype.handleInitResponse_ = function (paramHash, event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {CartoDBLayerInfo} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.setState(SourceState.ERROR);\n                return;\n            }\n 
            this.applyTemplate_(response);\n            this.templateCache_[paramHash] = response;\n            this.setState(SourceState.READY);\n        }\n        else {\n            this.setState(SourceState.ERROR);\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event Event.\n     */\n    CartoDB.prototype.handleInitError_ = function (event) {\n        this.setState(SourceState.ERROR);\n    };\n    /**\n     * Apply the new tile urls returned by carto db\n     * @param {CartoDBLayerInfo} data Result of carto db call.\n     * @private\n     */\n    CartoDB.prototype.applyTemplate_ = function (data) {\n        var tilesUrl = 'https://' +\n            data.cdn_url.https +\n            '/' +\n            this.account_ +\n            '/api/v1/map/' +\n            data.layergroupid +\n            '/{z}/{x}/{y}.png';\n        this.setUrl(tilesUrl);\n    };\n    return CartoDB;\n}(XYZ));\nexport default CartoDB;\n//# sourceMappingURL=CartoDB.js.map","/**\n * @module 
 ol/structs/RBush\n */\nimport RBush_ from 'rbush/rbush.js';\nimport { createOrUpdate, equals } from '../extent.js';\nimport { getUid } from '../util.js';\nimport { isEmpty } from '../obj.js';\n/**\n * @typedef {Object} Entry\n * @property {number} minX\n * @property {number} minY\n * @property {number} maxX\n * @property {number} maxY\n * @property {Object} [value]\n */\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template T\n */\nvar RBush = /** @class */ (function () {\n    /**\n     * @param {number=} opt_maxEntries Max entries.\n     */\n    function RBush(opt_maxEntries) {\n        /**\n         * @private\n         */\n        this.rbush_ = new RBush_(opt_maxEntries);\n        /**\n         * A mapping between the objects added to this rbush wrapper\n         * and the objects that are actually added to the internal rbush.\n         * @private\n         * @type {Object<string, Entry>}\n         */\n 
        this.items_ = {};\n    }\n    /**\n     * Insert a value into the RBush.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {T} value Value.\n     */\n    RBush.prototype.insert = function (extent, value) {\n        /** @type {Entry} */\n        var item = {\n            minX: extent[0],\n            minY: extent[1],\n            maxX: extent[2],\n            maxY: extent[3],\n            value: value,\n        };\n        this.rbush_.insert(item);\n        this.items_[getUid(value)] = item;\n    };\n    /**\n     * Bulk-insert values into the RBush.\n     * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n     * @param {Array<T>} values Values.\n     */\n    RBush.prototype.load = function (extents, values) {\n        var items = new Array(values.length);\n        for (var i = 0, l = values.length; i < l; i++) {\n            var extent = extents[i];\n            var value = values[i];\n            /** @type {Entry} */\n           
  var item = {\n                minX: extent[0],\n                minY: extent[1],\n                maxX: extent[2],\n                maxY: extent[3],\n                value: value,\n            };\n            items[i] = item;\n            this.items_[getUid(value)] = item;\n        }\n        this.rbush_.load(items);\n    };\n    /**\n     * Remove a value from the RBush.\n     * @param {T} value Value.\n     * @return {boolean} Removed.\n     */\n    RBush.prototype.remove = function (value) {\n        var uid = getUid(value);\n        // get the object in which the value was wrapped when adding to the\n        // internal rbush. then use that object to do the removal.\n        var item = this.items_[uid];\n        delete this.items_[uid];\n        return this.rbush_.remove(item) !== null;\n    };\n    /**\n     * Update the extent of a value in the RBush.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {T} value Value.\n     */\n    RBush.prototype.
 update = function (extent, value) {\n        var item = this.items_[getUid(value)];\n        var bbox = [item.minX, item.minY, item.maxX, item.maxY];\n        if (!equals(bbox, extent)) {\n            this.remove(value);\n            this.insert(extent, value);\n        }\n    };\n    /**\n     * Return all values in the RBush.\n     * @return {Array<T>} All.\n     */\n    RBush.prototype.getAll = function () {\n        var items = this.rbush_.all();\n        return items.map(function (item) {\n            return item.value;\n        });\n    };\n    /**\n     * Return all values in the given extent.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<T>} All in extent.\n     */\n    RBush.prototype.getInExtent = function (extent) {\n        /** @type {Entry} */\n        var bbox = {\n            minX: extent[0],\n            minY: extent[1],\n            maxX: extent[2],\n            maxY: extent[3],\n        };\n        var items = this.rbush_.se
 arch(bbox);\n        return items.map(function (item) {\n            return item.value;\n        });\n    };\n    /**\n     * Calls a callback function with each value in the tree.\n     * If the callback returns a truthy value, this value is returned without\n     * checking the rest of the tree.\n     * @param {function(T): *} callback Callback.\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEach = function (callback) {\n        return this.forEach_(this.getAll(), callback);\n    };\n    /**\n     * Calls a callback function with each value in the provided extent.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(T): *} callback Callback.\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEachInExtent = function (extent, callback) {\n        return this.forEach_(this.getInExtent(extent), callback);\n    };\n    /**\n     * @param {Array<T>} values Values.\n     * @param {function(T): *} ca
 llback Callback.\n     * @private\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEach_ = function (values, callback) {\n        var result;\n        for (var i = 0, l = values.length; i < l; i++) {\n            result = callback(values[i]);\n            if (result) {\n                return result;\n            }\n        }\n        return result;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    RBush.prototype.isEmpty = function () {\n        return isEmpty(this.items_);\n    };\n    /**\n     * Remove all values from the RBush.\n     */\n    RBush.prototype.clear = function () {\n        this.rbush_.clear();\n        this.items_ = {};\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     */\n    RBush.prototype.getExtent = function (opt_extent) {\n        var data = this.rbush_.toJSON();\n        return createOrUpdate(data.minX, data.minY, 
 data.maxX, data.maxY, opt_extent);\n    };\n    /**\n     * @param {RBush} rbush R-Tree.\n     */\n    RBush.prototype.concat = function (rbush) {\n        this.rbush_.load(rbush.rbush_.all());\n        for (var i in rbush.items_) {\n            this.items_[i] = rbush.items_[i];\n        }\n    };\n    return RBush;\n}());\nexport default RBush;\n//# sourceMappingURL=RBush.js.map","/**\n * @module ol/source/VectorEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a feature is added to the source.\n     * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n     * @api\n     */\n    ADDFEATURE: 'addfeature',\n    /**\n     * Triggered when a feature is updated.\n     * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n     * @api\n     */\n    CHANGEFEATURE: 'changefeature',\n    /**\n     * Triggered when the clear method is called on the source.\n     * @event module:ol/source/Vector.VectorSourceEvent#clear\n     * @a
 pi\n     */\n    CLEAR: 'clear',\n    /**\n     * Triggered when a feature is removed from the source.\n     * See {@link module:ol/source/Vector#clear source.clear()} for exceptions.\n     * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n     * @api\n     */\n    REMOVEFEATURE: 'removefeature',\n};\n//# sourceMappingURL=VectorEventType.js.map","/**\n * @module ol/source/Vector\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n}
 )();\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RBush from '../structs/RBush.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport VectorEventType from './VectorEventType.js';\nimport { TRUE, VOID } from '../functions.js';\nimport { all as allStrategy } from '../loadingstrategy.js';\nimport { assert } from '../asserts.js';\nimport { containsExtent, equals } from '../extent.js';\nimport { extend } from '../array.js';\nimport { getUid } from '../util.js';\nimport { getValues, isEmpty } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { xhr } from '../featureloader.js';\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/e
 xtent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector} instances are instances of this\n * type.\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nvar VectorSourceEvent = /** @class */ (function (_super) {\n    __extends(VectorSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Feature.js\").default<Geometry>=} opt_feature Feature.\n     */\n    function VectorSourceEvent(type, opt_feature) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The feature being added or removed.\n         * @type {import(\"../Feature.js\").default<Geometry>|undefined}\n         * @api\n         */\n        _this.feature = opt_featur
 e;\n        return _this;\n    }\n    return VectorSourceEvent;\n}(Event));\nexport { VectorSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<import(\"../Feature.js\").default>|Collection<import(\"../Feature.js\").default>} [features]\n * Features. If provided as {@link module:ol/Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader.\n *\n * Example:\n *\n * ```js\n * import {Vector} from 'ol/source';\n * import {GeoJSON} fro
 m 'ol/format';\n * import {bbox} from 'ol/loadingstrategy';\n *\n * var vectorSource = new Vector({\n *   format: new GeoJSON(),\n *   loader: function(extent, resolution, projection) {\n *      var proj = projection.getCode();\n *      var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n *          'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n *          'outputFormat=application/json&srsname=' + proj + '&' +\n *          'bbox=' + extent.join(',') + ',' + proj;\n *      var xhr = new XMLHttpRequest();\n *      xhr.open('GET', url);\n *      var onError = function() {\n *        vectorSource.removeLoadedExtent(extent);\n *      }\n *      xhr.onerror = onError;\n *      xhr.onload = function() {\n *        if (xhr.status == 200) {\n *          vectorSource.addFeatures(\n *              vectorSource.getFormat().readFeatures(xhr.responseText));\n *        } else {\n *          onError();\n *        }\n *      }\n *      xhr.send();\n *    },\n *    strat
 egy: bbox\n *  });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy~all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader~xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy~all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n *
  When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n 
 * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180° and 180° meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\
 "../geom/Geometry.js\").default} Geometry\n */\nvar VectorSource = /** @class */ (function (_super) {\n    __extends(VectorSource, _super);\n    /**\n     * @param {Options=} opt_options Vector source options.\n     */\n    function VectorSource(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            projection: undefined,\n            state: SourceState.READY,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../featureloader.js\").FeatureLoader}\n         */\n        _this.loader_ = VOID;\n        /**\n         * @private\n         * @type {import(\"../format/Feature.js\").default|undefined}\n         */\n        _this.format_ = options.format;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overlaps_ = options.
 overlaps === undefined ? true : options.overlaps;\n        /**\n         * @private\n         * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n         */\n        _this.url_ = options.url;\n        if (options.loader !== undefined) {\n            _this.loader_ = options.loader;\n        }\n        else if (_this.url_ !== undefined) {\n            assert(_this.format_, 7); // `format` must be set when `url` is set\n            // create a XHR feature loader for \"url\" and \"format\"\n            _this.loader_ = xhr(_this.url_, \n            /** @type {import(\"../format/Feature.js\").default} */ (_this.format_));\n        }\n        /**\n         * @private\n         * @type {LoadingStrategy}\n         */\n        _this.strategy_ =\n            options.strategy !== undefined ? options.strategy : allStrategy;\n        var useSpatialIndex = options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n        /**\n         * @private\n        
  * @type {RBush<import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n        /**\n         * @private\n         * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n         */\n        _this.loadedExtentsRtree_ = new RBush();\n        /**\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.nullGeometryFeatures_ = {};\n        /**\n         * A lookup of features by id (the return from feature.getId()).\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.idIndex_ = {};\n        /**\n         * A lookup of features by uid (using getUid(feature)).\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.uidIndex_ = {};\n        /**\n         * @private\n         * @type {Object
 <string, Array<import(\"../events.js\").EventsKey>>}\n         */\n        _this.featureChangeKeys_ = {};\n        /**\n         * @private\n         * @type {Collection<import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.featuresCollection_ = null;\n        var collection, features;\n        if (Array.isArray(options.features)) {\n            features = options.features;\n        }\n        else if (options.features) {\n            collection = options.features;\n            features = collection.getArray();\n        }\n        if (!useSpatialIndex && collection === undefined) {\n            collection = new Collection(features);\n        }\n        if (features !== undefined) {\n            _this.addFeaturesInternal(features);\n        }\n        if (collection !== undefined) {\n            _this.bindFeaturesCollection_(collection);\n        }\n        return _this;\n    }\n    /**\n     * Add a single feature to the source.  If you want to add a batch of fea
 tures\n     * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n     * instead. A feature will not be added to the source if feature with\n     * the same id is already there. The reason for this behavior is to avoid\n     * feature duplication when using bbox or tile loading strategies.\n     * Note: this also applies if an {@link module:ol/Collection} is used for features,\n     * meaning that if a feature with a duplicate id is added in the collection, it will\n     * be removed from it right away.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to add.\n     * @api\n     */\n    VectorSource.prototype.addFeature = function (feature) {\n        this.addFeatureInternal(feature);\n        this.changed();\n    };\n    /**\n     * Add a feature without firing a `change` event.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @protected\n     */\n    VectorSource.prototype.addFeature
 Internal = function (feature) {\n        var featureKey = getUid(feature);\n        if (!this.addToIndex_(featureKey, feature)) {\n            if (this.featuresCollection_) {\n                this.featuresCollection_.remove(feature);\n            }\n            return;\n        }\n        this.setupChangeEvents_(featureKey, feature);\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var extent = geometry.getExtent();\n            if (this.featuresRtree_) {\n                this.featuresRtree_.insert(extent, feature);\n            }\n        }\n        else {\n            this.nullGeometryFeatures_[featureKey] = feature;\n        }\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, feature));\n    };\n    /**\n     * @param {string} featureKey Unique identifier for the feature.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @private\n     */\n    VectorSource.prototype.setupChange
 Events_ = function (featureKey, feature) {\n        this.featureChangeKeys_[featureKey] = [\n            listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n            listen(feature, ObjectEventType.PROPERTYCHANGE, this.handleFeatureChange_, this),\n        ];\n    };\n    /**\n     * @param {string} featureKey Unique identifier for the feature.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @return {boolean} The feature is \"valid\", in the sense that it is also a\n     *     candidate for insertion into the Rtree.\n     * @private\n     */\n    VectorSource.prototype.addToIndex_ = function (featureKey, feature) {\n        var valid = true;\n        var id = feature.getId();\n        if (id !== undefined) {\n            if (!(id.toString() in this.idIndex_)) {\n                this.idIndex_[id.toString()] = feature;\n            }\n            else {\n                valid = false;\n            }\n        }\n        if (
 valid) {\n            assert(!(featureKey in this.uidIndex_), 30); // The passed `feature` was already added to the source\n            this.uidIndex_[featureKey] = feature;\n        }\n        return valid;\n    };\n    /**\n     * Add a batch of features to the source.\n     * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features to add.\n     * @api\n     */\n    VectorSource.prototype.addFeatures = function (features) {\n        this.addFeaturesInternal(features);\n        this.changed();\n    };\n    /**\n     * Add features without firing a `change` event.\n     * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features.\n     * @protected\n     */\n    VectorSource.prototype.addFeaturesInternal = function (features) {\n        var extents = [];\n        var newFeatures = [];\n        var geometryFeatures = [];\n        for (var i = 0, length_1 = features.length; i < length_1; i++) {\n            var feature = features[i];\n        
     var featureKey = getUid(feature);\n            if (this.addToIndex_(featureKey, feature)) {\n                newFeatures.push(feature);\n            }\n        }\n        for (var i = 0, length_2 = newFeatures.length; i < length_2; i++) {\n            var feature = newFeatures[i];\n            var featureKey = getUid(feature);\n            this.setupChangeEvents_(featureKey, feature);\n            var geometry = feature.getGeometry();\n            if (geometry) {\n                var extent = geometry.getExtent();\n                extents.push(extent);\n                geometryFeatures.push(feature);\n            }\n            else {\n                this.nullGeometryFeatures_[featureKey] = feature;\n            }\n        }\n        if (this.featuresRtree_) {\n            this.featuresRtree_.load(extents, geometryFeatures);\n        }\n        for (var i = 0, length_3 = newFeatures.length; i < length_3; i++) {\n            this.dispatchEvent(new VectorSourceEvent(VectorEventTy
 pe.ADDFEATURE, newFeatures[i]));\n        }\n    };\n    /**\n     * @param {!Collection<import(\"../Feature.js\").default<Geometry>>} collection Collection.\n     * @private\n     */\n    VectorSource.prototype.bindFeaturesCollection_ = function (collection) {\n        var modifyingCollection = false;\n        this.addEventListener(VectorEventType.ADDFEATURE, \n        /**\n         * @param {VectorSourceEvent<Geometry>} evt The vector source event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                collection.push(evt.feature);\n                modifyingCollection = false;\n            }\n        });\n        this.addEventListener(VectorEventType.REMOVEFEATURE, \n        /**\n         * @param {VectorSourceEvent<Geometry>} evt The vector source event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                co
 llection.remove(evt.feature);\n                modifyingCollection = false;\n            }\n        });\n        collection.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                this.addFeature(\n                /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element));\n                modifyingCollection = false;\n            }\n        }.bind(this));\n        collection.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                this.removeFeature(\n                /** @type {import(\"../Feature.js\").defa
 ult<Geometry>} */ (evt.element));\n                modifyingCollection = false;\n            }\n        }.bind(this));\n        this.featuresCollection_ = collection;\n    };\n    /**\n     * Remove all features from the source.\n     * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n     * @api\n     */\n    VectorSource.prototype.clear = function (opt_fast) {\n        if (opt_fast) {\n            for (var featureId in this.featureChangeKeys_) {\n                var keys = this.featureChangeKeys_[featureId];\n                keys.forEach(unlistenByKey);\n            }\n            if (!this.featuresCollection_) {\n                this.featureChangeKeys_ = {};\n                this.idIndex_ = {};\n                this.uidIndex_ = {};\n            }\n        }\n        else {\n            if (this.featuresRtree_) {\n                this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this));\n             
    for (var id in this.nullGeometryFeatures_) {\n                    this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n                }\n            }\n        }\n        if (this.featuresCollection_) {\n            this.featuresCollection_.clear();\n        }\n        if (this.featuresRtree_) {\n            this.featuresRtree_.clear();\n        }\n        this.nullGeometryFeatures_ = {};\n        var clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n        this.dispatchEvent(clearEvent);\n        this.changed();\n    };\n    /**\n     * Iterate through all features on the source, calling the provided callback\n     * with each one.  If the callback returns any \"truthy\" value, iteration will\n     * stop and the function will return the same value.\n     * Note: this function only iterate through the feature that have a defined geometry.\n     *\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     
 *     on the source.  Return a truthy value to stop iteration.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeature = function (callback) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.forEach(callback);\n        }\n        else if (this.featuresCollection_) {\n            this.featuresCollection_.forEach(callback);\n        }\n    };\n    /**\n     * Iterate through all features whose geometries contain the provided\n     * coordinate, calling the callback with each feature.  If the callback returns\n     * a \"truthy\" value, iteration will stop and the function will return the same\n     * value.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose goemetry contains the provided
  coordinate.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     */\n    VectorSource.prototype.forEachFeatureAtCoordinateDirect = function (coordinate, callback) {\n        var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n        return this.forEachFeatureInExtent(extent, function (feature) {\n            var geometry = feature.getGeometry();\n            if (geometry.intersectsCoordinate(coordinate)) {\n                return callback(feature);\n            }\n            else {\n                return undefined;\n            }\n        });\n    };\n    /**\n     * Iterate through all features whose bounding box intersects the provided\n     * extent (note that the feature's geometry may not intersect the extent),\n     * calling the callback with each feature.  If the callback returns a \"truthy\"\n     * value, iteration will stop and the function will return the same value.\n     *\n     * If yo
 u are interested in features whose geometry intersects an extent, call\n     * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n     *\n     * When `useSpatialIndex` is set to false, this method will loop through all\n     * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose bounding box intersects the provided extent.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeatureInExtent = function (extent, callback) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.forEachInExtent(extent, callback);\n        }\n        e
 lse if (this.featuresCollection_) {\n            this.featuresCollection_.forEach(callback);\n        }\n    };\n    /**\n     * Iterate through all features whose geometry intersects the provided extent,\n     * calling the callback with each feature.  If the callback returns a \"truthy\"\n     * value, iteration will stop and the function will return the same value.\n     *\n     * If you only want to test for bounding box intersection, call the\n     * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose geometry intersects the provided extent.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeatureIntersectingExtent = 
 function (extent, callback) {\n        return this.forEachFeatureInExtent(extent, \n        /**\n         * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n         * @return {T|undefined} The return value from the last call to the callback.\n         */\n        function (feature) {\n            var geometry = feature.getGeometry();\n            if (geometry.intersectsExtent(extent)) {\n                var result = callback(feature);\n                if (result) {\n                    return result;\n                }\n            }\n        });\n    };\n    /**\n     * Get the features collection associated with this source. Will be `null`\n     * unless the source was configured with `useSpatialIndex` set to `false`, or\n     * with an {@link module:ol/Collection} as `features`.\n     * @return {Collection<import(\"../Feature.js\").default<Geometry>>} The collection of features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesCollection = funct
 ion () {\n        return this.featuresCollection_;\n    };\n    /**\n     * Get all features on the source in random order.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeatures = function () {\n        var features;\n        if (this.featuresCollection_) {\n            features = this.featuresCollection_.getArray();\n        }\n        else if (this.featuresRtree_) {\n            features = this.featuresRtree_.getAll();\n            if (!isEmpty(this.nullGeometryFeatures_)) {\n                extend(features, getValues(this.nullGeometryFeatures_));\n            }\n        }\n        return /** @type {Array<import(\"../Feature.js\").default<Geometry>>} */ (features);\n    };\n    /**\n     * Get all features whose geometry intersects the provided coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {Array<import(\"../Feature.js\").default<Geom
 etry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesAtCoordinate = function (coordinate) {\n        var features = [];\n        this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n            features.push(feature);\n        });\n        return features;\n    };\n    /**\n     * Get all features whose bounding box intersects the provided extent.  Note that this returns an array of\n     * all features intersecting the given extent in random order (so it may include\n     * features whose geometries do not intersect the extent).\n     *\n     * When `useSpatialIndex` is set to false, this method will return all\n     * features.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesInExtent = function (extent) {\n        if (this.featuresRtree_) {\n            return this.featuresRt
 ree_.getInExtent(extent);\n        }\n        else if (this.featuresCollection_) {\n            return this.featuresCollection_.getArray();\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * Get the closest feature to the provided coordinate.\n     *\n     * This method is not available when the source is configured with\n     * `useSpatialIndex` set to `false`.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(import(\"../Feature.js\").default<Geometry>):boolean=} opt_filter Feature filter function.\n     *     The filter function will receive one argument, the {@link module:ol/Feature feature}\n     *     and it should return a boolean value. By default, no filtering is made.\n     * @return {import(\"../Feature.js\").default<Geometry>} Closest feature.\n     * @api\n     */\n    VectorSource.prototype.getClosestFeatureToCoordinate = function (coordinate, opt_filter) {\n        // Find the c
 losest feature using branch and bound.  We start searching an\n        // infinite extent, and find the distance from the first feature found.  This\n        // becomes the closest feature.  We then compute a smaller extent which any\n        // closer feature must intersect.  We continue searching with this smaller\n        // extent, trying to find a closer feature.  Every time we find a closer\n        // feature, we update the extent being searched so that any even closer\n        // feature must intersect it.  We continue until we run out of features.\n        var x = coordinate[0];\n        var y = coordinate[1];\n        var closestFeature = null;\n        var closestPoint = [NaN, NaN];\n        var minSquaredDistance = Infinity;\n        var extent = [-Infinity, -Infinity, Infinity, Infinity];\n        var filter = opt_filter ? opt_filter : TRUE;\n        this.featuresRtree_.forEachInExtent(extent, \n        /**\n         * @param {import(\"../Feature.js\").default<Geometry>
 } feature Feature.\n         */\n        function (feature) {\n            if (filter(feature)) {\n                var geometry = feature.getGeometry();\n                var previousMinSquaredDistance = minSquaredDistance;\n                minSquaredDistance = geometry.closestPointXY(x, y, closestPoint, minSquaredDistance);\n                if (minSquaredDistance < previousMinSquaredDistance) {\n                    closestFeature = feature;\n                    // This is sneaky.  Reduce the extent that it is currently being\n                    // searched while the R-Tree traversal using this same extent object\n                    // is still in progress.  This is safe because the new extent is\n                    // strictly contained by the old extent.\n                    var minDistance = Math.sqrt(minSquaredDistance);\n                    extent[0] = x - minDistance;\n                    extent[1] = y - minDistance;\n                    extent[2] = x + minDistance;\n       
              extent[3] = y + minDistance;\n                }\n            }\n        });\n        return closestFeature;\n    };\n    /**\n     * Get the extent of the features currently in the source.\n     *\n     * This method is not available when the source is configured with\n     * `useSpatialIndex` set to `false`.\n     * @param {import(\"../extent.js\").Extent=} opt_extent Destination extent. If provided, no new extent\n     *     will be created. Instead, that extent's coordinates will be overwritten.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    VectorSource.prototype.getExtent = function (opt_extent) {\n        return this.featuresRtree_.getExtent(opt_extent);\n    };\n    /**\n     * Get a feature by its identifier (the value returned by feature.getId()).\n     * Note that the index treats string and numeric identifiers as the same.  So\n     * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n     *\n     * @
 param {string|number} id Feature identifier.\n     * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n     * @api\n     */\n    VectorSource.prototype.getFeatureById = function (id) {\n        var feature = this.idIndex_[id.toString()];\n        return feature !== undefined ? feature : null;\n    };\n    /**\n     * Get a feature by its internal unique identifier (using `getUid`).\n     *\n     * @param {string} uid Feature identifier.\n     * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n     */\n    VectorSource.prototype.getFeatureByUid = function (uid) {\n        var feature = this.uidIndex_[uid];\n        return feature !== undefined ? feature : null;\n    };\n    /**\n     * Get the format associated with this source.\n     *\n     * @return {import(\"../format/Feature.js\").default|undefined} The feature format.\n     * @api\n     */\n    VectorSource.prototype.getFormat = function () {
 \n        return this.format_;\n    };\n    /**\n     * @return {boolean} The source can have overlapping geometries.\n     */\n    VectorSource.prototype.getOverlaps = function () {\n        return this.overlaps_;\n    };\n    /**\n     * Get the url associated with this source.\n     *\n     * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n     * @api\n     */\n    VectorSource.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * @param {Event} event Event.\n     * @private\n     */\n    VectorSource.prototype.handleFeatureChange_ = function (event) {\n        var feature = /** @type {import(\"../Feature.js\").default<Geometry>} */ (event.target);\n        var featureKey = getUid(feature);\n        var geometry = feature.getGeometry();\n        if (!geometry) {\n            if (!(featureKey in this.nullGeometryFeatures_)) {\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.r
 emove(feature);\n                }\n                this.nullGeometryFeatures_[featureKey] = feature;\n            }\n        }\n        else {\n            var extent = geometry.getExtent();\n            if (featureKey in this.nullGeometryFeatures_) {\n                delete this.nullGeometryFeatures_[featureKey];\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.insert(extent, feature);\n                }\n            }\n            else {\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.update(extent, feature);\n                }\n            }\n        }\n        var id = feature.getId();\n        if (id !== undefined) {\n            var sid = id.toString();\n            if (this.idIndex_[sid] !== feature) {\n                this.removeFromIdIndex_(feature);\n                this.idIndex_[sid] = feature;\n            }\n        }\n        else {\n            this.removeFromIdIndex_(feature);\n            this
 .uidIndex_[featureKey] = feature;\n        }\n        this.changed();\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature));\n    };\n    /**\n     * Returns true if the feature is contained within the source.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @return {boolean} Has feature.\n     * @api\n     */\n    VectorSource.prototype.hasFeature = function (feature) {\n        var id = feature.getId();\n        if (id !== undefined) {\n            return id in this.idIndex_;\n        }\n        else {\n            return getUid(feature) in this.uidIndex_;\n        }\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    VectorSource.prototype.isEmpty = function () {\n        return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {imp
 ort(\"../proj/Projection.js\").default} projection Projection.\n     */\n    VectorSource.prototype.loadFeatures = function (extent, resolution, projection) {\n        var loadedExtentsRtree = this.loadedExtentsRtree_;\n        var extentsToLoad = this.strategy_(extent, resolution);\n        this.loading = false;\n        var _loop_1 = function (i, ii) {\n            var extentToLoad = extentsToLoad[i];\n            var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad, \n            /**\n             * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n             * @return {boolean} Contains.\n             */\n            function (object) {\n                return containsExtent(object.extent, extentToLoad);\n            });\n            if (!alreadyLoaded) {\n                this_1.loader_.call(this_1, extentToLoad, resolution, projection);\n                loadedExtentsRtree.insert(extentToLoad, { extent: extentToLoad.slice() });\n                
 this_1.loading = this_1.loader_ !== VOID;\n            }\n        };\n        var this_1 = this;\n        for (var i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n            _loop_1(i, ii);\n        }\n    };\n    VectorSource.prototype.refresh = function () {\n        this.clear(true);\n        this.loadedExtentsRtree_.clear();\n        _super.prototype.refresh.call(this);\n    };\n    /**\n     * Remove an extent from the list of loaded extents.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    VectorSource.prototype.removeLoadedExtent = function (extent) {\n        var loadedExtentsRtree = this.loadedExtentsRtree_;\n        var obj;\n        loadedExtentsRtree.forEachInExtent(extent, function (object) {\n            if (equals(object.extent, extent)) {\n                obj = object;\n                return true;\n            }\n        });\n        if (obj) {\n            loadedExtentsRtree.remove(obj);\n        }\n    };\n    /**\n    
  * Remove a single feature from the source.  If you want to remove all features\n     * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n     * instead.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to remove.\n     * @api\n     */\n    VectorSource.prototype.removeFeature = function (feature) {\n        var featureKey = getUid(feature);\n        if (featureKey in this.nullGeometryFeatures_) {\n            delete this.nullGeometryFeatures_[featureKey];\n        }\n        else {\n            if (this.featuresRtree_) {\n                this.featuresRtree_.remove(feature);\n            }\n        }\n        this.removeFeatureInternal(feature);\n        this.changed();\n    };\n    /**\n     * Remove feature without firing a `change` event.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @protected\n     */\n    VectorSource.prototype.removeFeatureInternal = function (feature) {\n  
       var featureKey = getUid(feature);\n        this.featureChangeKeys_[featureKey].forEach(unlistenByKey);\n        delete this.featureChangeKeys_[featureKey];\n        var id = feature.getId();\n        if (id !== undefined) {\n            delete this.idIndex_[id.toString()];\n        }\n        delete this.uidIndex_[featureKey];\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature));\n    };\n    /**\n     * Remove a feature from the id index.  Called internally when the feature id\n     * may have changed.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @return {boolean} Removed the feature from the index.\n     * @private\n     */\n    VectorSource.prototype.removeFromIdIndex_ = function (feature) {\n        var removed = false;\n        for (var id in this.idIndex_) {\n            if (this.idIndex_[id] === feature) {\n                delete this.idIndex_[id];\n                removed = true;\n      
           break;\n            }\n        }\n        return removed;\n    };\n    /**\n     * Set the new loader of the source. The next render cycle will use the\n     * new loader.\n     * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n     * @api\n     */\n    VectorSource.prototype.setLoader = function (loader) {\n        this.loader_ = loader;\n    };\n    /**\n     * Points the source to a new url. The next render cycle will use the new url.\n     * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n     * @api\n     */\n    VectorSource.prototype.setUrl = function (url) {\n        assert(this.format_, 7); // `format` must be set when `url` is set\n        this.setLoader(xhr(url, this.format_));\n    };\n    return VectorSource;\n}(Source));\nexport default VectorSource;\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/source/Cluster\n */\nvar __extends = (this && this.__extends) || (function () {\n    var ext
 endStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Point from '../geom/Point.js';\nimport VectorSource from './Vector.js';\nimport { add as addCoordinate, scale as scaleCoordinate } from '../coordinate.js';\nimport { assert } from '../asserts.js';\nimport { buffer, createEmpty, createOrUpdateFromCoordinate } from '../extent.js';\nimport { getUid } from '../util.js';\n/**
 \n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [distance=20] Minimum distance in pixels between clusters.\n * @property {function(Feature):Point} [geometryFunction]\n * Function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a\n * feature should not be considered for clustering, the function should return\n * `null`. The default, which works when the underyling source contains point\n * features only, is\n * ```js\n * function(feature) {\n *   return feature.getGeometry();\n * }\n * ```\n * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster\n * calculation point for polygons.\n * @property {VectorSource} [source] Source.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source to cluster vector
  data. Works out of the box with point\n * geometries. For other geometry types, or if not all geometries should be\n * considered for clustering, a custom `geometryFunction` can be defined.\n *\n * If the instance is disposed without also disposing the underlying\n * source `setSource(null)` has to be called to remove the listener reference\n * from the wrapped source.\n * @api\n */\nvar Cluster = /** @class */ (function (_super) {\n    __extends(Cluster, _super);\n    /**\n     * @param {Options} options Cluster options.\n     */\n    function Cluster(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @type {number|undefined}\n         * @protected\n         */\n        _this.resolution = undefined;\n        /**\n         * @type {number}\n         * @protected\n         */\n        _this.distance = options.distance !== undefined ? options.distance : 2
 0;\n        /**\n         * @type {Array<Feature>}\n         * @protected\n         */\n        _this.features = [];\n        /**\n         * @param {Feature} feature Feature.\n         * @return {Point} Cluster calculation point.\n         * @protected\n         */\n        _this.geometryFunction =\n            options.geometryFunction ||\n                function (feature) {\n                    var geometry = feature.getGeometry();\n                    assert(geometry.getType() == GeometryType.POINT, 10); // The default `geometryFunction` can only handle `Point` geometries\n                    return geometry;\n                };\n        _this.boundRefresh_ = _this.refresh.bind(_this);\n        _this.setSource(options.source || null);\n        return _this;\n    }\n    /**\n     * Remove all features from the source.\n     * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n     * @api\n     */\n    Cluster.pr
 ototype.clear = function (opt_fast) {\n        this.features.length = 0;\n        _super.prototype.clear.call(this, opt_fast);\n    };\n    /**\n     * Get the distance in pixels between clusters.\n     * @return {number} Distance.\n     * @api\n     */\n    Cluster.prototype.getDistance = function () {\n        return this.distance;\n    };\n    /**\n     * Get a reference to the wrapped source.\n     * @return {VectorSource} Source.\n     * @api\n     */\n    Cluster.prototype.getSource = function () {\n        return this.source;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    Cluster.prototype.loadFeatures = function (extent, resolution, projection) {\n        this.source.loadFeatures(extent, resolution, projection);\n        if (resolution !== this.resolution) {\n            this.clear();\n            thi
 s.resolution = resolution;\n            this.cluster();\n            this.addFeatures(this.features);\n        }\n    };\n    /**\n     * Set the distance in pixels between clusters.\n     * @param {number} distance The distance in pixels.\n     * @api\n     */\n    Cluster.prototype.setDistance = function (distance) {\n        this.distance = distance;\n        this.refresh();\n    };\n    /**\n     * Replace the wrapped source.\n     * @param {VectorSource} source The new source for this instance.\n     * @api\n     */\n    Cluster.prototype.setSource = function (source) {\n        if (this.source) {\n            this.source.removeEventListener(EventType.CHANGE, this.boundRefresh_);\n        }\n        this.source = source;\n        if (source) {\n            source.addEventListener(EventType.CHANGE, this.boundRefresh_);\n        }\n        this.refresh();\n    };\n    /**\n     * Handle the source changing.\n     */\n    Cluster.prototype.refresh = function () {\n        this.cle
 ar();\n        this.cluster();\n        this.addFeatures(this.features);\n    };\n    /**\n     * @protected\n     */\n    Cluster.prototype.cluster = function () {\n        if (this.resolution === undefined || !this.source) {\n            return;\n        }\n        var extent = createEmpty();\n        var mapDistance = this.distance * this.resolution;\n        var features = this.source.getFeatures();\n        /**\n         * @type {!Object<string, boolean>}\n         */\n        var clustered = {};\n        for (var i = 0, ii = features.length; i < ii; i++) {\n            var feature = features[i];\n            if (!(getUid(feature) in clustered)) {\n                var geometry = this.geometryFunction(feature);\n                if (geometry) {\n                    var coordinates = geometry.getCoordinates();\n                    createOrUpdateFromCoordinate(coordinates, extent);\n                    buffer(extent, mapDistance, extent);\n                    var neighbors = this.s
 ource.getFeaturesInExtent(extent);\n                    neighbors = neighbors.filter(function (neighbor) {\n                        var uid = getUid(neighbor);\n                        if (!(uid in clustered)) {\n                            clustered[uid] = true;\n                            return true;\n                        }\n                        else {\n                            return false;\n                        }\n                    });\n                    this.features.push(this.createCluster(neighbors));\n                }\n            }\n        }\n    };\n    /**\n     * @param {Array<Feature>} features Features\n     * @return {Feature} The cluster feature.\n     * @protected\n     */\n    Cluster.prototype.createCluster = function (features) {\n        var centroid = [0, 0];\n        for (var i = features.length - 1; i >= 0; --i) {\n            var geometry = this.geometryFunction(features[i]);\n            if (geometry) {\n                addCoordinate(cen
 troid, geometry.getCoordinates());\n            }\n            else {\n                features.splice(i, 1);\n            }\n        }\n        scaleCoordinate(centroid, 1 / features.length);\n        var cluster = new Feature(new Point(centroid));\n        cluster.set('features', features);\n        return cluster;\n    };\n    return Cluster;\n}(VectorSource));\nexport default Cluster;\n//# sourceMappingURL=Cluster.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.proto
 type, new __());\n    };\n})();\n/**\n * @module ol/source/Zoomify\n */\nimport { DEFAULT_TILE_SIZE } from '../tilegrid/common.js';\nimport ImageTile from '../ImageTile.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport TileState from '../TileState.js';\nimport { assert } from '../asserts.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { createFromTileUrlFunctions, expandUrl } from '../tileurlfunction.js';\nimport { getCenter } from '../extent.js';\nimport { toSize } from '../size.js';\n/**\n * @enum {string}\n */\nvar TierSizeCalculation = {\n    DEFAULT: 'default',\n    TRUNCATED: 'truncated',\n};\nvar CustomTile = /** @class */ (function (_super) {\n    __extends(CustomTile, _super);\n    /**\n     * @param {import(\"../size.js\").Size} tileSize Full tile size.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileState.js\").default} state State.\n    
  * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"../Tile.js\").Options=} opt_options Tile options.\n     */\n    function CustomTile(tileSize, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) || this;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n         */\n        _this.zoomifyImage_ = null;\n        /**\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tileSize_ = tileSize;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    CustomTile.prototype.getImage = function () {\n        if (this.zoomif
 yImage_) {\n            return this.zoomifyImage_;\n        }\n        var image = _super.prototype.getImage.call(this);\n        if (this.state == TileState.LOADED) {\n            var tileSize = this.tileSize_;\n            if (image.width == tileSize[0] && image.height == tileSize[1]) {\n                this.zoomifyImage_ = image;\n                return image;\n            }\n            else {\n                var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n                context.drawImage(image, 0, 0);\n                this.zoomifyImage_ = context.canvas;\n                return context.canvas;\n            }\n        }\n        else {\n            return image;\n        }\n    };\n    return CustomTile;\n}(ImageTile));\nexport { CustomTile };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the numbe
 r of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value  you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2`\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {string} url URL template or base URL of the Zoomify service.\n * A b
 ase URL is the fixed part\n * of the URL, excluding the tile group, z, x, and y folder structure, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include\n * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`.\n * Internet Imaging Protocol (IIP) with JTL extension can be also used with\n * `{tileIndex}` and `{z}` placeholders, e.g.\n * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.\n * @property {import(\"../size.js\").Size} size\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the TileGrid that is created.\n * Default sets the TileGrid in the\n * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To cha
 nge the\n * extent to the first quadrant (the default for OpenLayers 2) set the extent\n * as `[0, 0, width, height]`.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels.\n * @property {number} [zDirection] Indicate which resolution should be used\n * by a renderer if the views resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Layer source for tile data in Zoomify format (both Zoomify and Internet\n * Imaging Protocol are supported).\n * @api\n */\nvar Zoomify = /** @class */ (function (_super) {\n    __extends(Zoomify, _super);\n    /**\n     * @param {Options} opt_options Options.\n     */\n    function Zoomi
 fy(opt_options) {\n        var _this = this;\n        var options = opt_options;\n        var size = options.size;\n        var tierSizeCalculation = options.tierSizeCalculation !== undefined\n            ? options.tierSizeCalculation\n            : TierSizeCalculation.DEFAULT;\n        var tilePixelRatio = options.tilePixelRatio || 1;\n        var imageWidth = size[0];\n        var imageHeight = size[1];\n        var tierSizeInTiles = [];\n        var tileSize = options.tileSize || DEFAULT_TILE_SIZE;\n        var tileSizeForTierSizeCalculation = tileSize * tilePixelRatio;\n        switch (tierSizeCalculation) {\n            case TierSizeCalculation.DEFAULT:\n                while (imageWidth > tileSizeForTierSizeCalculation ||\n                    imageHeight > tileSizeForTierSizeCalculation) {\n                    tierSizeInTiles.push([\n                        Math.ceil(imageWidth / tileSizeForTierSizeCalculation),\n                        Math.ceil(imageHeight / tileSizeForTierS
 izeCalculation),\n                    ]);\n                    tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;\n                }\n                break;\n            case TierSizeCalculation.TRUNCATED:\n                var width = imageWidth;\n                var height = imageHeight;\n                while (width > tileSizeForTierSizeCalculation ||\n                    height > tileSizeForTierSizeCalculation) {\n                    tierSizeInTiles.push([\n                        Math.ceil(width / tileSizeForTierSizeCalculation),\n                        Math.ceil(height / tileSizeForTierSizeCalculation),\n                    ]);\n                    width >>= 1;\n                    height >>= 1;\n                }\n                break;\n            default:\n                assert(false, 53); // Unknown `tierSizeCalculation` configured\n                break;\n        }\n        tierSizeInTiles.push([1, 1]);\n        tierSizeInTiles.reverse();\n        var res
 olutions = [tilePixelRatio];\n        var tileCountUpToTier = [0];\n        for (var i = 1, ii = tierSizeInTiles.length; i < ii; i++) {\n            resolutions.push(tilePixelRatio << i);\n            tileCountUpToTier.push(tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +\n                tileCountUpToTier[i - 1]);\n        }\n        resolutions.reverse();\n        var tileGrid = new TileGrid({\n            tileSize: tileSize,\n            extent: options.extent || [0, -imageHeight, imageWidth, 0],\n            resolutions: resolutions,\n        });\n        var url = options.url;\n        if (url &&\n            url.indexOf('{TileGroup}') == -1 &&\n            url.indexOf('{tileIndex}') == -1) {\n            url += '{TileGroup}/{z}-{x}-{y}.jpg';\n        }\n        var urls = expandUrl(url);\n        var tileWidth = tileSize * tilePixelRatio;\n        /**\n         * @param {string} template Template.\n         * @return {import(\"../Tile.js\").UrlFunction} Tile URL functio
 n.\n         */\n        function createFromTemplate(template) {\n            return (\n            /**\n             * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n             * @param {number} pixelRatio Pixel ratio.\n             * @param {import(\"../proj/Projection.js\").default} projection Projection.\n             * @return {string|undefined} Tile URL.\n             */\n            function (tileCoord, pixelRatio, projection) {\n                if (!tileCoord) {\n                    return undefined;\n                }\n                else {\n                    var tileCoordZ = tileCoord[0];\n                    var tileCoordX = tileCoord[1];\n                    var tileCoordY = tileCoord[2];\n                    var tileIndex = tileCoordX + tileCoordY * tierSizeInTiles[tileCoordZ][0];\n                    var tileGroup = ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileWidth) | 0;\n                    var localContext_1 = {\n              
           'z': tileCoordZ,\n                        'x': tileCoordX,\n                        'y': tileCoordY,\n                        'tileIndex': tileIndex,\n                        'TileGroup': 'TileGroup' + tileGroup,\n                    };\n                    return template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                        return localContext_1[p];\n                    });\n                }\n            });\n        }\n        var tileUrlFunction = createFromTileUrlFunctions(urls.map(createFromTemplate));\n        var ZoomifyTileClass = CustomTile.bind(null, toSize(tileSize * tilePixelRatio));\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            tilePixelRatio: tilePixelRatio,\n            reprojectionErrorThreshold: options
 .reprojectionErrorThreshold,\n            tileClass: ZoomifyTileClass,\n            tileGrid: tileGrid,\n            tileUrlFunction: tileUrlFunction,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {number}\n         */\n        _this.zDirection = options.zDirection;\n        // Server retina tile detection (non-standard):\n        // Try loading the center tile for the highest resolution. If it is not\n        // available, we are dealing with retina tiles, and need to adjust the\n        // tile url calculation.\n        var tileUrl = tileGrid.getTileCoordForCoordAndResolution(getCenter(tileGrid.getExtent()), resolutions[resolutions.length - 1]);\n        var testTileUrl = tileUrlFunction(tileUrl, 1, null);\n        var image = new Image();\n        image.addEventListener('error', function () {\n            tileWidth = tileSize;\n            this.changed();\n        }.bind(_this));\n        image.src = testTileUrl;\n        return 
 _this;\n    }\n    return Zoomify;\n}(TileImage));\nexport default Zoomify;\n//# sourceMappingURL=Zoomify.js.map","/**\n * @module ol/format/IIIFInfo\n */\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n            r[k] = a[j];\n    return r;\n};\nimport { assert } from '../asserts.js';\n/**\n * @typedef {Object} PreferredOptions\n * @property {string} [format] Preferred image format. Will be used if the image information\n * indicates support for that format.\n * @property {string} [quality] IIIF image qualitiy.  Will be used if the image information\n * indicates support for that quality.\n */\n/**\n * @typedef {Object} SupportedFeatures\n * @property {Array<string>} [supports] Supported IIIF image size and region\n * calculation features.\n 
 * @property {Array<string>} [formats] Supported image formats.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n */\n/**\n * @typedef {Object} TileInfo\n * @property {Array<number>} scaleFactors Supported resolution scaling factors.\n * @property {number} width Tile width in pixels.\n * @property {number} [height] Tile height in pixels. Same as tile width if height is\n * not given.\n */\n/**\n * @typedef {Object} IiifProfile\n * @property {Array<string>} [formats] Supported image formats for the image service.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n * @property {Array<string>} [supports] Supported features.\n * @property {number} [maxArea] Maximum area (pixels) available for this image service.\n * @property {number} [maxHeight] Maximum height.\n * @property {number} [maxWidth] Maximum width.\n */\n/**\n * @typedef {Object<string,string|number|Array<number|string|IiifProfile>|Object<string, number>|TileInfo>}\n *    Imag
 eInformationResponse\n */\n/**\n * Enum representing the major IIIF Image API versions\n * @enum {string}\n */\nexport var Versions = {\n    VERSION1: 'version1',\n    VERSION2: 'version2',\n    VERSION3: 'version3',\n};\n/**\n * Supported image formats, qualities and supported region / size calculation features\n * for different image API versions and compliance levels\n * @const\n * @type {Object<string, Object<string, SupportedFeatures>>}\n */\nvar IIIF_PROFILE_VALUES = {};\nIIIF_PROFILE_VALUES[Versions.VERSION1] = {\n    'level0': {\n        supports: [],\n        formats: [],\n        qualities: ['native'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n        formats: ['jpg'],\n        qualities: ['native'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            's
 izeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['native', 'color', 'grey', 'bitonal'],\n    },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION2] = {\n    'level0': {\n        supports: [],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByDistortedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['default', 'bitonal'],\n    },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION3] = {\n    'level0': {\n        supports: [],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level1': {\n        supports: ['regionByPx'
 , 'regionSquare', 'sizeByW', 'sizeByH', 'sizeByWh'],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionSquare',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['default'],\n    },\n};\nIIIF_PROFILE_VALUES['none'] = {\n    'none': {\n        supports: [],\n        formats: [],\n        qualities: [],\n    },\n};\nvar COMPLIANCE_VERSION1 = /^https?:\\/\\/library\\.stanford\\.edu\\/iiif\\/image-api\\/(?:1\\.1\\/)?compliance\\.html#level[0-2]$/;\nvar COMPLIANCE_VERSION2 = /^https?:\\/\\/iiif\\.io\\/api\\/image\\/2\\/level[0-2](?:\\.json)?$/;\nvar COMPLIANCE_VERSION3 = /(^https?:\\/\\/iiif\\.io\\/api\\/image\\/3\\/level[0-2](?:\\.json)?$)|(^level[0-2]$)/;\nfunction generateVersion1Options(iiifInfo) {\n    var l
 evelProfile = iiifInfo.getComplianceLevelSupportedFeatures();\n    // Version 1.0 and 1.1 do not require a profile.\n    if (levelProfile === undefined) {\n        levelProfile = IIIF_PROFILE_VALUES[Versions.VERSION1]['level0'];\n    }\n    return {\n        url: iiifInfo.imageInfo['@id'] === undefined\n            ? undefined\n            : iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n        supports: levelProfile.supports,\n        formats: __spreadArrays(levelProfile.formats, [\n            iiifInfo.imageInfo.formats === undefined\n                ? []\n                : iiifInfo.imageInfo.formats,\n        ]),\n        qualities: __spreadArrays(levelProfile.qualities, [\n            iiifInfo.imageInfo.qualities === undefined\n                ? []\n                : iiifInfo.imageInfo.qualities,\n        ]),\n        resolutions: iiifInfo.imageInfo.scale_factors,\n        tileSize: iiifInfo.imageInfo.tile_width !== undefined\n            ? iiifInfo.imageInfo
 .tile_height !== undefined\n                ? [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_height]\n                : [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_width]\n            : iiifInfo.imageInfo.tile_height != undefined\n                ? [iiifInfo.imageInfo.tile_height, iiifInfo.imageInfo.tile_height]\n                : undefined,\n    };\n}\nfunction generateVersion2Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(), additionalProfile = Array.isArray(iiifInfo.imageInfo.profile) &&\n        iiifInfo.imageInfo.profile.length > 1, profileSupports = additionalProfile && iiifInfo.imageInfo.profile[1].supports\n        ? iiifInfo.imageInfo.profile[1].supports\n        : [], profileFormats = additionalProfile && iiifInfo.imageInfo.profile[1].formats\n        ? iiifInfo.imageInfo.profile[1].formats\n        : [], profileQualities = additionalProfile && iiifInfo.imageInfo.profile[1].qualities\n        ? iiifInfo.imageIn
 fo.profile[1].qualities\n        : [];\n    return {\n        url: iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n        sizes: iiifInfo.imageInfo.sizes === undefined\n            ? undefined\n            : iiifInfo.imageInfo.sizes.map(function (size) {\n                return [size.width, size.height];\n            }),\n        tileSize: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : [\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.width;\n                })[0],\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.height === undefined ? tile.width : tile.height;\n                })[0],\n            ],\n        resolutions: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : iiifInfo.imageInfo.tiles.map(function (tile) {\n                return tile.scaleFactors;\n            })[0],\n        supports: __spreadArr
 ays(levelProfile.supports, profileSupports),\n        formats: __spreadArrays(levelProfile.formats, profileFormats),\n        qualities: __spreadArrays(levelProfile.qualities, profileQualities),\n    };\n}\nfunction generateVersion3Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(), formats = iiifInfo.imageInfo.extraFormats === undefined\n        ? levelProfile.formats\n        : __spreadArrays(levelProfile.formats, iiifInfo.imageInfo.extraFormats), preferredFormat = iiifInfo.imageInfo.preferredFormats !== undefined &&\n        Array.isArray(iiifInfo.imageInfo.preferredFormats) &&\n        iiifInfo.imageInfo.preferredFormats.length > 0\n        ? iiifInfo.imageInfo.preferredFormats\n            .filter(function (format) {\n            return ['jpg', 'png', 'gif'].includes(format);\n        })\n            .reduce(function (acc, format) {\n            return acc === undefined && formats.includes(format)\n                ? format\n              
   : acc;\n        }, undefined)\n        : undefined;\n    return {\n        url: iiifInfo.imageInfo['id'],\n        sizes: iiifInfo.imageInfo.sizes === undefined\n            ? undefined\n            : iiifInfo.imageInfo.sizes.map(function (size) {\n                return [size.width, size.height];\n            }),\n        tileSize: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : [\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.width;\n                })[0],\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.height;\n                })[0],\n            ],\n        resolutions: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : iiifInfo.imageInfo.tiles.map(function (tile) {\n                return tile.scaleFactors;\n            })[0],\n        supports: iiifInfo.imageInfo.extraFeatures === undefined\n            ? levelProfile.s
 upports\n            : __spreadArrays(levelProfile.supports, iiifInfo.imageInfo.extraFeatures),\n        formats: formats,\n        qualities: iiifInfo.imageInfo.extraQualities === undefined\n            ? levelProfile.qualities\n            : __spreadArrays(levelProfile.qualities, iiifInfo.imageInfo.extraQualities),\n        preferredFormat: preferredFormat,\n    };\n}\nvar versionFunctions = {};\nversionFunctions[Versions.VERSION1] = generateVersion1Options;\nversionFunctions[Versions.VERSION2] = generateVersion2Options;\nversionFunctions[Versions.VERSION3] = generateVersion3Options;\n/**\n * @classdesc\n * Format for transforming IIIF Image API image information responses into\n * IIIF tile source ready options\n *\n * @api\n */\nvar IIIFInfo = /** @class */ (function () {\n    /**\n     * @param {string|ImageInformationResponse} imageInfo\n     * Deserialized image information JSON response object or JSON response as string\n     */\n    function IIIFInfo(imageInfo) {\n        t
 his.setImageInfo(imageInfo);\n    }\n    /**\n     * @param {string|ImageInformationResponse} imageInfo\n     * Deserialized image information JSON response object or JSON response as string\n     * @api\n     */\n    IIIFInfo.prototype.setImageInfo = function (imageInfo) {\n        if (typeof imageInfo == 'string') {\n            this.imageInfo = JSON.parse(imageInfo);\n        }\n        else {\n            this.imageInfo = imageInfo;\n        }\n    };\n    /**\n     * @returns {Versions} Major IIIF version.\n     * @api\n     */\n    IIIFInfo.prototype.getImageApiVersion = function () {\n        if (this.imageInfo === undefined) {\n            return;\n        }\n        var context = this.imageInfo['@context'] || 'ol-no-context';\n        if (typeof context == 'string') {\n            context = [context];\n        }\n        for (var i = 0; i < context.length; i++) {\n            switch (context[i]) {\n                case 'http://library.stanford.edu/iiif/image-api/1.1/context
 .json':\n                case 'http://iiif.io/api/image/1/context.json':\n                    return Versions.VERSION1;\n                case 'http://iiif.io/api/image/2/context.json':\n                    return Versions.VERSION2;\n                case 'http://iiif.io/api/image/3/context.json':\n                    return Versions.VERSION3;\n                case 'ol-no-context':\n                    // Image API 1.0 has no '@context'\n                    if (this.getComplianceLevelEntryFromProfile(Versions.VERSION1) &&\n                        this.imageInfo.identifier) {\n                        return Versions.VERSION1;\n                    }\n                    break;\n                default:\n            }\n        }\n        assert(false, 61);\n    };\n    /**\n     * @param {Versions} version Optional IIIF image API version\n     * @returns {string} Compliance level as it appears in the IIIF image information\n     * response.\n     */\n    IIIFInfo.prototype.getComplianceL
 evelEntryFromProfile = function (version) {\n        if (this.imageInfo === undefined || this.imageInfo.profile === undefined) {\n            return;\n        }\n        if (version === undefined) {\n            version = this.getImageApiVersion();\n        }\n        switch (version) {\n            case Versions.VERSION1:\n                if (COMPLIANCE_VERSION1.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                break;\n            case Versions.VERSION3:\n                if (COMPLIANCE_VERSION3.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                break;\n            case Versions.VERSION2:\n                if (typeof this.imageInfo.profile === 'string' &&\n                    COMPLIANCE_VERSION2.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                if (Array.isArray(this.imageInfo.p
 rofile) &&\n                    this.imageInfo.profile.length > 0 &&\n                    typeof this.imageInfo.profile[0] === 'string' &&\n                    COMPLIANCE_VERSION2.test(this.imageInfo.profile[0])) {\n                    return this.imageInfo.profile[0];\n                }\n                break;\n            default:\n        }\n    };\n    /**\n     * @param {Versions} version Optional IIIF image API version\n     * @returns {string} Compliance level, on of 'level0', 'level1' or 'level2' or undefined\n     */\n    IIIFInfo.prototype.getComplianceLevelFromProfile = function (version) {\n        var complianceLevel = this.getComplianceLevelEntryFromProfile(version);\n        if (complianceLevel === undefined) {\n            return undefined;\n        }\n        var level = complianceLevel.match(/level[0-2](?:\\.json)?$/g);\n        return Array.isArray(level) ? level[0].replace('.json', '') : undefined;\n    };\n    /**\n     * @returns {SupportedFeatures} Image forma
 ts, qualities and region / size calculation\n     * methods that are supported by the IIIF service.\n     */\n    IIIFInfo.prototype.getComplianceLevelSupportedFeatures = function () {\n        if (this.imageInfo === undefined) {\n            return;\n        }\n        var version = this.getImageApiVersion();\n        var level = this.getComplianceLevelFromProfile(version);\n        if (level === undefined) {\n            return IIIF_PROFILE_VALUES['none']['none'];\n        }\n        return IIIF_PROFILE_VALUES[version][level];\n    };\n    /**\n     * @param {PreferredOptions=} opt_preferredOptions Optional options for preferred format and quality.\n     * @returns {import(\"../source/IIIF.js\").Options} IIIF tile source ready constructor options.\n     * @api\n     */\n    IIIFInfo.prototype.getTileSourceOptions = function (opt_preferredOptions) {\n        var options = opt_preferredOptions || {}, version = this.getImageApiVersion();\n        if (version === undefined) {\n       
      return;\n        }\n        var imageOptions = version === undefined ? undefined : versionFunctions[version](this);\n        if (imageOptions === undefined) {\n            return;\n        }\n        return {\n            url: imageOptions.url,\n            version: version,\n            size: [this.imageInfo.width, this.imageInfo.height],\n            sizes: imageOptions.sizes,\n            format: options.format !== undefined &&\n                imageOptions.formats.includes(options.format)\n                ? options.format\n                : imageOptions.preferredFormat !== undefined\n                    ? imageOptions.preferredFormat\n                    : 'jpg',\n            supports: imageOptions.supports,\n            quality: options.quality && imageOptions.qualities.includes(options.quality)\n                ? options.quality\n                : imageOptions.qualities.includes('native')\n                    ? 'native'\n                    : 'default',\n            resol
 utions: Array.isArray(imageOptions.resolutions)\n                ? imageOptions.resolutions.sort(function (a, b) {\n                    return b - a;\n                })\n                : undefined,\n            tileSize: imageOptions.tileSize,\n        };\n    };\n    return IIIFInfo;\n}());\nexport default IIIFInfo;\n//# sourceMappingURL=IIIFInfo.js.map","/**\n * @module ol/source/IIIF\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n
 import TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport { CustomTile } from './Zoomify.js';\nimport { DEFAULT_TILE_SIZE } from '../tilegrid/common.js';\nimport { Versions } from '../format/IIIFInfo.js';\nimport { assert } from '../asserts.js';\nimport { getTopLeft } from '../extent.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {null|string} [crossOrigin]\n * @property {import(\"../extent.js\").Extent} [extent=[0, -height, width, 0]]\n * @property {string} [format='jpg'] Requested image format.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {string} [quality] Requested IIIF image quality. Defaul
 t is 'native'\n * for version 1, 'default' for versions 2 and 3.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Array<number>} [resolutions] Supported resolutions as given in IIIF 'scaleFactors'\n * @property {import(\"../size.js\").Size} size Size of the image [width, height].\n * @property {Array<import(\"../size.js\").Size>} [sizes] Supported scaled image sizes.\n * Content of the IIIF info.json 'sizes' property, but as array of Size objects.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {Array<string>} [supports=[]] Supported IIIF region and size calculation\n * features.\n * @property {number} [tilePixelRatio]\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Same tile size is used for all zoom levels. If tile size is a number,\n * a square tile is assumed. If the 
 IIIF image service supports arbitrary\n * tiling (sizeByH, sizeByW, sizeByWh or sizeByPct as well as regionByPx or regionByPct\n * are supported), the default tilesize is 256.\n * @property {number} [transition]\n * @property {string} [url] Base URL of the IIIF Image service.\n * This should be the same as the IIIF Image ID.\n * @property {import(\"../format/IIIFInfo.js\").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.\n * @property {number} [zDirection=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\nfunction formatPercentage(percentage) {\n    return percentage.toLocaleString('en', { maximumFractionDigits: 10 });\n}\n/**\n * @classdesc\n * Layer source for IIIF Image API services.\n * @api\n */\nvar IIIF = /** @class 
 */ (function (_super) {\n    __extends(IIIF, _super);\n    /**\n     * @param {Options=} opt_options Tile source options. Use {@link import(\"../format/IIIFInfo.js\").IIIFInfo}\n     * to parse Image API service information responses into constructor options.\n     * @api\n     */\n    function IIIF(opt_options) {\n        var _this = this;\n        /**\n         * @type {Partial<Options>}\n         */\n        var options = opt_options || {};\n        var baseUrl = options.url || '';\n        baseUrl =\n            baseUrl +\n                (baseUrl.lastIndexOf('/') === baseUrl.length - 1 || baseUrl === ''\n                    ? ''\n                    : '/');\n        var version = options.version || Versions.VERSION2;\n        var sizes = options.sizes || [];\n        var size = options.size;\n        assert(size != undefined &&\n            Array.isArray(size) &&\n            size.length == 2 &&\n            !isNaN(size[0]) &&\n            size[0] > 0 &&\n            !isNaN(siz
 e[1]) &&\n            size[1] > 0, 60);\n        var width = size[0];\n        var height = size[1];\n        var tileSize = options.tileSize;\n        var tilePixelRatio = options.tilePixelRatio || 1;\n        var format = options.format || 'jpg';\n        var quality = options.quality ||\n            (options.version == Versions.VERSION1 ? 'native' : 'default');\n        var resolutions = options.resolutions || [];\n        var supports = options.supports || [];\n        var extent = options.extent || [0, -height, width, 0];\n        var supportsListedSizes = sizes != undefined && Array.isArray(sizes) && sizes.length > 0;\n        var supportsListedTiles = tileSize !== undefined &&\n            ((typeof tileSize === 'number' &&\n                Number.isInteger(tileSize) &&\n                tileSize > 0) ||\n                (Array.isArray(tileSize) && tileSize.length > 0));\n        var supportsArbitraryTiling = supports != undefined &&\n            Array.isArray(supports) &&\n   
          (supports.includes('regionByPx') || supports.includes('regionByPct')) &&\n            (supports.includes('sizeByWh') ||\n                supports.includes('sizeByH') ||\n                supports.includes('sizeByW') ||\n                supports.includes('sizeByPct'));\n        var tileWidth, tileHeight, maxZoom;\n        resolutions.sort(function (a, b) {\n            return b - a;\n        });\n        if (supportsListedTiles || supportsArbitraryTiling) {\n            if (tileSize != undefined) {\n                if (typeof tileSize === 'number' &&\n                    Number.isInteger(tileSize) &&\n                    tileSize > 0) {\n                    tileWidth = tileSize;\n                    tileHeight = tileSize;\n                }\n                else if (Array.isArray(tileSize) && tileSize.length > 0) {\n                    if (tileSize.length == 1 ||\n                        (tileSize[1] == undefined && Number.isInteger(tileSize[0]))) {\n                        t
 ileWidth = tileSize[0];\n                        tileHeight = tileSize[0];\n                    }\n                    if (tileSize.length == 2) {\n                        if (Number.isInteger(tileSize[0]) &&\n                            Number.isInteger(tileSize[1])) {\n                            tileWidth = tileSize[0];\n                            tileHeight = tileSize[1];\n                        }\n                        else if (tileSize[0] == undefined &&\n                            Number.isInteger(tileSize[1])) {\n                            tileWidth = tileSize[1];\n                            tileHeight = tileSize[1];\n                        }\n                    }\n                }\n            }\n            if (tileWidth === undefined || tileHeight === undefined) {\n                tileWidth = DEFAULT_TILE_SIZE;\n                tileHeight = DEFAULT_TILE_SIZE;\n            }\n            if (resolutions.length == 0) {\n                maxZoom = Math.max(Math.ceil
 (Math.log(width / tileWidth) / Math.LN2), Math.ceil(Math.log(height / tileHeight) / Math.LN2));\n                for (var i = maxZoom; i >= 0; i--) {\n                    resolutions.push(Math.pow(2, i));\n                }\n            }\n            else {\n                var maxScaleFactor = Math.max.apply(Math, resolutions);\n                // TODO maxScaleFactor might not be a power to 2\n                maxZoom = Math.round(Math.log(maxScaleFactor) / Math.LN2);\n            }\n        }\n        else {\n            // No tile support.\n            tileWidth = width;\n            tileHeight = height;\n            resolutions = [];\n            if (supportsListedSizes) {\n                /*\n                 * 'sizes' provided. Use full region in different resolutions. Every\n                 * resolution has only one tile.\n                 */\n                sizes.sort(function (a, b) {\n                    return a[0] - b[0];\n                });\n                maxZoom =
  -1;\n                var ignoredSizesIndex = [];\n                for (var i = 0; i < sizes.length; i++) {\n                    var resolution = width / sizes[i][0];\n                    if (resolutions.length > 0 &&\n                        resolutions[resolutions.length - 1] == resolution) {\n                        ignoredSizesIndex.push(i);\n                        continue;\n                    }\n                    resolutions.push(resolution);\n                    maxZoom++;\n                }\n                if (ignoredSizesIndex.length > 0) {\n                    for (var i = 0; i < ignoredSizesIndex.length; i++) {\n                        sizes.splice(ignoredSizesIndex[i] - i, 1);\n                    }\n                }\n            }\n            else {\n                // No useful image information at all. Try pseudo tile with full image.\n                resolutions.push(1);\n                sizes.push([width, height]);\n                maxZoom = 0;\n            }
 \n        }\n        var tileGrid = new TileGrid({\n            tileSize: [tileWidth, tileHeight],\n            extent: extent,\n            origin: getTopLeft(extent),\n            resolutions: resolutions,\n        });\n        var tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n            var regionParam, sizeParam;\n            var zoom = tileCoord[0];\n            if (zoom > maxZoom) {\n                return;\n            }\n            var tileX = tileCoord[1], tileY = tileCoord[2], scale = resolutions[zoom];\n            if (tileX === undefined ||\n                tileY === undefined ||\n                scale === undefined ||\n                tileX < 0 ||\n                Math.ceil(width / scale / tileWidth) <= tileX ||\n                tileY < 0 ||\n                Math.ceil(height / scale / tileHeight) <= tileY) {\n                return;\n            }\n            if (supportsArbitraryTiling || supportsListedTiles) {\n                var regionX = tile
 X * tileWidth * scale, regionY = tileY * tileHeight * scale;\n                var regionW = tileWidth * scale, regionH = tileHeight * scale, sizeW = tileWidth, sizeH = tileHeight;\n                if (regionX + regionW > width) {\n                    regionW = width - regionX;\n                }\n                if (regionY + regionH > height) {\n                    regionH = height - regionY;\n                }\n                if (regionX + tileWidth * scale > width) {\n                    sizeW = Math.floor((width - regionX + scale - 1) / scale);\n                }\n                if (regionY + tileHeight * scale > height) {\n                    sizeH = Math.floor((height - regionY + scale - 1) / scale);\n                }\n                if (regionX == 0 &&\n                    regionW == width &&\n                    regionY == 0 &&\n                    regionH == height) {\n                    // canonical full image region parameter is 'full', not 'x,y,w,h'\n               
      regionParam = 'full';\n                }\n                else if (!supportsArbitraryTiling ||\n                    supports.includes('regionByPx')) {\n                    regionParam = regionX + ',' + regionY + ',' + regionW + ',' + regionH;\n                }\n                else if (supports.includes('regionByPct')) {\n                    var pctX = formatPercentage((regionX / width) * 100), pctY = formatPercentage((regionY / height) * 100), pctW = formatPercentage((regionW / width) * 100), pctH = formatPercentage((regionH / height) * 100);\n                    regionParam = 'pct:' + pctX + ',' + pctY + ',' + pctW + ',' + pctH;\n                }\n                if (version == Versions.VERSION3 &&\n                    (!supportsArbitraryTiling || supports.includes('sizeByWh'))) {\n                    sizeParam = sizeW + ',' + sizeH;\n                }\n                else if (!supportsArbitraryTiling || supports.includes('sizeByW')) {\n                    sizeParam = size
 W + ',';\n                }\n                else if (supports.includes('sizeByH')) {\n                    sizeParam = ',' + sizeH;\n                }\n                else if (supports.includes('sizeByWh')) {\n                    sizeParam = sizeW + ',' + sizeH;\n                }\n                else if (supports.includes('sizeByPct')) {\n                    sizeParam = 'pct:' + formatPercentage(100 / scale);\n                }\n            }\n            else {\n                regionParam = 'full';\n                if (supportsListedSizes) {\n                    var regionWidth = sizes[zoom][0], regionHeight = sizes[zoom][1];\n                    if (version == Versions.VERSION3) {\n                        if (regionWidth == width && regionHeight == height) {\n                            sizeParam = 'max';\n                        }\n                        else {\n                            sizeParam = regionWidth + ',' + regionHeight;\n                        }\n            
         }\n                    else {\n                        if (regionWidth == width) {\n                            sizeParam = 'full';\n                        }\n                        else {\n                            sizeParam = regionWidth + ',';\n                        }\n                    }\n                }\n                else {\n                    sizeParam = version == Versions.VERSION3 ? 'max' : 'full';\n                }\n            }\n            return (baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format);\n        };\n        var IiifTileClass = CustomTile.bind(null, toSize(tileSize || 256).map(function (size) {\n            return size * tilePixelRatio;\n        }));\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoo
 thing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: options.state,\n            tileClass: IiifTileClass,\n            tileGrid: tileGrid,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: tileUrlFunction,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {number}\n         */\n        _this.zDirection = options.zDirection;\n        return _this;\n    }\n    return IIIF;\n}(TileImage));\nexport default IIIF;\n//# sourceMappingURL=IIIF.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        retur
 n extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/reproj/Image\n */\nimport { ERROR_THRESHOLD } from './common.js';\nimport EventType from '../events/EventType.js';\nimport ImageBase from '../ImageBase.js';\nimport ImageState from '../ImageState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceResolution, render as renderReprojected, } from '../reproj.js';\nimport { getCenter, getHeight, getIntersection, getWidth } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../ImageBase.js\").default} FunctionType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSourc
 e}.\n */\nvar ReprojImage = /** @class */ (function (_super) {\n    __extends(ReprojImage, _super);\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../extent.js\").Extent} targetExtent Target extent.\n     * @param {number} targetResolution Target resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {FunctionType} getImageFunction\n     *     Function returning source images (extent, resolution, pixelRatio).\n     * @param {object=} opt_contextOptions Properties to set on the canvas context.\n     */\n    function ReprojImage(sourceProj, targetProj, targetExtent, targetResolution, pixelRatio, getImageFunction, opt_contextOptions) {\n        var _this = this;\n        var maxSourceExtent = sourceProj.getExtent();\n        var maxTargetExtent = targetProj.getExtent();\n        var limited
 TargetExtent = maxTargetExtent\n            ? getIntersection(targetExtent, maxTargetExtent)\n            : targetExtent;\n        var targetCenter = getCenter(limitedTargetExtent);\n        var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n        var errorThresholdInPixels = ERROR_THRESHOLD;\n        var triangulation = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        var sourceExtent = triangulation.calculateSourceExtent();\n        var sourceImage = getImageFunction(sourceExtent, sourceResolution, pixelRatio);\n        var state = sourceImage ? ImageState.IDLE : ImageState.EMPTY;\n        var sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n        _this = _super.call(this, targetExtent, targetResolution, sourcePixelRatio, state) || this;\n        /**\n         * @private\n         * @type {import(\"../pr
 oj/Projection.js\").default}\n         */\n        _this.targetProj_ = targetProj;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.maxSourceExtent_ = maxSourceExtent;\n        /**\n         * @private\n         * @type {!import(\"./Triangulation.js\").default}\n         */\n        _this.triangulation_ = triangulation;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.targetResolution_ = targetResolution;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.targetExtent_ = targetExtent;\n        /**\n         * @private\n         * @type {import(\"../ImageBase.js\").default}\n         */\n        _this.sourceImage_ = sourceImage;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.sourcePixelRatio_ = sourcePixelRatio;\n        /**\n         * @private\n         * @type {object}\n    
      */\n        _this.contextOptions_ = opt_contextOptions;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.sourceListenerKey_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    ReprojImage.prototype.disposeInternal = function () {\n        if (this.state == ImageState.LOADING) {\n            this.unlistenSource_();\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * @return {HTMLCanvasElement} Image.\n     */\n    ReprojImage.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    /**\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    ReprojImage.prototype.getProjection = function () {\n        return this.targetProj_;\n    };\n    /**\n     * @private\n     */\n    ReprojImage
 .prototype.reproject_ = function () {\n        var sourceState = this.sourceImage_.getState();\n        if (sourceState == ImageState.LOADED) {\n            var width = getWidth(this.targetExtent_) / this.targetResolution_;\n            var height = getHeight(this.targetExtent_) / this.targetResolution_;\n            this.canvas_ = renderReprojected(width, height, this.sourcePixelRatio_, this.sourceImage_.getResolution(), this.maxSourceExtent_, this.targetResolution_, this.targetExtent_, this.triangulation_, [\n                {\n                    extent: this.sourceImage_.getExtent(),\n                    image: this.sourceImage_.getImage(),\n                },\n            ], 0, undefined, this.contextOptions_);\n        }\n        this.state = sourceState;\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ReprojImage.prototype.load = function () {\n        if (this.state == ImageState.IDLE) {\n            this.state = ImageState.LOADING;\n
             this.changed();\n            var sourceState = this.sourceImage_.getState();\n            if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n                this.reproject_();\n            }\n            else {\n                this.sourceListenerKey_ = listen(this.sourceImage_, EventType.CHANGE, function (e) {\n                    var sourceState = this.sourceImage_.getState();\n                    if (sourceState == ImageState.LOADED ||\n                        sourceState == ImageState.ERROR) {\n                        this.unlistenSource_();\n                        this.reproject_();\n                    }\n                }, this);\n                this.sourceImage_.load();\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    ReprojImage.prototype.unlistenSource_ = function () {\n        unlistenByKey(\n        /** @type {!import(\"../events.js\").EventsKey} */ (this.sourceListenerKey_));\n        this.sourceListenerKey
 _ = null;\n    };\n    return ReprojImage;\n}(ImageBase));\nexport default ReprojImage;\n//# sourceMappingURL=Image.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Image\n */\nimport Event from '../events/Event.js';\nimport ImageState from '../ImageState.js';\nimport ReprojImage from '../reproj/Image.js';\nimport Source from './Source.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../reproj/common.js';\ni
 mport { IMAGE_SMOOTHING_DISABLED } from './common.js';\nimport { abstract } from '../util.js';\nimport { equals } from '../extent.js';\nimport { equivalent } from '../proj.js';\nimport { linearFindNearest } from '../array.js';\n/**\n * @enum {string}\n */\nexport var ImageSourceEventType = {\n    /**\n     * Triggered when an image starts loading.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n     * @api\n     */\n    IMAGELOADSTART: 'imageloadstart',\n    /**\n     * Triggered when an image finishes loading.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n     * @api\n     */\n    IMAGELOADEND: 'imageloadend',\n    /**\n     * Triggered if image loading results in an error.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n     * @api\n     */\n    IMAGELOADERROR: 'imageloaderror',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\
 nvar ImageSourceEvent = /** @class */ (function (_super) {\n    __extends(ImageSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Image.js\").default} image The image.\n     */\n    function ImageSourceEvent(type, image) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The image related to the event.\n         * @type {import(\"../Image.js\").default}\n         * @api\n         */\n        _this.image = image;\n        return _this;\n    }\n    return ImageSourceEvent;\n}(Event));\nexport { ImageSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {Array<number>} [resolutions]\n * @property {import(\"./State.js\").default} [state]\n */\n/**\n * @classdesc\n * Abstract base class; normally only 
 used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing a single image.\n * @abstract\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageSource = /** @class */ (function (_super) {\n    __extends(ImageSource, _super);\n    /**\n     * @param {Options} options Single image source options.\n     */\n    function ImageSource(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            projection: options.projection,\n            state: options.state,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.resolutions_ =\n            options.resolutions !== undefined ? options.resolutions : null;\n        /**\n         * @private\n         * @type {import(\"../reproj/Image.js\").default}\n         */\n        _this.reprojectedImage_ = null;\n        /**\n         * @private\n         * @type {number}\n      
    */\n        _this.reprojectedRevision_ = 0;\n        /**\n         * @private\n         * @type {object|undefined}\n         */\n        _this.contextOptions_ =\n            options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n        return _this;\n    }\n    /**\n     * @return {Array<number>} Resolutions.\n     */\n    ImageSource.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    ImageSource.prototype.getContextOptions = function () {\n        return this.contextOptions_;\n    };\n    /**\n     * @protected\n     * @param {number} resolution Resolution.\n     * @return {number} Resolution.\n     */\n    ImageSource.prototype.findNearestResolution = function (resolution) {\n        if (this.resolutions_) {\n            var idx = linearFindNearest(this.resolutions_, resolution, 0);\n            resolution = this.resolutions_[idx];\n        }\n        
 return resolution;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageBase.js\").default} Single image.\n     */\n    ImageSource.prototype.getImage = function (extent, resolution, pixelRatio, projection) {\n        var sourceProjection = this.getProjection();\n        if (!ENABLE_RASTER_REPROJECTION ||\n            !sourceProjection ||\n            !projection ||\n            equivalent(sourceProjection, projection)) {\n            if (sourceProjection) {\n                projection = sourceProjection;\n            }\n            return this.getImageInternal(extent, resolution, pixelRatio, projection);\n        }\n        else {\n            if (this.reprojectedImage_) {\n                if (this.reprojectedRevision_ == this.getRevision() &&\n  
                   equivalent(this.reprojectedImage_.getProjection(), projection) &&\n                    this.reprojectedImage_.getResolution() == resolution &&\n                    equals(this.reprojectedImage_.getExtent(), extent)) {\n                    return this.reprojectedImage_;\n                }\n                this.reprojectedImage_.dispose();\n                this.reprojectedImage_ = null;\n            }\n            this.reprojectedImage_ = new ReprojImage(sourceProjection, projection, extent, resolution, pixelRatio, function (extent, resolution, pixelRatio) {\n                return this.getImageInternal(extent, resolution, pixelRatio, sourceProjection);\n            }.bind(this), this.contextOptions_);\n            this.reprojectedRevision_ = this.getRevision();\n            return this.reprojectedImage_;\n        }\n    };\n    /**\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     *
  @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageBase.js\").default} Single image.\n     * @protected\n     */\n    ImageSource.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        return abstract();\n    };\n    /**\n     * Handle image change events.\n     * @param {import(\"../events/Event.js\").default} event Event.\n     * @protected\n     */\n    ImageSource.prototype.handleImageChange = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        switch (image.getState()) {\n            case ImageState.LOADING:\n                this.loading = true;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADSTART, image));\n                break;\n            case ImageState.LOADED:\n                this.loading = false;\n                this.dispatchEv
 ent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADEND, image));\n                break;\n            case ImageState.ERROR:\n                this.loading = false;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADERROR, image));\n                break;\n            default:\n            // pass\n        }\n    };\n    return ImageSource;\n}(Source));\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n    /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\nexport default ImageSource;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/uri\n */\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An
  object where keys are URI-encoded parameter keys,\n *     and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n    var keyParams = [];\n    // Skip any null or undefined parameter values\n    Object.keys(params).forEach(function (k) {\n        if (params[k] !== null && params[k] !== undefined) {\n            keyParams.push(k + '=' + encodeURIComponent(params[k]));\n        }\n    });\n    var qs = keyParams.join('&');\n    // remove any trailing ? or &\n    uri = uri.replace(/[?&]$/, '');\n    // append ? or & depending on whether uri has existing parameters\n    uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';\n    return uri + qs;\n}\n//# sourceMappingURL=uri.js.map","/**\n * @module ol/source/ImageArcGISRest\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } i
 nstanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { containsExtent, getHeight, getWidth } from '../extent.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must pr
 ovide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from\n * the remote server.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given\n * a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service\n * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is\n * `IMAGE` by default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`, and `IMAGESR`\n * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See\n * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/}
 \n * for further reference.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,\n * `2` means twice the size of the map viewport, and so on.\n * @property {Array<number>} [resolutions] Resolutions. If specified, requests will be made for\n * these resolutions only.\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url\n * should include /MapServer or /ImageServer.\n */\n/**\n * @classdesc\n * Source for data from ArcGIS Rest services providing single, untiled images.\n * Useful when underlying map service has labels.\n *\n * If underlying map service is not using labels,\n * take advantage of ol image caching and use\n * {@link module:ol/source/TileArcGISRest} data source.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageArcGISRest = /** @class */ (funct
 ion (_super) {\n    __extends(ImageArcGISRest, _super);\n    /**\n     * @param {Options=} opt_options Image ArcGIS Rest Options.\n     */\n    function ImageArcGISRest(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @p
 rivate\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * Get the user-provided params, i.e. those passed to 
 the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageArcGISRest.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageArcGISRest.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (this.url_ === undefined) {\n            return null;\n        }\n        resolution = this.findNearestResolution(resolution);\n        pixelRatio = this.hidpi_ ? pixelRatio : 1;\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n  
           image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), extent)) {\n            return image;\n        }\n        var params = {\n            'F': 'image',\n            'FORMAT': 'PNG32',\n            'TRANSPARENT': true,\n        };\n        assign(params, this.params_);\n        extent = extent.slice();\n        var centerX = (extent[0] + extent[2]) / 2;\n        var centerY = (extent[1] + extent[3]) / 2;\n        if (this.ratio_ != 1) {\n            var halfWidth = (this.ratio_ * getWidth(extent)) / 2;\n            var halfHeight = (this.ratio_ * getHeight(extent)) / 2;\n            extent[0] = centerX - halfWidth;\n            extent[1] = centerY - halfHeight;\n            extent[2] = centerX + halfWidth;\n            extent[3] = centerY + halfHeight;\n        }\n        var imageResolution = resolution / pixelRatio;\n        // Compute an integer width and height.\n        var width = Ma
 th.ceil(getWidth(extent) / imageResolution);\n        var height = Math.ceil(getHeight(extent) / imageResolution);\n        // Modify the extent to match the integer width and height.\n        extent[0] = centerX - (imageResolution * width) / 2;\n        extent[2] = centerX + (imageResolution * width) / 2;\n        extent[1] = centerY - (imageResolution * height) / 2;\n        extent[3] = centerY + (imageResolution * height) / 2;\n        this.imageSize_[0] = width;\n        this.imageSize_[1] = height;\n        var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio, projection, params);\n        this.image_ = new ImageWrapper(extent, resolution, pixelRatio, url, this.crossOrigin_, this.imageLoadFunction_);\n        this.renderedRevision_ = this.getRevision();\n        this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        return this.image_;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import
 (\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageArcGISRest.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string} Request URL.\n     * @private\n     */\n    ImageArcGISRest.prototype.getRequestUrl_ = function (extent, size, pixelRatio, projection, params) {\n        // ArcGIS Server only wants the numeric portion of the projection ID.\n        var srid = projection.getCode().split(':').pop();\n        params['SIZE'] = size[0] + ',' + size[1];\n        params['BBOX'] = extent.join(',');\n        params['BBOXSR'] = srid;\n        params['IMAGESR'] = srid;\n        params['DPI'] = Math.r
 ound(90 * pixelRatio);\n        var url = this.url_;\n        var modifiedUrl = url\n            .replace(/MapServer\\/?$/, 'MapServer/export')\n            .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n        if (modifiedUrl == url) {\n            assert(false, 50); // `options.featureTypes` should be an Array\n        }\n        return appendParams(modifiedUrl, params);\n    };\n    /**\n     * Return the URL used for this ArcGIS source.\n     * @return {string|undefined} URL.\n     * @api\n     */\n    ImageArcGISRest.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * Set the image load function of the source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageArcGISRest.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    /**\n   
   * Set the URL to use for requests.\n     * @param {string|undefined} url URL.\n     * @api\n     */\n    ImageArcGISRest.prototype.setUrl = function (url) {\n        if (url != this.url_) {\n            this.url_ = url;\n            this.image_ = null;\n            this.changed();\n        }\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageArcGISRest.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.image_ = null;\n        this.changed();\n    };\n    return ImageArcGISRest;\n}(ImageSource));\nexport default ImageArcGISRest;\n//# sourceMappingURL=ImageArcGISRest.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in
  b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n/**\n * A function that is called to trigger asynchronous canvas drawing.  It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\nvar ImageCanvas = /** @class */ (function (_super) {\n    __extends(ImageCanvas, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} p
 ixelRatio Pixel ratio.\n     * @param {HTMLCanvasElement} canvas Canvas.\n     * @param {Loader=} opt_loader Optional loader function to\n     *     support asynchronous canvas drawing.\n     */\n    function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n        var _this = this;\n        var state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n        _this = _super.call(this, extent, resolution, pixelRatio, state) || this;\n        /**\n         * Optional canvas loader function.\n         * @type {?Loader}\n         * @private\n         */\n        _this.loader_ = opt_loader !== undefined ? opt_loader : null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = canvas;\n        /**\n         * @private\n         * @type {?Error}\n         */\n        _this.error_ = null;\n        return _this;\n    }\n    /**\n     * Get any error associated with asynchronous rendering.\n     * @retu
 rn {?Error} Any error that occurred during rendering.\n     */\n    ImageCanvas.prototype.getError = function () {\n        return this.error_;\n    };\n    /**\n     * Handle async drawing complete.\n     * @param {Error=} err Any error during drawing.\n     * @private\n     */\n    ImageCanvas.prototype.handleLoad_ = function (err) {\n        if (err) {\n            this.error_ = err;\n            this.state = ImageState.ERROR;\n        }\n        else {\n            this.state = ImageState.LOADED;\n        }\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ImageCanvas.prototype.load = function () {\n        if (this.state == ImageState.IDLE) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            this.loader_(this.handleLoad_.bind(this));\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Canvas element.\n     */\n    ImageCanvas.prototype.getImage = function () {\n        return this.canvas_;\
 n    };\n    return ImageCanvas;\n}(ImageBase));\nexport default ImageCanvas;\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/source/ImageCanvas\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageSource from './Image.js';\nimport { containsExtent, getHeight, getWidth, scaleFromCenter, } from '../extent.js';\n/**\n * A function returning the canvas element (`{HTMLCanvas
 Element}`)\n * used by the source as an image. The arguments passed to the function are:\n * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,\n * `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and\n * {@link module:ol/proj/Projection} the image projection. The canvas returned by\n * this function is cached by the source. The this keyword inside the function\n * references the {@link module:ol/source/ImageCanvas}.\n *\n * @typedef {function(this:import(\"../ImageCanvas.js\").default, import(\"../extent.js\").Extent, number,\n *     number, import(\"../size.js\").Size, import(\"../proj/Projection.js\").default): HTMLCanvasElement} FunctionType\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {FunctionType} [canvasFunction] Canvas function.\n * The function returning the canvas element used by the source\n * as an image. The argumen
 ts passed to the function are: `{import(\"../extent.js\").Extent}` the\n * image extent, `{number}` the image resolution, `{number}` the device pixel\n * ratio, `{import(\"../size.js\").Size}` the image size, and `{import(\"../proj/Projection.js\").Projection}` the image\n * projection. The canvas returned by this function is cached by the source. If\n * the value returned by the function is later changed then\n * `changed` should be called on the source for the source to\n * invalidate the current cached image. See: {@link module:ol/Observable~Observable#changed}\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the\n * width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n
  * If specified, new canvases will be created for these resolutions\n * @property {import(\"./State.js\").default} [state] Source state.\n */\n/**\n * @classdesc\n * Base class for image sources where a canvas element is the image.\n * @api\n */\nvar ImageCanvasSource = /** @class */ (function (_super) {\n    __extends(ImageCanvasSource, _super);\n    /**\n     * @param {Options=} opt_options ImageCanvas options.\n     */\n    function ImageCanvasSource(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n            state: options.state,\n        }) || this;\n        /**\n         * @private\n         * @type {FunctionType}\n         */\n        _this.canvasFunction_ = options.canvasFunction;\n        /**\n    
      * @private\n         * @type {import(\"../ImageCanvas.js\").default}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageCanvas.js\").default} Single image.\n     */\n    ImageCanvasSource.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        resolution = this.findNearestResolution(resolution);\n        var canvas = this.canvas_;\n        if (canvas &&\n            this.renderedRevi
 sion_ == this.getRevision() &&\n            canvas.getResolution() == resolution &&\n            canvas.getPixelRatio() == pixelRatio &&\n            containsExtent(canvas.getExtent(), extent)) {\n            return canvas;\n        }\n        extent = extent.slice();\n        scaleFromCenter(extent, this.ratio_);\n        var width = getWidth(extent) / resolution;\n        var height = getHeight(extent) / resolution;\n        var size = [width * pixelRatio, height * pixelRatio];\n        var canvasElement = this.canvasFunction_.call(this, extent, resolution, pixelRatio, size, projection);\n        if (canvasElement) {\n            canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);\n        }\n        this.canvas_ = canvas;\n        this.renderedRevision_ = this.getRevision();\n        return canvas;\n    };\n    return ImageCanvasSource;\n}(ImageSource));\nexport default ImageCanvasSource;\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/source/Im
 ageMapGuide\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { containsExtent, getCenter, getHeight, getWidth, scaleFromCenter, } from '../extent.js';\n/**\n * @typedef {Object} Options\n * @prop
 erty {string} [url] The mapagent url.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [displayDpi=96] The display resolution.\n * @property {number} [metersPerUnit=1] The meters-per-unit value.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {
 Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object} [params] Additional parameters.\n */\n/**\n * @classdesc\n * Source for images from Mapguide servers\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageMapGuide = /** @class */ (function (_super) {\n    __extends(ImageMapGuide, _super);\n    /**\n     * @param {Options} options ImageMapGuide options.\n     */\n    function ImageMapGuide(options) {\n        var _this = _super.call(this, {\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _thi
 s.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.displayDpi_ =\n            options.displayDpi !== undefined ? options.displayDpi : 96;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type 
 {number}\n         */\n        _this.metersPerUnit_ =\n            options.metersPerUnit !== undefined ? options.metersPerUnit : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.useOverlay_ =\n            options.useOverlay !== undefined ? options.useOverlay : false;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        return _this;\n    }\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageMapGuide.prototype.getParam
 s = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageMapGuide.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        resolution = this.findNearestResolution(resolution);\n        pixelRatio = this.hidpi_ ? pixelRatio : 1;\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), extent)) {\n            return image;\n        }\n        if (this.ratio_ != 1) {\n            extent = extent.slice();\n           
  scaleFromCenter(extent, this.ratio_);\n        }\n        var width = getWidth(extent) / resolution;\n        var height = getHeight(extent) / resolution;\n        var size = [width * pixelRatio, height * pixelRatio];\n        if (this.url_ !== undefined) {\n            var imageUrl = this.getUrl(this.url_, this.params_, extent, size, projection);\n            image = new ImageWrapper(extent, resolution, pixelRatio, imageUrl, this.crossOrigin_, this.imageLoadFunction_);\n            image.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        }\n        else {\n            image = null;\n        }\n        this.image_ = image;\n        this.renderedRevision_ = this.getRevision();\n        return image;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageMapGuide.prototype.getImageLoadFunction = function () {\n        return this
 .imageLoadFunction_;\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageMapGuide.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.changed();\n    };\n    /**\n     * @param {string} baseUrl The mapagent url.\n     * @param {Object<string, string|number>} params Request parameters.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string} The mapagent map image request URL.\n     */\n    ImageMapGuide.prototype.getUrl = function (baseUrl, params, extent, size, projection) {\n        var scale = getScale(extent, size, this.metersPerUnit_, this.displayDpi_);\n        var center = getCenter(extent);\n        var baseParams = {\n            'OPERATION': this.useOverlay_\n                ? 'GETDYNA
 MICMAPOVERLAYIMAGE'\n                : 'GETMAPIMAGE',\n            'VERSION': '2.0.0',\n            'LOCALE': 'en',\n            'CLIENTAGENT': 'ol/source/ImageMapGuide source',\n            'CLIP': '1',\n            'SETDISPLAYDPI': this.displayDpi_,\n            'SETDISPLAYWIDTH': Math.round(size[0]),\n            'SETDISPLAYHEIGHT': Math.round(size[1]),\n            'SETVIEWSCALE': scale,\n            'SETVIEWCENTERX': center[0],\n            'SETVIEWCENTERY': center[1],\n        };\n        assign(baseParams, params);\n        return appendParams(baseUrl, baseParams);\n    };\n    /**\n     * Set the image load function of the MapGuide source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageMapGuide.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    return ImageMapGuide;\
 n}(ImageSource));\n/**\n * @param {import(\"../extent.js\").Extent} extent The map extents.\n * @param {import(\"../size.js\").Size} size The viewport size.\n * @param {number} metersPerUnit The meters-per-unit value.\n * @param {number} dpi The display resolution.\n * @return {number} The computed map scale.\n */\nfunction getScale(extent, size, metersPerUnit, dpi) {\n    var mcsW = getWidth(extent);\n    var mcsH = getHeight(extent);\n    var devW = size[0];\n    var devH = size[1];\n    var mpp = 0.0254 / dpi;\n    if (devH * mcsW > devW * mcsH) {\n        return (mcsW * metersPerUnit) / (devW * mpp); // width limited\n    }\n    else {\n        return (mcsH * metersPerUnit) / (devH * mpp); // height limited\n    }\n}\nexport default ImageMapGuide;\n//# sourceMappingURL=ImageMapGuide.js.map","/**\n * @module ol/source/ImageStatic\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototype
 Of ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageState from '../ImageState.js';\nimport ImageWrapper from '../Image.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getHeight, getWidth, intersects } from '../extent.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossO
 rigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../extent.js\").Extent} [imageExtent] Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"../size.js\").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this\n * only needs to be set if auto-detection fails for some reason.\n * @property {string} url Image URL.\n */\n/**\n * @classdesc\n * A layer s
 ource for displaying a single, static image.\n * @api\n */\nvar Static = /** @class */ (function (_super) {\n    __extends(Static, _super);\n    /**\n     * @param {Options} options ImageStatic options.\n     */\n    function Static(options) {\n        var _this = this;\n        var crossOrigin = options.crossOrigin !== undefined ? options.crossOrigin : null;\n        var /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction = options.imageLoadFunction !== undefined\n            ? options.imageLoadFunction\n            : defaultImageLoadFunction;\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: getProjection(options.projection),\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\
 n        _this.imageExtent_ = options.imageExtent;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = new ImageWrapper(_this.imageExtent_, undefined, 1, _this.url_, crossOrigin, imageLoadFunction);\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = options.imageSize ? options.imageSize : null;\n        _this.image_.addEventListener(EventType.CHANGE, _this.handleImageChange.bind(_this));\n        return _this;\n    }\n    /**\n     * Returns the image extent\n     * @return {import(\"../extent.js\").Extent} image extent.\n     * @api\n     */\n    Static.prototype.getImageExtent = function () {\n        return this.imageExtent_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projecti
 on.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    Static.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (intersects(extent, this.image_.getExtent())) {\n            return this.image_;\n        }\n        return null;\n    };\n    /**\n     * Return the URL used for this image source.\n     * @return {string} URL.\n     * @api\n     */\n    Static.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     */\n    Static.prototype.handleImageChange = function (evt) {\n        if (this.image_.getState() == ImageState.LOADED) {\n            var imageExtent = this.image_.getExtent();\n            var image = this.image_.getImage();\n            var imageWidth = void 0, imageHeight = void 0;\n            if (this.imageSize_) {\n                imageWidth = this.imageSize_[0];\n    
             imageHeight = this.imageSize_[1];\n            }\n            else {\n                imageWidth = image.width;\n                imageHeight = image.height;\n            }\n            var resolution = getHeight(imageExtent) / imageHeight;\n            var targetWidth = Math.ceil(getWidth(imageExtent) / resolution);\n            if (targetWidth != imageWidth) {\n                var context = createCanvasContext2D(targetWidth, imageHeight);\n                var canvas = context.canvas;\n                context.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, canvas.width, canvas.height);\n                this.image_.setImage(canvas);\n            }\n        }\n        _super.prototype.handleImageChange.call(this, evt);\n    };\n    return Static;\n}(ImageSource));\nexport default Static;\n//# sourceMappingURL=ImageStatic.js.map","/**\n * @module ol/source/WMSServerType\n */\n/**\n * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,\n *     `'q
 gis'`. These are servers that have vendor parameters beyond the WMS\n *     specification that OpenLayers can make use of.\n * @enum {string}\n */\nexport default {\n    /**\n     * HiDPI support for [Carmenta Server](https://www.carmenta.com/en/products/carmenta-server)\n     * @api\n     */\n    CARMENTA_SERVER: 'carmentaserver',\n    /**\n     * HiDPI support for [GeoServer](https://geoserver.org/)\n     * @api\n     */\n    GEOSERVER: 'geoserver',\n    /**\n     * HiDPI support for [MapServer](https://mapserver.org/)\n     * @api\n     */\n    MAPSERVER: 'mapserver',\n    /**\n     * HiDPI support for [QGIS](https://qgis.org/)\n     * @api\n     */\n    QGIS: 'qgis',\n};\n//# sourceMappingURL=WMSServerType.js.map","/**\n * @module ol/source/ImageWMS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__p
 roto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport { DEFAULT_WMS_VERSION } from './common.js';\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport WMSServerType from './WMSServerType.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { calculateSourceResolution } from '../reproj.js';\nimport { compareVersions } from '../string.js';\nimport { containsExtent, getCenter, getForViewAndSize, getHeight, getWidth, } from '../extent.js';\nimport { get as getProjection, trans
 form } from '../proj.js';\n/**\n * @const\n * @type {import(\"../size.js\").Size}\n */\nvar GETFEATUREINFO_IMAGE_SIZE = [101, 101];\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"./WMSServerType.js\").default|string} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {bool
 ean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or\n * higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {string} url WMS service URL.\n */\n/**\n * @classdesc\n * Source for WMS servers providing single, untiled images.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageWMS = /** @class */ (function 
 (_super) {\n    __extends(ImageWMS, _super);\n    /**\n     * @param {Options=} [opt_options] ImageWMS options.\n     */\n    function ImageWMS(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n         
        ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.v13_ = true;\n        _this.updateV13_();\n        /**\n         * @private\n         * @type {import(\"./WMSServerType.js\").default|undefined}\n         */\n        _this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = [0, 0];\n        /**\n       
   * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n     * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n     * constructed.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n     *     in the `LAYERS` parameter will be used. `VERSION` should not be\n     *     specified here.\n     * @return {string|undefined} GetFeatureInfo URL.\n     *
  @api\n     */\n    ImageWMS.prototype.getFeatureInfoUrl = function (coordinate, resolution, projection, params) {\n        if (this.url_ === undefined) {\n            return undefined;\n        }\n        var projectionObj = getProjection(projection);\n        var sourceProjectionObj = this.getProjection();\n        if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n            resolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, resolution);\n            coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n        }\n        var extent = getForViewAndSize(coordinate, resolution, 0, GETFEATUREINFO_IMAGE_SIZE);\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetFeatureInfo',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n            'QUERY_LAYERS': this.params_['LAYERS'],\n        };\n        assign(baseParam
 s, this.params_, params);\n        var x = Math.floor((coordinate[0] - extent[0]) / resolution);\n        var y = Math.floor((extent[3] - coordinate[1]) / resolution);\n        baseParams[this.v13_ ? 'I' : 'X'] = x;\n        baseParams[this.v13_ ? 'J' : 'Y'] = y;\n        return this.getRequestUrl_(extent, GETFEATUREINFO_IMAGE_SIZE, 1, sourceProjectionObj || projectionObj, baseParams);\n    };\n    /**\n     * Return the GetLegendGraphic URL, optionally optimized for the passed\n     * resolution and possibly including any passed specific parameters. Returns\n     * `undefined` if the GetLegendGraphic URL cannot be constructed.\n     *\n     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n     *     will not be calculated and included in URL.\n     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n     *     request is generated for this wms layer, else it will try to use the\n     *     configured wms layer. Default `FORMAT` is `im
 age/png`.\n     *     `VERSION` should not be specified here.\n     * @return {string|undefined} GetLegendGraphic URL.\n     * @api\n     */\n    ImageWMS.prototype.getLegendUrl = function (resolution, params) {\n        if (this.url_ === undefined) {\n            return undefined;\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetLegendGraphic',\n            'FORMAT': 'image/png',\n        };\n        if (params === undefined || params['LAYER'] === undefined) {\n            var layers = this.params_.LAYERS;\n            var isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n            if (!isSingleLayer) {\n                return undefined;\n            }\n            baseParams['LAYER'] = layers;\n        }\n        if (resolution !== undefined) {\n            var mpu = this.getProjection()\n                ? this.getProjection().getMetersPerUnit()\n                : 1;\n    
         var dpi = 25.4 / 0.28;\n            var inchesPerMeter = 39.37;\n            baseParams['SCALE'] = resolution * mpu * inchesPerMeter * dpi;\n        }\n        assign(baseParams, params);\n        return appendParams(/** @type {string} */ (this.url_), baseParams);\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageWMS.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageWMS.prototype.getImageInternal = function (extent, resolution, pi
 xelRatio, projection) {\n        if (this.url_ === undefined) {\n            return null;\n        }\n        resolution = this.findNearestResolution(resolution);\n        if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n            pixelRatio = 1;\n        }\n        var imageResolution = resolution / pixelRatio;\n        var center = getCenter(extent);\n        var viewWidth = Math.ceil(getWidth(extent) / imageResolution);\n        var viewHeight = Math.ceil(getHeight(extent) / imageResolution);\n        var viewExtent = getForViewAndSize(center, imageResolution, 0, [\n            viewWidth,\n            viewHeight,\n        ]);\n        var requestWidth = Math.ceil((this.ratio_ * getWidth(extent)) / imageResolution);\n        var requestHeight = Math.ceil((this.ratio_ * getHeight(extent)) / imageResolution);\n        var requestExtent = getForViewAndSize(center, imageResolution, 0, [\n            requestWidth,\n            requestHeight,\n        ]);\n 
        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), viewExtent)) {\n            return image;\n        }\n        var params = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetMap',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n        };\n        assign(params, this.params_);\n        this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);\n        this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);\n        var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio, projection, params);\n        this.image_ = new ImageWrapper(requestExtent, resolution, pixelRatio, url, this.crossOrigin_, this.imageLoadFunction_);\n        this.rende
 redRevision_ = this.getRevision();\n        this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        return this.image_;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageWMS.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string} Request URL.\n     * @private\n     */\n    ImageWMS.prototype.getRequestUrl_ = function (extent, size, pixelRatio, projection, params) {\n        assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`
 \n        params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n        if (!('STYLES' in this.params_)) {\n            params['STYLES'] = '';\n        }\n        if (pixelRatio != 1) {\n            switch (this.serverType_) {\n                case WMSServerType.GEOSERVER:\n                    var dpi = (90 * pixelRatio + 0.5) | 0;\n                    if ('FORMAT_OPTIONS' in params) {\n                        params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n                    }\n                    else {\n                        params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n                    }\n                    break;\n                case WMSServerType.MAPSERVER:\n                    params['MAP_RESOLUTION'] = 90 * pixelRatio;\n                    break;\n                case WMSServerType.CARMENTA_SERVER:\n                case WMSServerType.QGIS:\n                    params['DPI'] = 90 * pixelRatio;\n                    break;\n                default:\n                    ass
 ert(false, 8); // Unknown `serverType` configured\n                    break;\n            }\n        }\n        params['WIDTH'] = size[0];\n        params['HEIGHT'] = size[1];\n        var axisOrientation = projection.getAxisOrientation();\n        var bbox;\n        if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n            bbox = [extent[1], extent[0], extent[3], extent[2]];\n        }\n        else {\n            bbox = extent;\n        }\n        params['BBOX'] = bbox.join(',');\n        return appendParams(/** @type {string} */ (this.url_), params);\n    };\n    /**\n     * Return the URL used for this WMS source.\n     * @return {string|undefined} URL.\n     * @api\n     */\n    ImageWMS.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * Set the image load function of the source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageWMS.prototype.setImageLoadFun
 ction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string|undefined} url URL.\n     * @api\n     */\n    ImageWMS.prototype.setUrl = function (url) {\n        if (url != this.url_) {\n            this.url_ = url;\n            this.image_ = null;\n            this.changed();\n        }\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageWMS.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.updateV13_();\n        this.image_ = null;\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    ImageWMS.prototype.updateV13_ = function () {\n        var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n        this.v13_ = compareVersions(version, '1.3') >= 0;\n    };\n    retur
 n ImageWMS;\n}(ImageSource));\nexport default ImageWMS;\n//# sourceMappingURL=ImageWMS.js.map","/**\n * @module ol/source/OSM\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport var ATTRIBUTION = '© ' +\n    '<a href=\"https://www.openstreetmap.org/copyright\" ta
 rget=\"_blank\">OpenStreetMap</a> ' +\n    'contributors.';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @propert
 y {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nvar OSM = /** @class */ (function (_super) {\n    __extends(OSM, _super);\n    /**\n     * @param {Options=} [opt_options] Open Street Map options.\n     */\n    function OSM(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var attributions;\n        if (options.attributions !== undefined) {\n            attributions = options.attributions;\n        }\n        else {\n            attributions = [ATTRIBUT
 ION];\n        }\n        var crossOrigin = options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n        var url = options.url !== undefined\n            ? options.url\n            : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n        _this = _super.call(this, {\n            attributions: attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: options.opaque !== undefined ? options.opaque : true,\n            maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileLoadFunction: options.tileLoadFunction,\n            url: url,\n            wrapX: options.wrapX,\n            attributionsCollapsible: false,\n        }) || this;\n        return _this;\n    }\n    return OSM;\n}(XYZ));\nexport default OSM;\n//# sourceMappingURL=OSM.js.map","var 
 __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  T
 he layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its laye
 rs collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {import(\"../source/Image.js\").default} [source] Source for this layer.\n */\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {Layer<import(\"../source/Image.js\").default>}\n * @api\n */\nvar BaseImageLayer = /** @class */ (function (_super) {\n    __extends(BaseImageLayer, _super);\n    /**\n     * @param {Options=} opt_options Layer options.\n     */\n    function BaseImageLayer(opt_options) {\n        var _this = this;\n        var opt
 ions = opt_options ? opt_options : {};\n        _this = _super.call(this, options) || this;\n        return _this;\n    }\n    return BaseImageLayer;\n}(Layer));\nexport default BaseImageLayer;\n//# sourceMappingURL=BaseImage.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Obs
 ervable.js';\nimport SourceState from '../source/State.js';\nimport { abstract } from '../util.js';\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nvar LayerRenderer = /** @class */ (function (_super) {\n    __extends(LayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function LayerRenderer(layer) {\n        var _this = _super.call(this) || this;\n        /** @private */\n        _this.boundHandleImageChange_ = _this.handleImageChange_.bind(_this);\n        /**\n         * @protected\n         * @type {LayerType}\n         */\n        _this.layer_ = layer;\n        return _this;\n    }\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    LayerRenderer.prototype.getFeatures = function (pixel) {\n        return abstract();\n  
   };\n    /**\n     * Determine whether render should be called.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    LayerRenderer.prototype.prepareFrame = function (frameState) {\n        return abstract();\n    };\n    /**\n     * Render the layer.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    LayerRenderer.prototype.renderFrame = function (frameState, target) {\n        return abstract();\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `fal
 se`, the tile will not be considered loaded.\n     */\n    LayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (!tiles[zoom]) {\n            tiles[zoom] = {};\n        }\n        tiles[zoom][tile.tileCoord.toString()] = tile;\n        return undefined;\n    };\n    /**\n     * Create a function that adds loaded tiles to the tile lookup.\n     * @param {import(\"../source/Tile.js\").default} source Tile source.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n     *     called with a zoom level and a tile range to add loaded tiles to the lookup.\n     * @protected\n     */\n    LayerRenderer.prototype.createLoadedTileFinder = function (source, projection, tiles) {\n        return
  (\n        /**\n         * @param {number} zoom Zoom level.\n         * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n         * @return {boolean} The tile range is fully loaded.\n         * @this {LayerRenderer}\n         */\n        function (zoom, tileRange) {\n            var callback = this.loadedTileCallback.bind(this, tiles, zoom);\n            return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n        }.bind(this));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} C
 allback result.\n     * @template T\n     */\n    LayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) { };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    LayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        return abstract();\n    };\n    /**\n     * @return {LayerType} Layer.\n     */\n    LayerRenderer.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Perform action necessary to get the layer re
 ndered after new fonts have loaded\n     * @abstract\n     */\n    LayerRenderer.prototype.handleFontsChanged = function () { };\n    /**\n     * Handle changes in image state.\n     * @param {import(\"../events/Event.js\").default} event Image change event.\n     * @private\n     */\n    LayerRenderer.prototype.handleImageChange_ = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        if (image.getState() === ImageState.LOADED) {\n            this.renderIfReadyAndVisible();\n        }\n    };\n    /**\n     * Load the image if not already loaded, and register the image change\n     * listener if needed.\n     * @param {import(\"../ImageBase.js\").default} image Image.\n     * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n     * @protected\n     */\n    LayerRenderer.prototype.loadImage = function (image) {\n        var imageState = image.getState();\n        if (imageState != ImageState.LOADED 
 && imageState != ImageState.ERROR) {\n            image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n        }\n        if (imageState == ImageState.IDLE) {\n            image.load();\n            imageState = image.getState();\n        }\n        return imageState == ImageState.LOADED;\n    };\n    /**\n     * @protected\n     */\n    LayerRenderer.prototype.renderIfReadyAndVisible = function () {\n        var layer = this.getLayer();\n        if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n            layer.changed();\n        }\n    };\n    return LayerRenderer;\n}(Observable));\nexport default LayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b)
  if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../../extent.js';\nimport { rotateAtOffset } from '../../render/canvas.js';\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nvar CanvasLayerRenderer = /** @class */ (function (_super) {\n    __extends(C
 anvasLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function CanvasLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.container = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedResolution;\n        /**\n         * A temporary transform.  The values in this transform should only be used in a\n         * function that sets the values.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tempTransform = createTransform();\n        /**\n         * The transform for rendered pixels to viewport CSS pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */
 \n        _this.pixelTransform = createTransform();\n        /**\n         * The transform for viewport CSS pixels to rendered pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.inversePixelTransform = createTransform();\n        /**\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context = null;\n        /**\n         * @type {boolean}\n         */\n        _this.containerReused = false;\n        return _this;\n    }\n    /**\n     * Get a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {number} opacity Opacity.\n     */\n    CanvasLayerRenderer.prototype.useContainer = function (target, transform, opacity) {\n        var layerClassName = thi
 s.getLayer().getClassName();\n        var container, context;\n        if (target &&\n            target.style.opacity === '' &&\n            target.className === layerClassName) {\n            var canvas = target.firstElementChild;\n            if (canvas instanceof HTMLCanvasElement) {\n                context = canvas.getContext('2d');\n            }\n        }\n        if (context &&\n            (context.canvas.width === 0 ||\n                context.canvas.style.transform === transform)) {\n            // Container of the previous layer renderer can be used.\n            this.container = target;\n            this.context = context;\n            this.containerReused = true;\n        }\n        else if (this.containerReused) {\n            // Previously reused container cannot be used any more.\n            this.container = null;\n            this.context = null;\n            this.containerReused = false;\n        }\n        if (!this.container) {\n            container = docume
 nt.createElement('div');\n            container.className = layerClassName;\n            var style = container.style;\n            style.position = 'absolute';\n            style.width = '100%';\n            style.height = '100%';\n            context = createCanvasContext2D();\n            var canvas = context.canvas;\n            container.appendChild(canvas);\n            style = canvas.style;\n            style.position = 'absolute';\n            style.left = '0';\n            style.transformOrigin = 'top left';\n            this.container = container;\n            this.context = context;\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.clip = function (context, frameState, extent) {\n        var pixelRatio = frameState.pixe
 lRatio;\n        var halfWidth = (frameState.size[0] * pixelRatio) / 2;\n        var halfHeight = (frameState.size[1] * pixelRatio) / 2;\n        var rotation = frameState.viewState.rotation;\n        var topLeft = getTopLeft(extent);\n        var topRight = getTopRight(extent);\n        var bottomRight = getBottomRight(extent);\n        var bottomLeft = getBottomLeft(extent);\n        applyTransform(frameState.coordinateToPixelTransform, topLeft);\n        applyTransform(frameState.coordinateToPixelTransform, topRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n        context.save();\n        rotateAtOffset(context, -rotation, halfWidth, halfHeight);\n        context.beginPath();\n        context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);\n        context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);\n        context.lineTo(bottomRight[0] * p
 ixelRatio, bottomRight[1] * pixelRatio);\n        context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);\n        context.clip();\n        rotateAtOffset(context, rotation, halfWidth, halfHeight);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.clipUnrotated = function (context, frameState, extent) {\n        var topLeft = getTopLeft(extent);\n        var topRight = getTopRight(extent);\n        var bottomRight = getBottomRight(extent);\n        var bottomLeft = getBottomLeft(extent);\n        applyTransform(frameState.coordinateToPixelTransform, topLeft);\n        applyTransform(frameState.coordinateToPixelTransform, topRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n        applyTra
 nsform(frameState.coordinateToPixelTransform, bottomLeft);\n        var inverted = this.inversePixelTransform;\n        applyTransform(inverted, topLeft);\n        applyTransform(inverted, topRight);\n        applyTransform(inverted, bottomRight);\n        applyTransform(inverted, bottomLeft);\n        context.save();\n        context.beginPath();\n        context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n        context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n        context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n        context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n        context.clip();\n    };\n    /**\n     * @param {import(\"../../render/EventType.js\").default} type Event type.\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasLayerRenderer.prototype.dispatchRen
 derEvent_ = function (type, context, frameState) {\n        var layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            var event_1 = new RenderEvent(type, this.inversePixelTransform, frameState, context);\n            layer.dispatchEvent(event_1);\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.preRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.postRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n    
 };\n    /**\n     * Creates a transform for rendering to an element that will be rotated after rendering.\n     * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {number} width Width of the rendered element (in pixels).\n     * @param {number} height Height of the rendered element (in pixels).\n     * @param {number} offsetX Offset on the x-axis in view coordinates.\n     * @protected\n     * @return {!import(\"../../transform.js\").Transform} Transform.\n     */\n    CanvasLayerRenderer.prototype.getRenderTransform = function (center, resolution, rotation, pixelRatio, width, height, offsetX) {\n        var dx1 = width / 2;\n        var dy1 = height / 2;\n        var sx = pixelRatio / resolution;\n        var sy = -sx;\n        var dx2 = -center[0] + offsetX;\n        var dy2 = -center[1];\n        return composeT
 ransform(this.tempTransform, dx1, dy1, sx, sy, -rotation, dx2, dy2);\n    };\n    /**\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    CanvasLayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        var renderPixel = applyTransform(this.inversePixelTransform, pixel.slice());\n        var context = this.context;\n        var data;\n        try {\n            var x = Math.round(renderPixel[0]);\n            var y = Math.round(renderPixel[1]);\n            var newCanvas = document.createElement('canvas');\n            var newContext = newCanvas
 .getContext('2d');\n            newCanvas.width = 1;\n            newCanvas.height = 1;\n            newContext.clearRect(0, 0, 1, 1);\n            newContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n            data = newContext.getImageData(0, 0, 1, 1).data;\n        }\n        catch (err) {\n            if (err.name === 'SecurityError') {\n                // tainted canvas, we assume there is data at the given pixel (although there might not be)\n                return new Uint8Array();\n            }\n            return data;\n        }\n        if (data[3] === 0) {\n            return null;\n        }\n        return data;\n    };\n    return CanvasLayerRenderer;\n}(LayerRenderer));\nexport default CanvasLayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d
 , b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ViewHint from '../../ViewHint.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../../reproj/common.js';\nimport { assign } from '../../obj.js';\nimport { compose as composeTransform, makeInverse } from '../../transform.js';\nimport { containsExtent, intersects } from '../../extent.js';\nimport { createTransformString } from '../../render/canvas.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getIntersection, isEmpty } from '../../extent.js';\n/**\n * @classdesc\n * Canvas renderer for 
 image layers.\n * @api\n */\nvar CanvasImageLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasImageLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n     */\n    function CanvasImageLayerRenderer(imageLayer) {\n        var _this = _super.call(this, imageLayer) || this;\n        /**\n         * @protected\n         * @type {?import(\"../../ImageBase.js\").default}\n         */\n        _this.image_ = null;\n        return _this;\n    }\n    /**\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    CanvasImageLayerRenderer.prototype.getImage = function () {\n        return !this.image_ ? null : this.image_.getImage();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasImageLayerRendere
 r.prototype.prepareFrame = function (frameState) {\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewResolution = viewState.resolution;\n        var imageSource = this.getLayer().getSource();\n        var hints = frameState.viewHints;\n        var renderedExtent = frameState.extent;\n        if (layerState.extent !== undefined) {\n            renderedExtent = getIntersection(renderedExtent, fromUserExtent(layerState.extent, viewState.projection));\n        }\n        if (!hints[ViewHint.ANIMATING] &&\n            !hints[ViewHint.INTERACTING] &&\n            !isEmpty(renderedExtent)) {\n            if (imageSource) {\n                var projection = viewState.projection;\n                if (!ENABLE_RASTER_REPROJECTION) {\n                    var sourceProjection = imageSource.getProjection();\n                    if (sourceProjection) {\n     
                    projection = sourceProjection;\n                    }\n                }\n                var image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection);\n                if (image && this.loadImage(image)) {\n                    this.image_ = image;\n                }\n            }\n            else {\n                this.image_ = null;\n            }\n        }\n        return !!this.image_;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasImageLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var image = this.image_;\n        var imageExtent = image.getExtent();\n        var imageResolution = image.getResolution();\n        var imagePixelRatio = image.getPixelRatio();\n      
   var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewCenter = viewState.center;\n        var viewResolution = viewState.resolution;\n        var size = frameState.size;\n        var scale = (pixelRatio * imageResolution) / (viewResolution * imagePixelRatio);\n        var width = Math.round(size[0] * pixelRatio);\n        var height = Math.round(size[1] * pixelRatio);\n        var rotation = viewState.rotation;\n        if (rotation) {\n            var size_1 = Math.round(Math.sqrt(width * width + height * height));\n            width = size_1;\n            height = size_1;\n        }\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / pixelRatio, 1 / pixelRatio, rotation, -width / 2, -height / 2);\n        makeInverse(this.inversePixelTransform, this.pixel
 Transform);\n        var canvasTransform = createTransformString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        if (layerState.extent) {\n            var layerExtent = fromUserExtent(layerState.extent, viewState.projection);\n            clipped =\n                !containsExtent(layerExtent, frameState.extent) &&\n                    intersects(layerExtent, frameState.extent);\n            if (clipped) {\n                this.clipUnrotated(context, frameState, layerExtent);\n            }\n        }\n        var img = im
 age.getImage();\n        var transform = composeTransform(this.tempTransform, width / 2, height / 2, scale, scale, 0, (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolution, (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolution);\n        this.renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n        var dx = transform[4];\n        var dy = transform[5];\n        var dw = img.width * transform[0];\n        var dh = img.height * transform[3];\n        assign(context, this.getLayer().getSource().getContextOptions());\n        this.preRender(context, frameState);\n        if (dw >= 0.5 && dh >= 0.5) {\n            var opacity = layerState.opacity;\n            var previousAlpha = void 0;\n            if (opacity !== 1) {\n                previousAlpha = this.context.globalAlpha;\n                this.context.globalAlpha = opacity;\n            }\n            this.context.drawImage(img, 0, 0, +img.width, +img.height, Math.round(dx),
  Math.round(dy), Math.round(dw), Math.round(dh));\n            if (opacity !== 1) {\n                this.context.globalAlpha = previousAlpha;\n            }\n        }\n        this.postRender(context, frameState);\n        if (clipped) {\n            context.restore();\n        }\n        if (canvasTransform !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    return CanvasImageLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasImageLayerRenderer;\n//# sourceMappingURL=ImageLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (
 d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Image\n */\nimport BaseImageLayer from './BaseImage.js';\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar ImageLayer = /** @class */ (function (_super) {\n    __extends(ImageLayer, _super);\n    /**\n     * @param {import(\"./BaseImage.js\").Options=} opt_options Layer options.\n     */\n    function ImageLayer(opt_options) {\n        return _super.call(this, opt_op
 tions) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    ImageLayer.prototype.createRenderer = function () {\n        return new CanvasImageLayerRenderer(this);\n    };\n    return ImageLayer;\n}(BaseImageLayer));\nexport default ImageLayer;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/layer/TileProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    PRELOAD: 'preload',\n    USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n//# sourceMappingURL=TileProperty.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    retu
 rn function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's
  `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {import(\"../source/Tile.js\").default} [source] Source for this layer.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layer
 s. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {Layer<import(\"../source/Tile.js\").default>}\n * @api\n */\nvar BaseTileLayer = /** @class */ (function (_super) {\n    __extends(BaseTileLayer, _super);\n    /**\n     * @param {Options=} opt_options Tile layer options.\n     */\n    function BaseTileLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        va
 r baseOptions = assign({}, options);\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesOnError;\n        _this = _super.call(this, baseOptions) || this;\n        _this.setPreload(options.preload !== undefined ? options.preload : 0);\n        _this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined\n            ? options.useInterimTilesOnError\n            : true);\n        return _this;\n    }\n    /**\n     * Return the level as number to which we will preload tiles up to.\n     * @return {number} The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.getPreload = function () {\n        return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n    };\n    /**\n     * Set the level as number to which we will preload tiles up to.\n     * @param {number} preload The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.setPreload = fu
 nction (preload) {\n        this.set(TileProperty.PRELOAD, preload);\n    };\n    /**\n     * Whether we use interim tiles on error.\n     * @return {boolean} Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.getUseInterimTilesOnError = function () {\n        return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n    };\n    /**\n     * Set whether we use interim tiles on error.\n     * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n        this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    };\n    return BaseTileLayer;\n}(Layer));\nexport default BaseTileLayer;\n//# sourceMappingURL=BaseTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics
  = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport { apply as applyTransform, compose as composeTransform, makeInverse, } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { createEmpty, equals, getIntersection, getTopLeft, } from '../../extent.js';\nimport { createTransformString } from '../../render/canvas.js';\nimport { fromUserExtent } from '../..
 /proj.js';\nimport { getUid } from '../../util.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nvar CanvasTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasTileLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} tileLayer Tile layer.\n     */\n    function CanvasTileLayerRenderer(tileLayer) {\n        var _this = _super.call(this, tileLayer) || this;\n        /**\n         * Rendered extent has changed since the previous `renderFrame()` call\n         * @type {boolean}\n         */\n        _this.extentChanged = true;\n        /**\n         * @private\n         * @type {?import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedPixelRatio;\n        /**\n       
   * @protected\n         * @type {import(\"../../proj/Projection.js\").default}\n         */\n        _this.renderedProjection = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedRevision;\n        /**\n         * @protected\n         * @type {!Array<import(\"../../Tile.js\").default>}\n         */\n        _this.renderedTiles = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.newTiles_ = false;\n        /**\n         * @protected\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.tmpExtent = createEmpty();\n        /**\n         * @private\n         * @type {import(\"../../TileRange.js\").default}\n         */\n        _this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasTile
 LayerRenderer.prototype.isDrawableTile = function (tile) {\n        var tileLayer = this.getLayer();\n        var tileState = tile.getState();\n        var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n        return (tileState == TileState.LOADED ||\n            tileState == TileState.EMPTY ||\n            (tileState == TileState.ERROR && !useInterimTilesOnError));\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var projection = frameState.viewState.projection;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var tile = ti
 leSource.getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() == TileState.ERROR) {\n            if (!tileLayer.getUseInterimTilesOnError()) {\n                // When useInterimTilesOnError is false, we consider the error tile as loaded.\n                tile.setState(TileState.LOADED);\n            }\n            else if (tileLayer.getPreload() > 0) {\n                // Preloaded tiles for lower resolutions might have finished loading.\n                this.newTiles_ = true;\n            }\n        }\n        if (!this.isDrawableTile(tile)) {\n            tile = tile.getInterimTile();\n        }\n        return tile;\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    CanvasT
 ileLayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (this.isDrawableTile(tile)) {\n            return _super.prototype.loadedTileCallback.call(this, tiles, zoom, tile);\n        }\n        return false;\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        return !!this.getLayer().getSource();\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var layerState = frameState.layerStatesArray
 [frameState.layerIndex];\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var viewResolution = viewState.resolution;\n        var viewCenter = viewState.center;\n        var rotation = viewState.rotation;\n        var pixelRatio = frameState.pixelRatio;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var sourceRevision = tileSource.getRevision();\n        var tileGrid = tileSource.getTileGridForProjection(projection);\n        var z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n        var tileResolution = tileGrid.getResolution(z);\n        var extent = frameState.extent;\n        var layerExtent = layerState.extent && fromUserExtent(layerState.extent, projection);\n        if (layerExtent) {\n            extent = getIntersection(extent, fromUserExtent(layerState.extent, projection));\n        }\n        var tilePixelRatio = tileSource.getTilePixelRatio
 (pixelRatio);\n        // desired dimensions of the canvas in pixels\n        var width = Math.round(frameState.size[0] * tilePixelRatio);\n        var height = Math.round(frameState.size[1] * tilePixelRatio);\n        if (rotation) {\n            var size = Math.round(Math.sqrt(width * width + height * height));\n            width = size;\n            height = size;\n        }\n        var dx = (tileResolution * width) / 2 / tilePixelRatio;\n        var dy = (tileResolution * height) / 2 / tilePixelRatio;\n        var canvasExtent = [\n            viewCenter[0] - dx,\n            viewCenter[1] - dy,\n            viewCenter[0] + dx,\n            viewCenter[1] + dy,\n        ];\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /**\n         * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n         */\n        var tilesToDrawByZ = {};\n        tilesToDrawByZ[z] = {};\n        var findLoadedTiles = this.createLoadedTileFinder(t
 ileSource, projection, tilesToDrawByZ);\n        var tmpExtent = this.tmpExtent;\n        var tmpTileRange = this.tmpTileRange_;\n        this.newTiles_ = false;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                var tile = this.getTile(z, x, y, frameState);\n                if (this.isDrawableTile(tile)) {\n                    var uid = getUid(this);\n                    if (tile.getState() == TileState.LOADED) {\n                        tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n                        var inTransition = tile.inTransition(uid);\n                        if (!this.newTiles_ &&\n                            (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n                            this.newTiles_ = true;\n                        }\n                    }\n                    if (tile.getAlpha(uid, frameState.time) === 1) {\n                    
     // don't look for alt tiles if alpha is 1\n                        continue;\n                    }\n                }\n                var childTileRange = tileGrid.getTileCoordChildTileRange(tile.tileCoord, tmpTileRange, tmpExtent);\n                var covered = false;\n                if (childTileRange) {\n                    covered = findLoadedTiles(z + 1, childTileRange);\n                }\n                if (!covered) {\n                    tileGrid.forEachTileCoordParentTileRange(tile.tileCoord, findLoadedTiles, tmpTileRange, tmpExtent);\n                }\n            }\n        }\n        var canvasScale = tileResolution / viewResolution;\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / tilePixelRatio, 1 / tilePixelRatio, rotation, -width / 2, -height / 2);\n        var canvasTransform = createTransformString(this.pixelTransform);\n        this.useContainer(target
 , canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        // set scale transform for calculating tile positions on the canvas\n        composeTransform(this.tempTransform, width / 2, height / 2, canvasScale, canvasScale, 0, -width / 2, -height / 2);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        if (layerExtent) {\n            this.clipUnrotated(context, frameState, layerExtent);\n        }\n        assign(context, tileSource.getContextOptions());\n        this.preRender(context, frameState);\n        this.renderedTiles.length = 0;\n        /** @type {Array<number>} */\n        var zs = Object.keys(tilesToDrawByZ).map(Number);\n       
  zs.sort(numberSafeCompareFunction);\n        var clips, clipZs, currentClip;\n        if (layerState.opacity === 1 &&\n            (!this.containerReused ||\n                tileSource.getOpaque(frameState.viewState.projection))) {\n            zs = zs.reverse();\n        }\n        else {\n            clips = [];\n            clipZs = [];\n        }\n        for (var i = zs.length - 1; i >= 0; --i) {\n            var currentZ = zs[i];\n            var currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n            var currentResolution = tileGrid.getResolution(currentZ);\n            var currentScale = currentResolution / tileResolution;\n            var dx_1 = currentTilePixelSize[0] * currentScale * canvasScale;\n            var dy_1 = currentTilePixelSize[1] * currentScale * canvasScale;\n            var originTileCoord = tileGrid.getTileCoordForCoordAndZ(getTopLeft(canvasExtent), currentZ);\n            var originTileExtent = tileGrid.getTile
 CoordExtent(originTileCoord);\n            var origin_1 = applyTransform(this.tempTransform, [\n                (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n                    tileResolution,\n                (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n                    tileResolution,\n            ]);\n            var tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n            var tilesToDraw = tilesToDrawByZ[currentZ];\n            for (var tileCoordKey in tilesToDraw) {\n                var tile = /** @type {import(\"../../ImageTile.js\").default} */ (tilesToDraw[tileCoordKey]);\n                var tileCoord = tile.tileCoord;\n                // Calculate integer positions and sizes so that tiles align\n                var floatX = origin_1[0] - (originTileCoord[1] - tileCoord[1]) * dx_1;\n                var nextX = Math.round(floatX + dx_1);\n                var floatY = origin_1[1] - (originTileCoord[2] - til
 eCoord[2]) * dy_1;\n                var nextY = Math.round(floatY + dy_1);\n                var x = Math.round(floatX);\n                var y = Math.round(floatY);\n                var w = nextX - x;\n                var h = nextY - y;\n                var transition = z === currentZ;\n                var inTransition = transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n                if (!inTransition) {\n                    if (clips) {\n                        // Clip mask for regions in this tile that already filled by a higher z tile\n                        context.save();\n                        currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n                        for (var i_1 = 0, ii = clips.length; i_1 < ii; ++i_1) {\n                            if (z !== currentZ && currentZ < clipZs[i_1]) {\n                                var clip = clips[i_1];\n                                context.beginPath();\n                                // counter-
 clockwise (outer ring) for current tile\n                                context.moveTo(currentClip[0], currentClip[1]);\n                                context.lineTo(currentClip[2], currentClip[3]);\n                                context.lineTo(currentClip[4], currentClip[5]);\n                                context.lineTo(currentClip[6], currentClip[7]);\n                                // clockwise (inner ring) for higher z tile\n                                context.moveTo(clip[6], clip[7]);\n                                context.lineTo(clip[4], clip[5]);\n                                context.lineTo(clip[2], clip[3]);\n                                context.lineTo(clip[0], clip[1]);\n                                context.clip();\n                            }\n                        }\n                        clips.push(currentClip);\n                        clipZs.push(currentZ);\n                    }\n                    else {\n                        context
 .clearRect(x, y, w, h);\n                    }\n                }\n                this.drawTileImage(tile, frameState, x, y, w, h, tileGutter, transition, layerState.opacity);\n                if (clips && !inTransition) {\n                    context.restore();\n                }\n                this.renderedTiles.push(tile);\n                this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n            }\n        }\n        this.renderedRevision = sourceRevision;\n        this.renderedResolution = tileResolution;\n        this.extentChanged =\n            !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n        this.renderedExtent_ = canvasExtent;\n        this.renderedPixelRatio = pixelRatio;\n        this.renderedProjection = projection;\n        this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload());\n        this.scheduleExpireCache(frameState, tileSource);\n        this.postRende
 r(context, frameState);\n        if (layerState.extent) {\n            context.restore();\n        }\n        if (canvasTransform !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    /**\n     * @param {import(\"../../ImageTile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} x Left of the tile.\n     * @param {number} y Top of the tile.\n     * @param {number} w Width of the tile.\n     * @param {number} h Height of the tile.\n     * @param {number} gutter Tile gutter.\n     * @param {boolean} transition Apply an alpha transition.\n     * @param {number} opacity Opacity.\n     */\n    CanvasTileLayerRenderer.prototype.drawTileImage = function (tile, frameState, x, y, w, h, gutter, transition, opacity) {\n        var image = this.getTileImage(tile);\n        if (!image) {\n            return;\n        }\n      
   var uid = getUid(this);\n        var tileAlpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n        var alpha = opacity * tileAlpha;\n        var alphaChanged = alpha !== this.context.globalAlpha;\n        if (alphaChanged) {\n            this.context.save();\n            this.context.globalAlpha = alpha;\n        }\n        this.context.drawImage(image, gutter, gutter, image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n        if (alphaChanged) {\n            this.context.restore();\n        }\n        if (tileAlpha !== 1) {\n            frameState.animate = true;\n        }\n        else if (transition) {\n            tile.endTransition(uid);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Image\n     */\n    CanvasTileLayerRenderer.prototype.getImage = function () {\n        var context = this.context;\n        return context ? context.canvas : null;\n    };\n    /**\n     * Get the image from a tile.\n     * @param {import(\"../../Im
 ageTile.js\").default} tile Tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage();\n    };\n    /**\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.scheduleExpireCache = function (frameState, tileSource) {\n        if (tileSource.canExpireCache()) {\n            /**\n             * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n             * @param {import(\"../../PluggableMap.js\").default} map Map.\n             * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n             */\n            var postRenderFunction = function (tileSource, map, frameState) {\n                var tileS
 ourceKey = getUid(tileSource);\n                if (tileSourceKey in frameState.usedTiles) {\n                    tileSource.expireCache(frameState.viewState.projection, frameState.usedTiles[tileSourceKey]);\n                }\n            }.bind(null, tileSource);\n            frameState.postRenderFunctions.push(\n            /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction));\n        }\n    };\n    /**\n     * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import('../../Tile.js').default} tile Tile.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.updateUsedTiles = function (usedTiles, tileSource, tile) {\n        // FIXME should we use tilesToDrawByZ instead?\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in usedTiles)) {\n            usedTiles[tileSourceKey] = {};\n    
     }\n        usedTiles[tileSourceKey][tile.getKey()] = true;\n    };\n    /**\n     * Manage tile pyramid.\n     * This function performs a number of functions related to the tiles at the\n     * current zoom and lower zoom levels:\n     * - registers idle tiles in frameState.wantedTiles so that they are not\n     *   discarded by the tile queue\n     * - enqueues missing tiles\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {number} currentZ Current Z.\n     * @param {number} preload Load low resolution tiles up to 'preload' levels.\n     * @param {function(import(\"..
 /../Tile.js\").default)=} opt_tileCallback Tile callback.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.manageTilePyramid = function (frameState, tileSource, tileGrid, pixelRatio, projection, extent, currentZ, preload, opt_tileCallback) {\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in frameState.wantedTiles)) {\n            frameState.wantedTiles[tileSourceKey] = {};\n        }\n        var wantedTiles = frameState.wantedTiles[tileSourceKey];\n        var tileQueue = frameState.tileQueue;\n        var minZoom = tileGrid.getMinZoom();\n        var tileCount = 0;\n        var tile, tileRange, tileResolution, x, y, z;\n        for (z = minZoom; z <= currentZ; ++z) {\n            tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n            tileResolution = tileGrid.getResolution(z);\n            for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n                for (y = tileRange.minY; y <= tileRange.maxY; +
 +y) {\n                    if (currentZ - z <= preload) {\n                        ++tileCount;\n                        tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n                        if (tile.getState() == TileState.IDLE) {\n                            wantedTiles[tile.getKey()] = true;\n                            if (!tileQueue.isKeyQueued(tile.getKey())) {\n                                tileQueue.enqueue([\n                                    tile,\n                                    tileSourceKey,\n                                    tileGrid.getTileCoordCenter(tile.tileCoord),\n                                    tileResolution,\n                                ]);\n                            }\n                        }\n                        if (opt_tileCallback !== undefined) {\n                            opt_tileCallback(tile);\n                        }\n                    }\n                    else {\n                        tileSource.useT
 ile(z, x, y, projection);\n                    }\n                }\n            }\n        }\n        tileSource.updateCacheSize(tileCount, projection);\n    };\n    return CanvasTileLayerRenderer;\n}(CanvasLayerRenderer));\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\nexport default CanvasTileLayerRenderer;\n//# sourceMappingURL=TileLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null
  ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Tile\n */\nimport BaseTileLayer from './BaseTile.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar TileLayer = /** @class */ (function (_super) {\n    __extends(TileLayer, _super);\n    /**\n     * @param {import(\"./BaseTile.js\").Options=} opt_options Tile layer options.\n     */\n    function TileLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n   
   * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    TileLayer.prototype.createRenderer = function () {\n        return new CanvasTileLayerRenderer(this);\n    };\n    return TileLayer;\n}(BaseTileLayer));\nexport default TileLayer;\n//# sourceMappingURL=Tile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Raster\n */\nimport Disposable from '../Disposable
 .js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageLayer from '../layer/Image.js';\nimport ImageSource from './Image.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport TileLayer from '../layer/Tile.js';\nimport TileQueue from '../TileQueue.js';\nimport TileSource from './Tile.js';\nimport { assign } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { create as createTransform } from '../transform.js';\nimport { equals, getCenter, getHeight, getWidth } from '../extent.js';\nvar hasImageData = true;\ntry {\n    new ImageData(10, 10);\n}\ncatch (_) {\n    hasImageData = false;\n}\nvar context = document.createElement('canvas').getContext('2d');\n/**\n * @param {Uint8ClampedArray} data Image data.\n * @param {number} width Number of columns.\n * @param {number} height Number of rows.\n * @return {ImageData} Image data.\n 
 */\nexport function newImageData(data, width, height) {\n    if (hasImageData) {\n        return new ImageData(data, width, height);\n    }\n    else {\n        var imageData = context.createImageData(width, height);\n        imageData.data.set(data);\n        return imageData;\n    }\n}\n/* istanbul ignore next */\n/**\n * Create a function for running operations.  This function is serialized for\n * use in a worker.\n * @param {function(Array, Object):*} operation The operation.\n * @return {function(Object):ArrayBuffer} A function that takes an object with\n * buffers, meta, imageOps, width, and height properties and returns an array\n * buffer.\n */\nfunction createMinion(operation) {\n    var workerHasImageData = true;\n    try {\n        new ImageData(10, 10);\n    }\n    catch (_) {\n        workerHasImageData = false;\n    }\n    function newWorkerImageData(data, width, height) {\n        if (workerHasImageData) {\n            return new ImageData(data, width, height);\n    
     }\n        else {\n            return { data: data, width: width, height: height };\n        }\n    }\n    return function (data) {\n        // bracket notation for minification support\n        var buffers = data['buffers'];\n        var meta = data['meta'];\n        var imageOps = data['imageOps'];\n        var width = data['width'];\n        var height = data['height'];\n        var numBuffers = buffers.length;\n        var numBytes = buffers[0].byteLength;\n        var output, b;\n        if (imageOps) {\n            var images = new Array(numBuffers);\n            for (b = 0; b < numBuffers; ++b) {\n                images[b] = newWorkerImageData(new Uint8ClampedArray(buffers[b]), width, height);\n            }\n            output = operation(images, meta).data;\n        }\n        else {\n            output = new Uint8ClampedArray(numBytes);\n            var arrays = new Array(numBuffers);\n            var pixels = new Array(numBuffers);\n            for (b = 0; b < numBuff
 ers; ++b) {\n                arrays[b] = new Uint8ClampedArray(buffers[b]);\n                pixels[b] = [0, 0, 0, 0];\n            }\n            for (var i = 0; i < numBytes; i += 4) {\n                for (var j = 0; j < numBuffers; ++j) {\n                    var array = arrays[j];\n                    pixels[j][0] = array[i];\n                    pixels[j][1] = array[i + 1];\n                    pixels[j][2] = array[i + 2];\n                    pixels[j][3] = array[i + 3];\n                }\n                var pixel = operation(pixels, meta);\n                output[i] = pixel[0];\n                output[i + 1] = pixel[1];\n                output[i + 2] = pixel[2];\n                output[i + 3] = pixel[3];\n            }\n        }\n        return output.buffer;\n    };\n}\n/**\n * Create a worker for running operations.\n * @param {Object} config Configuration.\n * @param {function(MessageEvent): void} onMessage Called with a message event.\n * @return {Worker} The worker.\
 n */\nfunction createWorker(config, onMessage) {\n    var lib = Object.keys(config.lib || {}).map(function (name) {\n        return 'var ' + name + ' = ' + config.lib[name].toString() + ';';\n    });\n    var lines = lib.concat([\n        'var __minion__ = (' + createMinion.toString() + ')(',\n        config.operation.toString(),\n        ');',\n        'self.addEventListener(\"message\", function(event) {',\n        '  var buffer = __minion__(event.data);',\n        '  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',\n        '});',\n    ]);\n    var blob = new Blob(lines, { type: 'text/javascript' });\n    var source = URL.createObjectURL(blob);\n    var worker = new Worker(source);\n    worker.addEventListener('message', onMessage);\n    return worker;\n}\n/**\n * @typedef {Object} FauxMessageEvent\n * @property {Object} data Message data.\n */\n/**\n * Create a faux worker for running operations.\n * @param {ProcessorOptions} config Configuration.\n * @para
 m {function(FauxMessageEvent): void} onMessage Called with a message event.\n * @return {Object} The faux worker.\n */\nfunction createFauxWorker(config, onMessage) {\n    var minion = createMinion(config.operation);\n    var terminated = false;\n    return {\n        postMessage: function (data) {\n            setTimeout(function () {\n                if (terminated) {\n                    return;\n                }\n                onMessage({ data: { buffer: minion(data), meta: data['meta'] } });\n            }, 0);\n        },\n        terminate: function () {\n            terminated = true;\n        },\n    };\n}\n/**\n * @typedef {Object} ProcessorOptions\n * @property {number} threads Number of workers to spawn.\n * @property {function(Array, Object):*} operation The operation.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} queue The number of queued jobs to allow.\n * @property {boolean} [imageOps=fals
 e] Pass all the image data to the operation instead of a single pixel.\n */\n/**\n * @classdesc\n * A processor runs pixel or image operations in workers.\n */\nvar Processor = /** @class */ (function (_super) {\n    __extends(Processor, _super);\n    /**\n     * @param {ProcessorOptions} config Configuration.\n     */\n    function Processor(config) {\n        var _this = _super.call(this) || this;\n        _this._imageOps = !!config.imageOps;\n        var threads;\n        if (config.threads === 0) {\n            threads = 0;\n        }\n        else if (_this._imageOps) {\n            threads = 1;\n        }\n        else {\n            threads = config.threads || 1;\n        }\n        var workers = [];\n        if (threads) {\n            for (var i = 0; i < threads; ++i) {\n                workers[i] = createWorker(config, _this._onWorkerMessage.bind(_this, i));\n            }\n        }\n        else {\n            workers[0] = createFauxWorker(config, _this._onWorkerMessage.
 bind(_this, 0));\n        }\n        _this._workers = workers;\n        _this._queue = [];\n        _this._maxQueueLength = config.queue || Infinity;\n        _this._running = 0;\n        _this._dataLookup = {};\n        _this._job = null;\n        return _this;\n    }\n    /**\n     * Run operation on input data.\n     * @param {Array.<Array|ImageData>} inputs Array of pixels or image data\n     *     (depending on the operation type).\n     * @param {Object} meta A user data object.  This is passed to all operations\n     *     and must be serializable.\n     * @param {function(Error, ImageData, Object): void} callback Called when work\n     *     completes.  The first argument is any error.  The second is the ImageData\n     *     generated by operations.  The third is the user data object.\n     */\n    Processor.prototype.process = function (inputs, meta, callback) {\n        this._enqueue({\n            inputs: inputs,\n            meta: meta,\n            callback: callback,\
 n        });\n        this._dispatch();\n    };\n    /**\n     * Add a job to the queue.\n     * @param {Object} job The job.\n     */\n    Processor.prototype._enqueue = function (job) {\n        this._queue.push(job);\n        while (this._queue.length > this._maxQueueLength) {\n            this._queue.shift().callback(null, null);\n        }\n    };\n    /**\n     * Dispatch a job.\n     */\n    Processor.prototype._dispatch = function () {\n        if (this._running === 0 && this._queue.length > 0) {\n            var job = this._queue.shift();\n            this._job = job;\n            var width = job.inputs[0].width;\n            var height = job.inputs[0].height;\n            var buffers = job.inputs.map(function (input) {\n                return input.data.buffer;\n            });\n            var threads = this._workers.length;\n            this._running = threads;\n            if (threads === 1) {\n                this._workers[0].postMessage({\n                    buffers:
  buffers,\n                    meta: job.meta,\n                    imageOps: this._imageOps,\n                    width: width,\n                    height: height,\n                }, buffers);\n            }\n            else {\n                var length_1 = job.inputs[0].data.length;\n                var segmentLength = 4 * Math.ceil(length_1 / 4 / threads);\n                for (var i = 0; i < threads; ++i) {\n                    var offset = i * segmentLength;\n                    var slices = [];\n                    for (var j = 0, jj = buffers.length; j < jj; ++j) {\n                        slices.push(buffers[i].slice(offset, offset + segmentLength));\n                    }\n                    this._workers[i].postMessage({\n                        buffers: slices,\n                        meta: job.meta,\n                        imageOps: this._imageOps,\n                        width: width,\n                        height: height,\n                    }, slices);\n   
              }\n            }\n        }\n    };\n    /**\n     * Handle messages from the worker.\n     * @param {number} index The worker index.\n     * @param {MessageEvent} event The message event.\n     */\n    Processor.prototype._onWorkerMessage = function (index, event) {\n        if (this.disposed) {\n            return;\n        }\n        this._dataLookup[index] = event.data;\n        --this._running;\n        if (this._running === 0) {\n            this._resolveJob();\n        }\n    };\n    /**\n     * Resolve a job.  If there are no more worker threads, the processor callback\n     * will be called.\n     */\n    Processor.prototype._resolveJob = function () {\n        var job = this._job;\n        var threads = this._workers.length;\n        var data, meta;\n        if (threads === 1) {\n            data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);\n            meta = this._dataLookup[0]['meta'];\n        }\n        else {\n            var length_2 = job.in
 puts[0].data.length;\n            data = new Uint8ClampedArray(length_2);\n            meta = new Array(length_2);\n            var segmentLength = 4 * Math.ceil(length_2 / 4 / threads);\n            for (var i = 0; i < threads; ++i) {\n                var buffer = this._dataLookup[i]['buffer'];\n                var offset = i * segmentLength;\n                data.set(new Uint8ClampedArray(buffer), offset);\n                meta[i] = this._dataLookup[i]['meta'];\n            }\n        }\n        this._job = null;\n        this._dataLookup = {};\n        job.callback(null, newImageData(data, job.inputs[0].width, job.inputs[0].height), meta);\n        this._dispatch();\n    };\n    /**\n     * Terminate all workers associated with the processor.\n     */\n    Processor.prototype.disposeInternal = function () {\n        for (var i = 0; i < this._workers.length; ++i) {\n            this._workers[i].terminate();\n        }\n        this._workers.length = 0;\n    };\n    return Processo
 r;\n}(Disposable));\nexport { Processor };\n/**\n * A function that takes an array of input data, performs some operation, and\n * returns an array of output data.\n * For `pixel` type operations, the function will be called with an array of\n * pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the\n * range of 0 - 255. It should return a single pixel array.\n * For `'image'` type operations, functions will be called with an array of\n * {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}\n * and should return a single {@link ImageData\n * https://developer.mozilla.org/en-US/docs/Web/API/ImageData}.  The operations\n * are called with a second \"data\" argument, which can be used for storage.  The\n * data object is accessible from raster events, where it can be initialized in\n * \"beforeoperations\" and accessed again in \"afteroperations\".\n *\n * @typedef {function((Array<Array<number>>|Array<ImageData>), Object):\n *     (Array<n
 umber>|ImageData)} Operation\n */\n/**\n * @enum {string}\n */\nvar RasterEventType = {\n    /**\n     * Triggered before operations are run.\n     * @event module:ol/source/Raster.RasterSourceEvent#beforeoperations\n     * @api\n     */\n    BEFOREOPERATIONS: 'beforeoperations',\n    /**\n     * Triggered after operations are run.\n     * @event module:ol/source/Raster.RasterSourceEvent#afteroperations\n     * @api\n     */\n    AFTEROPERATIONS: 'afteroperations',\n};\n/**\n * Raster operation type. Supported values are `'pixel'` and `'image'`.\n * @enum {string}\n */\nvar RasterOperationType = {\n    PIXEL: 'pixel',\n    IMAGE: 'image',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Raster} instances are instances of this\n * type.\n */\nvar RasterSourceEvent = /** @class */ (function (_super) {\n    __extends(RasterSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState The fram
 e state.\n     * @param {Object} data An object made available to operations.\n     */\n    function RasterSourceEvent(type, frameState, data) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The raster extent.\n         * @type {import(\"../extent.js\").Extent}\n         * @api\n         */\n        _this.extent = frameState.extent;\n        /**\n         * The pixel resolution (map units per pixel).\n         * @type {number}\n         * @api\n         */\n        _this.resolution = frameState.viewState.resolution / frameState.pixelRatio;\n        /**\n         * An object made available to all operations.  This can be used by operations\n         * as a storage object (e.g. for calculating statistics).\n         * @type {Object}\n         * @api\n         */\n        _this.data = data;\n        return _this;\n    }\n    return RasterSourceEvent;\n}(Event));\nexport { RasterSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {Array<impor
 t(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources Input\n * sources or layers.  For vector data, use an VectorImage layer.\n * @property {Operation} [operation] Raster operation.\n * The operation will be called with data from input sources\n * and the output will be assigned to the raster source.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} [threads] By default, operations will be run in a single worker thread.\n * To avoid using workers altogether, set `threads: 0`.  For pixel operations, operations can\n * be run in multiple worker threads.  Note that there is additional overhead in\n * transferring data to multiple workers, and that depending on the user's\n * system, it may not be possible to parallelize the work.\n * @property {RasterOperationType} [operationType='pixel'] Operation type.\n * Supported values are `'pixel'` and `'image'`.  By default,\n * `'pixel'` operations are
  assumed, and operations will be called with an\n * array of pixels from input sources.  If set to `'image'`, operations will\n * be called with an array of ImageData objects from input sources.\n */\n/**\n * @classdesc\n * A source that transforms data from any number of input sources using an\n * {@link module:ol/source/Raster~Operation} function to transform input pixel values into\n * output pixel values.\n *\n * @fires module:ol/source/Raster.RasterSourceEvent\n * @api\n */\nvar RasterSource = /** @class */ (function (_super) {\n    __extends(RasterSource, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function RasterSource(options) {\n        var _this = _super.call(this, {\n            projection: null,\n        }) || this;\n        /**\n         * @private\n         * @type {Processor}\n         */\n        _this.processor_ = null;\n        /**\n         * @private\n         * @type {RasterOperationType}\n         */\n        _this.operationType_ =
 \n            options.operationType !== undefined\n                ? options.operationType\n                : RasterOperationType.PIXEL;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.threads_ = options.threads !== undefined ? options.threads : 1;\n        /**\n         * @private\n         * @type {Array<import(\"../layer/Layer.js\").default>}\n         */\n        _this.layers_ = createLayers(options.sources);\n        var changed = _this.changed.bind(_this);\n        for (var i = 0, ii = _this.layers_.length; i < ii; ++i) {\n            _this.layers_[i].addEventListener(EventType.CHANGE, changed);\n        }\n        /**\n         * @private\n         * @type {import(\"../TileQueue.js\").default}\n         */\n        _this.tileQueue_ = new TileQueue(function () {\n            return 1;\n        }, _this.changed.bind(_this));\n        /**\n         * The most recently requested frame state.\n         * @type {import(\"../PluggableMap.js\"
 ).FrameState}\n         * @private\n         */\n        _this.requestedFrameState_;\n        /**\n         * The most recently rendered image canvas.\n         * @type {import(\"../ImageCanvas.js\").default}\n         * @private\n         */\n        _this.renderedImageCanvas_ = null;\n        /**\n         * The most recently rendered revision.\n         * @type {number}\n         */\n        _this.renderedRevision_;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").FrameState}\n         */\n        _this.frameState_ = {\n            animate: false,\n            coordinateToPixelTransform: createTransform(),\n            extent: null,\n            index: 0,\n            layerIndex: 0,\n            layerStatesArray: getLayerStatesArray(_this.layers_),\n            pixelRatio: 1,\n            pixelToCoordinateTransform: createTransform(),\n            postRenderFunctions: [],\n            size: [0, 0],\n            tileQueue: _this.tileQueue_,\n    
         time: Date.now(),\n            usedTiles: {},\n            viewState: /** @type {import(\"../View.js\").State} */ ({\n                rotation: 0,\n            }),\n            viewHints: [],\n            wantedTiles: {},\n            declutterItems: [],\n        };\n        _this.setAttributions(function (frameState) {\n            var attributions = [];\n            for (var index = 0, iMax = options.sources.length; index < iMax; ++index) {\n                var sourceOrLayer = options.sources[index];\n                var source = sourceOrLayer instanceof Source\n                    ? sourceOrLayer\n                    : sourceOrLayer.getSource();\n                var attributionGetter = source.getAttributions();\n                if (typeof attributionGetter === 'function') {\n                    var sourceAttribution = attributionGetter(frameState);\n                    attributions.push.apply(attributions, sourceAttribution);\n                }\n            }\n           
  return attributions.length !== 0 ? attributions : null;\n        });\n        if (options.operation !== undefined) {\n            _this.setOperation(options.operation, options.lib);\n        }\n        return _this;\n    }\n    /**\n     * Set the operation.\n     * @param {Operation} operation New operation.\n     * @param {Object=} opt_lib Functions that will be available to operations run\n     *     in a worker.\n     * @api\n     */\n    RasterSource.prototype.setOperation = function (operation, opt_lib) {\n        if (this.processor_) {\n            this.processor_.dispose();\n        }\n        this.processor_ = new Processor({\n            operation: operation,\n            imageOps: this.operationType_ === RasterOperationType.IMAGE,\n            queue: 1,\n            lib: opt_lib,\n            threads: this.threads_,\n        });\n        this.changed();\n    };\n    /**\n     * Update the stored frame state.\n     * @param {import(\"../extent.js\").Extent} extent The vie
 w extent (in map units).\n     * @param {number} resolution The view resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n     * @return {import(\"../PluggableMap.js\").FrameState} The updated frame state.\n     * @private\n     */\n    RasterSource.prototype.updateFrameState_ = function (extent, resolution, projection) {\n        var frameState = /** @type {import(\"../PluggableMap.js\").FrameState} */ (assign({}, this.frameState_));\n        frameState.viewState = /** @type {import(\"../View.js\").State} */ (assign({}, frameState.viewState));\n        var center = getCenter(extent);\n        frameState.extent = extent.slice();\n        frameState.size[0] = Math.round(getWidth(extent) / resolution);\n        frameState.size[1] = Math.round(getHeight(extent) / resolution);\n        frameState.time = Infinity;\n        var viewState = frameState.viewState;\n        viewState.center = center;\n        viewState.projection = projection
 ;\n        viewState.resolution = resolution;\n        return frameState;\n    };\n    /**\n     * Determine if all sources are ready.\n     * @return {boolean} All sources are ready.\n     * @private\n     */\n    RasterSource.prototype.allSourcesReady_ = function () {\n        var ready = true;\n        var source;\n        for (var i = 0, ii = this.layers_.length; i < ii; ++i) {\n            source = this.layers_[i].getSource();\n            if (source.getState() !== SourceState.READY) {\n                ready = false;\n                break;\n            }\n        }\n        return ready;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageCanvas.js\").default} Single image.\n     */\n    RasterSource.prototype.getImage = function (extent, re
 solution, pixelRatio, projection) {\n        if (!this.allSourcesReady_()) {\n            return null;\n        }\n        var frameState = this.updateFrameState_(extent, resolution, projection);\n        this.requestedFrameState_ = frameState;\n        // check if we can't reuse the existing ol/ImageCanvas\n        if (this.renderedImageCanvas_) {\n            var renderedResolution = this.renderedImageCanvas_.getResolution();\n            var renderedExtent = this.renderedImageCanvas_.getExtent();\n            if (resolution !== renderedResolution ||\n                !equals(extent, renderedExtent)) {\n                this.renderedImageCanvas_ = null;\n            }\n        }\n        if (!this.renderedImageCanvas_ ||\n            this.getRevision() !== this.renderedRevision_) {\n            this.processSources_();\n        }\n        frameState.tileQueue.loadMoreTiles(16, 16);\n        if (frameState.animate) {\n            requestAnimationFrame(this.changed.bind(this));\n      
   }\n        return this.renderedImageCanvas_;\n    };\n    /**\n     * Start processing source data.\n     * @private\n     */\n    RasterSource.prototype.processSources_ = function () {\n        var frameState = this.requestedFrameState_;\n        var len = this.layers_.length;\n        var imageDatas = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            frameState.layerIndex = i;\n            var imageData = getImageData(this.layers_[i], frameState);\n            if (imageData) {\n                imageDatas[i] = imageData;\n            }\n            else {\n                return;\n            }\n        }\n        var data = {};\n        this.dispatchEvent(new RasterSourceEvent(RasterEventType.BEFOREOPERATIONS, frameState, data));\n        this.processor_.process(imageDatas, data, this.onWorkerComplete_.bind(this, frameState));\n    };\n    /**\n     * Called when pixel processing is complete.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameSta
 te The frame state.\n     * @param {Error} err Any error during processing.\n     * @param {ImageData} output The output image data.\n     * @param {Object} data The user data.\n     * @private\n     */\n    RasterSource.prototype.onWorkerComplete_ = function (frameState, err, output, data) {\n        if (err || !output) {\n            return;\n        }\n        // do nothing if extent or resolution changed\n        var extent = frameState.extent;\n        var resolution = frameState.viewState.resolution;\n        if (resolution !== this.requestedFrameState_.viewState.resolution ||\n            !equals(extent, this.requestedFrameState_.extent)) {\n            return;\n        }\n        var context;\n        if (this.renderedImageCanvas_) {\n            context = this.renderedImageCanvas_.getImage().getContext('2d');\n        }\n        else {\n            var width = Math.round(getWidth(extent) / resolution);\n            var height = Math.round(getHeight(extent) / resolution);\n 
            context = createCanvasContext2D(width, height);\n            this.renderedImageCanvas_ = new ImageCanvas(extent, resolution, 1, context.canvas);\n        }\n        context.putImageData(output, 0, 0);\n        this.changed();\n        this.renderedRevision_ = this.getRevision();\n        this.dispatchEvent(new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data));\n    };\n    /**\n     * @return {null} not implemented\n     */\n    RasterSource.prototype.getImageInternal = function () {\n        return null; // not implemented\n    };\n    RasterSource.prototype.disposeInternal = function () {\n        if (this.processor_) {\n            this.processor_.dispose();\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    return RasterSource;\n}(ImageSource));\n/**\n * Clean up and unregister the worker.\n * @function\n * @api\n */\nRasterSource.prototype.dispose;\n/**\n * A reusable canvas context.\n * @type {CanvasRenderingContext2D}\
 n * @private\n */\nvar sharedContext = null;\n/**\n * Get image data from a layer.\n * @param {import(\"../layer/Layer.js\").default} layer Layer to render.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @return {ImageData} The image data.\n */\nfunction getImageData(layer, frameState) {\n    var renderer = layer.getRenderer();\n    if (!renderer) {\n        throw new Error('Unsupported layer type: ' + layer);\n    }\n    if (!renderer.prepareFrame(frameState)) {\n        return null;\n    }\n    var width = frameState.size[0];\n    var height = frameState.size[1];\n    var container = renderer.renderFrame(frameState, null);\n    var element;\n    if (container) {\n        element = container.firstElementChild;\n    }\n    if (!(element instanceof HTMLCanvasElement)) {\n        throw new Error('Unsupported rendered element: ' + element);\n    }\n    if (element.width === width && element.height === height) {\n        var context_1 = element.ge
 tContext('2d');\n        return context_1.getImageData(0, 0, width, height);\n    }\n    if (!sharedContext) {\n        sharedContext = createCanvasContext2D(width, height);\n    }\n    else {\n        var canvas = sharedContext.canvas;\n        if (canvas.width !== width || canvas.height !== height) {\n            sharedContext = createCanvasContext2D(width, height);\n        }\n        else {\n            sharedContext.clearRect(0, 0, width, height);\n        }\n    }\n    sharedContext.drawImage(element, 0, 0, width, height);\n    return sharedContext.getImageData(0, 0, width, height);\n}\n/**\n * Get a list of layer states from a list of layers.\n * @param {Array<import(\"../layer/Layer.js\").default>} layers Layers.\n * @return {Array<import(\"../layer/Layer.js\").State>} The layer states.\n */\nfunction getLayerStatesArray(layers) {\n    return layers.map(function (layer) {\n        return layer.getLayerState();\n    });\n}\n/**\n * Create layers for all sources.\n * @param {A
 rray<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources The sources.\n * @return {Array<import(\"../layer/Layer.js\").default>} Array of layers.\n */\nfunction createLayers(sources) {\n    var len = sources.length;\n    var layers = new Array(len);\n    for (var i = 0; i < len; ++i) {\n        layers[i] = createLayer(sources[i]);\n    }\n    return layers;\n}\n/**\n * Create a layer for the provided source.\n * @param {import(\"./Source.js\").default|import(\"../layer/Layer.js\").default} layerOrSource The layer or source.\n * @return {import(\"../layer/Layer.js\").default} The layer.\n */\nfunction createLayer(layerOrSource) {\n    // @type {import(\"../layer/Layer.js\").default}\n    var layer;\n    if (layerOrSource instanceof Source) {\n        if (layerOrSource instanceof TileSource) {\n            layer = new TileLayer({ source: layerOrSource });\n        }\n        else if (layerOrSource instanceof ImageSource) {\n            layer = new ImageLaye
 r({ source: layerOrSource });\n        }\n    }\n    else {\n        layer = layerOrSource;\n    }\n    return layer;\n}\nexport default RasterSource;\n//# sourceMappingURL=Raster.js.map","/**\n * @module ol/source/Stamen\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\nimport { ATTRIBUTION as OSM_ATTRIBUTION } from './OSM.js';\n/**\n * @const\n * @type {Array<string>}\n */\nvar ATTRIBUTIONS = [\n    'Map til
 es by <a href=\"https://stamen.com/\" target=\"_blank\">Stamen Design</a>, ' +\n        'under <a href=\"https://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">CC BY' +\n        ' 3.0</a>.',\n    OSM_ATTRIBUTION,\n];\n/**\n * @type {Object<string, {extension: string, opaque: boolean}>}\n */\nvar LayerConfig = {\n    'terrain': {\n        extension: 'jpg',\n        opaque: true,\n    },\n    'terrain-background': {\n        extension: 'jpg',\n        opaque: true,\n    },\n    'terrain-labels': {\n        extension: 'png',\n        opaque: false,\n    },\n    'terrain-lines': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-background': {\n        extension: 'png',\n        opaque: true,\n    },\n    'toner': {\n        extension: 'png',\n        opaque: true,\n    },\n    'toner-hybrid': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-labels': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-lines': {
 \n        extension: 'png',\n        opaque: false,\n    },\n    'toner-lite': {\n        extension: 'png',\n        opaque: true,\n    },\n    'watercolor': {\n        extension: 'jpg',\n        opaque: true,\n    },\n};\n/**\n * @type {Object<string, {minZoom: number, maxZoom: number}>}\n */\nvar ProviderConfig = {\n    'terrain': {\n        minZoom: 0,\n        maxZoom: 18,\n    },\n    'toner': {\n        minZoom: 0,\n        maxZoom: 20,\n    },\n    'watercolor': {\n        minZoom: 0,\n        maxZoom: 18,\n    },\n};\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {string} layer Layer name.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pi
 xels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source for the Stamen tile server.\n * @api\n */\nvar Stamen = /** @class */ (function (_super) {\n    __extends(Stamen, _super);\n    /**\n     * @param {Options} options Stamen options.\n     */\n    function Stamen(options) {\n        var _this = this;\n        var i = options.layer.indexOf('-');\n        var pr
 ovider = i == -1 ? options.layer : options.layer.slice(0, i);\n        var providerConfig = ProviderConfig[provider];\n        var layerConfig = LayerConfig[options.layer];\n        var url = options.url !== undefined\n            ? options.url\n            : 'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' +\n                options.layer +\n                '/{z}/{x}/{y}.' +\n                layerConfig.extension;\n        _this = _super.call(this, {\n            attributions: ATTRIBUTIONS,\n            cacheSize: options.cacheSize,\n            crossOrigin: 'anonymous',\n            imageSmoothing: options.imageSmoothing,\n            maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,\n            minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,\n            opaque: layerConfig.opaque,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileLoadFunction: options.tileLoadFunction,\n 
            transition: options.transition,\n            url: url,\n            wrapX: options.wrapX,\n        }) || this;\n        return _this;\n    }\n    return Stamen;\n}(XYZ));\nexport default Stamen;\n//# sourceMappingURL=Stamen.js.map","/**\n * @module ol/source/TileArcGISRest\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from 
 '../obj.js';\nimport { createEmpty } from '../extent.js';\nimport { modulo } from '../math.js';\nimport { scale as scaleSize, toSize } from '../size.js';\nimport { hash as tileCoordHash } from '../tilecoord.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be\n * used for any fields not specified. `FORMAT` is `PNG
 32` by default. `F` is `IMAGE` by\n * default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`,\n * and `IMAGESR` will be set dynamically. Set `LAYERS` to\n * override the default service layer visibility. See\n * http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/\n * for further reference.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThresh
 old=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.\n * The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The\n * url should include /MapServer or /ImageServer.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.  To disable the opacity\n * transition, pass `transition: 0`.\n * @property {Array<string>} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS\n * Service supports multiple urls for export requests.\n */\n/**\n * @classdesc\n * Layer source for tile data from ArcGIS Rest services. Map and Image\n 
 * Services are supported.\n *\n * For cached ArcGIS services, better performance is available using the\n * {@link module:ol/source/XYZ~XYZ} data source.\n * @api\n */\nvar TileArcGISRest = /** @class */ (function (_super) {\n    __extends(TileArcGISRest, _super);\n    /**\n     * @param {Options=} opt_options Tile ArcGIS Rest options.\n     */\n    function TileArcGISRest(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            url: options.url,\n            urls: options.urls,\n          
   wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.tmpExtent_ = createEmpty();\n        _this.setKey(_this.getKeyForParams_());\n        return _this;\n    }\n    /**\n     * @private\n     * @return {string} The key for the current params.\n     */\n    TileArcGISRest.prototype.getKeyForParams_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.params_) {\n            res[i++] = key + '-' + this.params_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Get the user-pr
 ovided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    TileArcGISRest.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string|undefined} Request URL.\n     * @private\n     */\n    TileArcGISRest.prototype.getRequestUrl_ = function (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n        var urls = this.urls;\n        if (!urls) {\n            return undefined;\n        }\n        // Ar
 cGIS Server only wants the numeric portion of the projection ID.\n        var srid = projection.getCode().split(':').pop();\n        params['SIZE'] = tileSize[0] + ',' + tileSize[1];\n        params['BBOX'] = tileExtent.join(',');\n        params['BBOXSR'] = srid;\n        params['IMAGESR'] = srid;\n        params['DPI'] = Math.round(params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio);\n        var url;\n        if (urls.length == 1) {\n            url = urls[0];\n        }\n        else {\n            var index = modulo(tileCoordHash(tileCoord), urls.length);\n            url = urls[index];\n        }\n        var modifiedUrl = url\n            .replace(/MapServer\\/?$/, 'MapServer/export')\n            .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n        return appendParams(modifiedUrl, params);\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     *
 /\n    TileArcGISRest.prototype.getTilePixelRatio = function (pixelRatio) {\n        return this.hidpi_ ? pixelRatio : 1;\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    TileArcGISRest.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.setKey(this.getKeyForParams_());\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n     * @param {number} pixelRatio The pixel ratio\n     * @param {import(\"../proj/Projection.js\").default} projection The projection\n     * @return {string|undefined} The tile URL\n     * @override\n     */\n    TileArcGISRest.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projection);\n        }\n        if (tileGrid.getResolutions().length <= 
 tileCoord[0]) {\n            return undefined;\n        }\n        if (pixelRatio != 1 && !this.hidpi_) {\n            pixelRatio = 1;\n        }\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        if (pixelRatio != 1) {\n            tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n        }\n        // Apply default params and override with user specified values.\n        var baseParams = {\n            'F': 'image',\n            'FORMAT': 'PNG32',\n            'TRANSPARENT': true,\n        };\n        assign(baseParams, this.params_);\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, pixelRatio, projection, baseParams);\n    };\n    return TileArcGISRest;\n}(TileImage));\nexport default TileArcGISRest;\n//# sourceMappingURL=TileArcGISRest.js.map","/**\n * @module ol/source/TileDebug\n */\nvar __extends = (this && this.__extends) || 
 (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport XYZ from './XYZ.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { toSize } from '../size.js';\nvar LabeledTile = /** @class */ (function (_super) {\n    __extends(LabeledTile, _super);\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import
 (\"../size.js\").Size} tileSize Tile size.\n     * @param {string} text Text.\n     */\n    function LabeledTile(tileCoord, tileSize, text) {\n        var _this = _super.call(this, tileCoord, TileState.LOADED) || this;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tileSize_ = tileSize;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = text;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLCanvasElement} Image.\n     */\n    LabeledTile.prototype.getImage = function () {\n        if (this.canvas_) {\n            return this.canvas_;\n        }\n        else {\n            var tileSize = this.tileSize_;\n            var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n            context.strokeSt
 yle = 'grey';\n            context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);\n            context.fillStyle = 'grey';\n            context.strokeStyle = 'white';\n            context.textAlign = 'center';\n            context.textBaseline = 'middle';\n            context.font = '24px sans-serif';\n            context.lineWidth = 4;\n            context.strokeText(this.text_, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n            context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n            this.canvas_ = context.canvas;\n            return context.canvas;\n        }\n    };\n    LabeledTile.prototype.load = function () { };\n    return LabeledTile;\n}(Tile));\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Optional projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [wrapX=true] Whether to wrap the wor
 ld horizontally.\n * @property {number} [zDirection=0] Set to `1` when debugging `VectorTile` sources with\n * a default configuration. Indicates which resolution should be used by a renderer if\n * the view resolution does not match any resolution of the tile source. If 0, the nearest\n * resolution will be used. If 1, the nearest lower resolution will be used. If -1, the\n * nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * A pseudo tile source, which does not fetch tiles from a server, but renders\n * a grid outline for the tile grid/projection along with the coordinates for\n * each tile. See examples/canvas-tiles for an example.\n *\n * Uses Canvas context2d, so requires Canvas support.\n * @api\n */\nvar TileDebug = /** @class */ (function (_super) {\n    __extends(TileDebug, _super);\n    /**\n     * @param {Options=} opt_options Debug tile options.\n     */\n    function TileDebug(opt_options) {\n        var _this = this;\n        /**\n         * @type {Op
 tions}\n         */\n        var options = opt_options || {};\n        _this = _super.call(this, {\n            opaque: false,\n            projection: options.projection,\n            tileGrid: options.tileGrid,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            zDirection: options.zDirection,\n        }) || this;\n        return _this;\n    }\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @return {!LabeledTile} Tile.\n     */\n    TileDebug.prototype.getTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            return /** @type {!LabeledTile} */ (this.tileCache.get(tileCoordKey));\n        }\n        else {\n            var tileSize = toSize(this.tileGrid.getTileSize(z));\n            var tileCoord = [z, x, y];\n            var textTileCoord = this.getTileCoo
 rdForTileUrlFunction(tileCoord);\n            var text = void 0;\n            if (textTileCoord) {\n                text =\n                    'z:' +\n                        textTileCoord[0] +\n                        ' x:' +\n                        textTileCoord[1] +\n                        ' y:' +\n                        textTileCoord[2];\n            }\n            else {\n                text = 'none';\n            }\n            var tile = new LabeledTile(tileCoord, tileSize, text);\n            this.tileCache.set(tileCoordKey, tile);\n            return tile;\n        }\n    };\n    return TileDebug;\n}(XYZ));\nexport default TileDebug;\n//# sourceMappingURL=TileDebug.js.map","/**\n * @module ol/source/TileJSON\n */\n// FIXME check order of async callbacks\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b
 ) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * See https://mapbox.com/developers/api/.\n */\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { assert } from '../asserts.js';\nimport { createFromTemplates } from '../tileurlfunction.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @typedef {Object} Config\n * @property {string} [name] The name.\n * @property {string} [description] The descr
 iption.\n * @property {string} [version] The version.\n * @property {string} [attribution] The attribution.\n * @property {string} [template] The template.\n * @property {string} [legend] The legend.\n * @property {string} [scheme] The scheme.\n * @property {Array<string>} tiles The tile URL templates.\n * @property {Array<string>} [grids] Optional grids.\n * @property {number} [minzoom] Minimum zoom level.\n * @property {number} [maxzoom] Maximum zoom level.\n * @property {Array<number>} [bounds] Optional bounds.\n * @property {Array<number>} [center] Optional center.\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pi
 xel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Note: `tileSiz
 e` and other non-standard TileJSON properties are currently ignored.\n * @property {string} [url] URL to the TileJSON file. If not provided, `tileJSON` must be configured.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @classdesc\n * Layer source for tile data in TileJSON format.\n * @api\n */\nvar TileJSON = /** @class */ (function (_super) {\n    __extends(TileJSON, _super);\n    /**\n     * @param {Options} options TileJSON options.\n     */\n    function TileJSON(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: getProjection('EPSG:3857'),\n            reprojectionErrorThresho
 ld: options.reprojectionErrorThreshold,\n            state: SourceState.LOADING,\n            tileLoadFunction: options.tileLoadFunction,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {Config}\n         * @private\n         */\n        _this.tileJSON_ = null;\n        /**\n         * @type {number|import(\"../size.js\").Size}\n         * @private\n         */\n        _this.tileSize_ = options.tileSize;\n        if (options.url) {\n            if (options.jsonp) {\n                requestJSONP(options.url, _this.handleTileJSONResponse.bind(_this), _this.handleTileJSONError.bind(_this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', _this.onXHRLoad_.bind(_this));\n                client.addEventListener('error', _this.onXHRError_.bind(_this));\n                client.open('G
 ET', options.url);\n                client.send();\n            }\n        }\n        else if (options.tileJSON) {\n            _this.handleTileJSONResponse(options.tileJSON);\n        }\n        else {\n            assert(false, 51); // Either `url` or `tileJSON` options must be provided\n        }\n        return _this;\n    }\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    TileJSON.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {TileJSON} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleTileJSONError();\n                return;\n            }\n            this.handleTileJSONResponse(response);\n        }\n   
      else {\n            this.handleTileJSONError();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    TileJSON.prototype.onXHRError_ = function (event) {\n        this.handleTileJSONError();\n    };\n    /**\n     * @return {Config} The tilejson object.\n     * @api\n     */\n    TileJSON.prototype.getTileJSON = function () {\n        return this.tileJSON_;\n    };\n    /**\n     * @protected\n     * @param {Config} tileJSON Tile JSON.\n     */\n    TileJSON.prototype.handleTileJSONResponse = function (tileJSON) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var sourceProjection = this.getProjection();\n        var extent;\n        if (tileJSON['bounds'] !== undefined) {\n            var transform = getTransformFromProjections(epsg4326Projection, sourceProjection);\n            extent = applyTransform(tileJSON['bounds'], transform);\n        }\n        var minZoom = tileJSON['minzoom'] || 0;\n        v
 ar maxZoom = tileJSON['maxzoom'] || 22;\n        var tileGrid = createXYZ({\n            extent: extentFromProjection(sourceProjection),\n            maxZoom: maxZoom,\n            minZoom: minZoom,\n            tileSize: this.tileSize_,\n        });\n        this.tileGrid = tileGrid;\n        this.tileUrlFunction = createFromTemplates(tileJSON['tiles'], tileGrid);\n        if (tileJSON['attribution'] !== undefined && !this.getAttributions()) {\n            var attributionExtent_1 = extent !== undefined ? extent : epsg4326Projection.getExtent();\n            this.setAttributions(function (frameState) {\n                if (intersects(attributionExtent_1, frameState.extent)) {\n                    return [tileJSON['attribution']];\n                }\n                return null;\n            });\n        }\n        this.tileJSON_ = tileJSON;\n        this.setState(SourceState.READY);\n    };\n    /**\n     * @protected\n     */\n    TileJSON.prototype.handleTileJSONError = function (
 ) {\n        this.setState(SourceState.ERROR);\n    };\n    return TileJSON;\n}(TileImage));\nexport default TileJSON;\n//# sourceMappingURL=TileJSON.js.map","/**\n * @module ol/source/TileWMS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport { DEFAULT_WMS_VERSION } from './common.js';\nimport TileImage from './TileImage.js';\nimport WMSServerType from './WMSServerType.js';\nimport { appendParams } from '../uri.js';\nimport { asser
 t } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { buffer, createEmpty } from '../extent.js';\nimport { buffer as bufferSize, scale as scaleSize, toSize } from '../size.js';\nimport { calculateSourceResolution } from '../reproj.js';\nimport { compareVersions } from '../string.js';\nimport { get as getProjection, transform, transformExtent } from '../proj.js';\nimport { modulo } from '../math.js';\nimport { hash as tileCoordHash } from '../tilecoord.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_ena
 bled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {number} [gutter=0]\n * The size in pixels of the gutter around image tiles to ignore. By setting\n * this property to a non-zero value, images will be requested that are wider\n * and taller than the tile size by a value of `2 x gutter`.\n * Using a non-zero value allows artifacts of rendering at tile edges to be\n * ignored. If you control the WMS service it is recommended to address\n * \"artifacts at tile edges\" issues by properly configuring the WMS service. For\n * example, MapServer has a `tile_map_edge_buffer` configuration parameter for\n * this. See http://mapserver.org/output/tile_mode.html.\n * 
 @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used..\n * @property {import(\"./WMSServerType.js\").defau
 lt|string} [serverType]\n * The type of the remote WMS server. Currently only used when `hidpi` is\n * `true`.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] WMS service URL.\n * @property {Array<string>} [urls] WMS service urls.\n * Use this instead of `url` when the WMS supports multiple urls for GetMap requests.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When `true`, tiles will be requested for one world only,\n * but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @classdesc\n * Layer source for tile data from
  WMS servers.\n * @api\n */\nvar TileWMS = /** @class */ (function (_super) {\n    __extends(TileWMS, _super);\n    /**\n     * @param {Options=} [opt_options] Tile WMS options.\n     */\n    function TileWMS(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : /** @type {Options} */ ({});\n        var params = options.params || {};\n        var transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: !transparent,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: options.tileClass,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n           
  url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = params;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.v13_ = true;\n        /**\n         * @private\n         * @type {import(\"./WMSServerType.js\").default|undefined}\n         */\n        _this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"..
 /extent.js\").Extent}\n         */\n        _this.tmpExtent_ = createEmpty();\n        _this.updateV13_();\n        _this.setKey(_this.getKeyForParams_());\n        return _this;\n    }\n    /**\n     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n     * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n     * constructed.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n     *     in the `LAYERS` parameter will be used. `VERSION` should not be\n     *     specified here.\n     * @return {string|undefined} GetFeatureInfo URL.\n     * @api\n     */\n    TileWMS.prototype.getFeatureInfoUrl = function (coordinate, reso
 lution, projection, params) {\n        var projectionObj = getProjection(projection);\n        var sourceProjectionObj = this.getProjection();\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projectionObj);\n        }\n        var z = tileGrid.getZForResolution(resolution, this.zDirection);\n        var tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        var tileResolution = tileGrid.getResolution(tileCoord[0]);\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        var gutter = this.gutter_;\n        if (gutter !== 0) {\n            tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n            tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent)
 ;\n        }\n        if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n            tileResolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, tileResolution);\n            tileExtent = transformExtent(tileExtent, projectionObj, sourceProjectionObj);\n            coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetFeatureInfo',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n            'QUERY_LAYERS': this.params_['LAYERS'],\n        };\n        assign(baseParams, this.params_, params);\n        var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);\n        var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);\n        baseParams[this.v13_ ? 'I' : 'X'] = x;\n        baseParams[this.v13_ ? 'J' : 'Y'] = y;\n        retu
 rn this.getRequestUrl_(tileCoord, tileSize, tileExtent, 1, sourceProjectionObj || projectionObj, baseParams);\n    };\n    /**\n     * Return the GetLegendGraphic URL, optionally optimized for the passed\n     * resolution and possibly including any passed specific parameters. Returns\n     * `undefined` if the GetLegendGraphic URL cannot be constructed.\n     *\n     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n     *     will not be calculated and included in URL.\n     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n     *     request is generated for this wms layer, else it will try to use the\n     *     configured wms layer. Default `FORMAT` is `image/png`.\n     *     `VERSION` should not be specified here.\n     * @return {string|undefined} GetLegendGraphic URL.\n     * @api\n     */\n    TileWMS.prototype.getLegendUrl = function (resolution, params) {\n        if (this.urls[0] === undefined) {\n            return undef
 ined;\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetLegendGraphic',\n            'FORMAT': 'image/png',\n        };\n        if (params === undefined || params['LAYER'] === undefined) {\n            var layers = this.params_.LAYERS;\n            var isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n            if (!isSingleLayer) {\n                return undefined;\n            }\n            baseParams['LAYER'] = layers;\n        }\n        if (resolution !== undefined) {\n            var mpu = this.getProjection()\n                ? this.getProjection().getMetersPerUnit()\n                : 1;\n            var dpi = 25.4 / 0.28;\n            var inchesPerMeter = 39.37;\n            baseParams['SCALE'] = resolution * mpu * inchesPerMeter * dpi;\n        }\n        assign(baseParams, params);\n        return appendParams(/** @type {string} */ (this.urls[0]), baseParams);\n
     };\n    /**\n     * @return {number} Gutter.\n     */\n    TileWMS.prototype.getGutter = function () {\n        return this.gutter_;\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    TileWMS.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string|undefined} Request URL.\n     * @private\n     */\n    TileWMS.prototype.getRequestUrl_ = function (tileCoord, ti
 leSize, tileExtent, pixelRatio, projection, params) {\n        var urls = this.urls;\n        if (!urls) {\n            return undefined;\n        }\n        params['WIDTH'] = tileSize[0];\n        params['HEIGHT'] = tileSize[1];\n        params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n        if (!('STYLES' in this.params_)) {\n            params['STYLES'] = '';\n        }\n        if (pixelRatio != 1) {\n            switch (this.serverType_) {\n                case WMSServerType.GEOSERVER:\n                    var dpi = (90 * pixelRatio + 0.5) | 0;\n                    if ('FORMAT_OPTIONS' in params) {\n                        params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n                    }\n                    else {\n                        params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n                    }\n                    break;\n                case WMSServerType.MAPSERVER:\n                    params['MAP_RESOLUTION'] = 90 * pixelRatio;\n                    break
 ;\n                case WMSServerType.CARMENTA_SERVER:\n                case WMSServerType.QGIS:\n                    params['DPI'] = 90 * pixelRatio;\n                    break;\n                default:\n                    assert(false, 52); // Unknown `serverType` configured\n                    break;\n            }\n        }\n        var axisOrientation = projection.getAxisOrientation();\n        var bbox = tileExtent;\n        if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n            var tmp = void 0;\n            tmp = tileExtent[0];\n            bbox[0] = tileExtent[1];\n            bbox[1] = tmp;\n            tmp = tileExtent[2];\n            bbox[2] = tileExtent[3];\n            bbox[3] = tmp;\n        }\n        params['BBOX'] = bbox.join(',');\n        var url;\n        if (urls.length == 1) {\n            url = urls[0];\n        }\n        else {\n            var index = modulo(tileCoordHash(tileCoord), urls.length);\n            url = urls[index];\n      
   }\n        return appendParams(url, params);\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileWMS.prototype.getTilePixelRatio = function (pixelRatio) {\n        return !this.hidpi_ || this.serverType_ === undefined ? 1 : pixelRatio;\n    };\n    /**\n     * @private\n     * @return {string} The key for the current params.\n     */\n    TileWMS.prototype.getKeyForParams_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.params_) {\n            res[i++] = key + '-' + this.params_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    TileWMS.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.updateV13_();\n        this.setKey(this.getKeyForParams_());\n    };
 \n    /**\n     * @private\n     */\n    TileWMS.prototype.updateV13_ = function () {\n        var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n        this.v13_ = compareVersions(version, '1.3') >= 0;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n     * @param {number} pixelRatio The pixel ratio\n     * @param {import(\"../proj/Projection.js\").default} projection The projection\n     * @return {string|undefined} The tile URL\n     * @override\n     */\n    TileWMS.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projection);\n        }\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n            pixelRatio = 1;\n        }\n
         var tileResolution = tileGrid.getResolution(tileCoord[0]);\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        var gutter = this.gutter_;\n        if (gutter !== 0) {\n            tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n            tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n        }\n        if (pixelRatio != 1) {\n            tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetMap',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n        };\n        assign(baseParams, this.params_);\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, pixelRatio, projection, baseParams);\n    };\n    return TileWMS;\n}(TileImage));\nexport de
 fault TileWMS;\n//# sourceMappingURL=TileWMS.js.map","/**\n * @module ol/source/UTFGrid\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport SourceState from './State.js';\nimport Tile from '../Tile.js';\nimport TileSource from './Tile.js';\nimport TileState from '../TileState.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { assert } from '../asserts.js';\nimpo
 rt { createFromTemplates, nullTileUrlFunction } from '../tileurlfunction.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { listenOnce } from '../events.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @typedef {Object} UTFGridJSON\n * @property {Array<string>} grid The grid.\n * @property {Array<string>} keys The keys.\n * @property {Object<string, Object>} [data] Optional data.\n */\nvar CustomTile = /** @class */ (function (_super) {\n    __extends(CustomTile, _super);\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {import(\"../extent.js\").Extent} extent Extent of the tile.\n     * @param {boolean} preemptive Load the tile when visible (be
 fore it's needed).\n     * @param {boolean} jsonp Load the tile as a script.\n     */\n    function CustomTile(tileCoord, state, src, extent, preemptive, jsonp) {\n        var _this = _super.call(this, tileCoord, state) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.extent_ = extent;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.preemptive_ = preemptive;\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.grid_ = null;\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.keys_ = null;\n        /**\n         * @private\n         * @type {Object<string, Object>|undefined}\n         */\n        _this.data_ = null;\n        /**\n         * @private\n         * @type {boolean}\n       
   */\n        _this.jsonp_ = jsonp;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLImageElement} Image.\n     */\n    CustomTile.prototype.getImage = function () {\n        return null;\n    };\n    /**\n     * Synchronously returns data at given coordinate (if available).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {*} The data.\n     */\n    CustomTile.prototype.getData = function (coordinate) {\n        if (!this.grid_ || !this.keys_) {\n            return null;\n        }\n        var xRelative = (coordinate[0] - this.extent_[0]) / (this.extent_[2] - this.extent_[0]);\n        var yRelative = (coordinate[1] - this.extent_[1]) / (this.extent_[3] - this.extent_[1]);\n        var row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];\n        if (typeof row !== 'string') {\n            return null;\n        }\n        var code = row.charCodeAt(Math.floor(xRelati
 ve * row.length));\n        if (code >= 93) {\n            code--;\n        }\n        if (code >= 35) {\n            code--;\n        }\n        code -= 32;\n        var data = null;\n        if (code in this.keys_) {\n            var id = this.keys_[code];\n            if (this.data_ && id in this.data_) {\n                data = this.data_[id];\n            }\n            else {\n                data = id;\n            }\n        }\n        return data;\n    };\n    /**\n     * Calls the callback (synchronously by default) with the available data\n     * for given coordinate (or `null` if not yet loaded).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(*): void} callback Callback.\n     * @param {boolean=} opt_request If `true` the callback is always async.\n     *                               The tile data is requested if not yet loaded.\n     */\n    CustomTile.prototype.forDataAtCoordinate = function (coordinate, callba
 ck, opt_request) {\n        if (this.state == TileState.EMPTY && opt_request === true) {\n            this.state = TileState.IDLE;\n            listenOnce(this, EventType.CHANGE, function (e) {\n                callback(this.getData(coordinate));\n            }, this);\n            this.loadInternal_();\n        }\n        else {\n            if (opt_request === true) {\n                setTimeout(function () {\n                    callback(this.getData(coordinate));\n                }.bind(this), 0);\n            }\n            else {\n                callback(this.getData(coordinate));\n            }\n        }\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     */\n    CustomTile.prototype.getKey = function () {\n        return this.src_;\n    };\n    /**\n     * @private\n     */\n    CustomTile.prototype.handleError_ = function () {\n        this.state = TileState.ERROR;\n        this.changed();\n
     };\n    /**\n     * @param {!UTFGridJSON} json UTFGrid data.\n     * @private\n     */\n    CustomTile.prototype.handleLoad_ = function (json) {\n        this.grid_ = json['grid'];\n        this.keys_ = json['keys'];\n        this.data_ = json['data'];\n        this.state = TileState.LOADED;\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    CustomTile.prototype.loadInternal_ = function () {\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            if (this.jsonp_) {\n                requestJSONP(this.src_, this.handleLoad_.bind(this), this.handleError_.bind(this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', this.onXHRLoad_.bind(this));\n                client.addEventListener('error', this.onXHRError_.bind(this));\n                client.open('GET', this.src_);\n                client.send();\n            }\n        }\n 
    };\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    CustomTile.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {!UTFGridJSON} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleError_();\n                return;\n            }\n            this.handleLoad_(response);\n        }\n        else {\n            this.handleError_();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    CustomTile.prototype.onXHRError_ = function (event) {\n        this.handleError_();\n    };\n    /**\n     */\n    CustomTile.prototype.load = function () {\n        if (this.preemptive_
 ) {\n            this.loadInternal_();\n        }\n        else {\n            this.setState(TileState.EMPTY);\n        }\n    };\n    return CustomTile;\n}(Tile));\nexport { CustomTile };\n/**\n * @typedef {Object} Options\n * @property {boolean} [preemptive=true]\n * If `true` the UTFGrid source loads the tiles based on their \"visibility\".\n * This improves the speed of response, but increases traffic.\n * Note that if set to `false` (lazy loading), you need to pass `true` as\n * `opt_request` to the `forDataAtCoordinateAndResolution` method otherwise no\n * data will ever be loaded.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {import(\"./TileJSON.js\").Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {string} [url] TileJSON endpoint that provides the configuration for this source.\n * Request will be made
  through JSONP. If not provided, `tileJSON` must be configured.\n */\n/**\n * @classdesc\n * Layer source for UTFGrid interaction data loaded from TileJSON format.\n * @api\n */\nvar UTFGrid = /** @class */ (function (_super) {\n    __extends(UTFGrid, _super);\n    /**\n     * @param {Options} options Source options.\n     */\n    function UTFGrid(options) {\n        var _this = _super.call(this, {\n            projection: getProjection('EPSG:3857'),\n            state: SourceState.LOADING,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.preemptive_ =\n            options.preemptive !== undefined ? options.preemptive : true;\n        /**\n         * @private\n         * @type {!import(\"../Tile.js\").UrlFunction}\n         */\n        _this.tileUrlFunction_ = nullTileUrlFunction;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.template_ = undefined;\n        /**\n       
   * @private\n         * @type {boolean}\n         */\n        _this.jsonp_ = options.jsonp || false;\n        if (options.url) {\n            if (_this.jsonp_) {\n                requestJSONP(options.url, _this.handleTileJSONResponse.bind(_this), _this.handleTileJSONError.bind(_this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', _this.onXHRLoad_.bind(_this));\n                client.addEventListener('error', _this.onXHRError_.bind(_this));\n                client.open('GET', options.url);\n                client.send();\n            }\n        }\n        else if (options.tileJSON) {\n            _this.handleTileJSONResponse(options.tileJSON);\n        }\n        else {\n            assert(false, 51); // Either `url` or `tileJSON` options must be provided\n        }\n        return _this;\n    }\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    UTFGrid.proto
 type.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {import(\"./TileJSON.js\").Config} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleTileJSONError();\n                return;\n            }\n            this.handleTileJSONResponse(response);\n        }\n        else {\n            this.handleTileJSONError();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    UTFGrid.prototype.onXHRError_ = function (event) {\n        this.handleTileJSONError();\n    };\n    /**\n     * Return the template from TileJSON.\n     * @return {string|undefined} The template from TileJSON.\n     * @api\n     */\n    UTFGrid.pr
 ototype.getTemplate = function () {\n        return this.template_;\n    };\n    /**\n     * Calls the callback (synchronously by default) with the available data\n     * for given coordinate and resolution (or `null` if not yet loaded or\n     * in case of an error).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {function(*): void} callback Callback.\n     * @param {boolean=} opt_request If `true` the callback is always async.\n     *                               The tile data is requested if not yet loaded.\n     * @api\n     */\n    UTFGrid.prototype.forDataAtCoordinateAndResolution = function (coordinate, resolution, callback, opt_request) {\n        if (this.tileGrid) {\n            var z = this.tileGrid.getZForResolution(resolution, this.zDirection);\n            var tileCoord = this.tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n            var tile = /** @type {!CustomTile} *
 / (this.getTile(tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));\n            tile.forDataAtCoordinate(coordinate, callback, opt_request);\n        }\n        else {\n            if (opt_request === true) {\n                setTimeout(function () {\n                    callback(null);\n                }, 0);\n            }\n            else {\n                callback(null);\n            }\n        }\n    };\n    /**\n     * @protected\n     */\n    UTFGrid.prototype.handleTileJSONError = function () {\n        this.setState(SourceState.ERROR);\n    };\n    /**\n     * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse\n     * @protected\n     * @param {import(\"./TileJSON.js\").Config} tileJSON Tile JSON.\n     */\n    UTFGrid.prototype.handleTileJSONResponse = function (tileJSON) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var sourceProjection = this.getProjection();\n        var extent;\n        if (tileJSON['bounds'] 
 !== undefined) {\n            var transform = getTransformFromProjections(epsg4326Projection, sourceProjection);\n            extent = applyTransform(tileJSON['bounds'], transform);\n        }\n        var minZoom = tileJSON['minzoom'] || 0;\n        var maxZoom = tileJSON['maxzoom'] || 22;\n        var tileGrid = createXYZ({\n            extent: extentFromProjection(sourceProjection),\n            maxZoom: maxZoom,\n            minZoom: minZoom,\n        });\n        this.tileGrid = tileGrid;\n        this.template_ = tileJSON['template'];\n        var grids = tileJSON['grids'];\n        if (!grids) {\n            this.setState(SourceState.ERROR);\n            return;\n        }\n        this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);\n        if (tileJSON['attribution'] !== undefined) {\n            var attributionExtent_1 = extent !== undefined ? extent : epsg4326Projection.getExtent();\n            this.setAttributions(function (frameState) {\n                if (i
 ntersects(attributionExtent_1, frameState.extent)) {\n                    return [tileJSON['attribution']];\n                }\n                return null;\n            });\n        }\n        this.setState(SourceState.READY);\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!CustomTile} Tile.\n     */\n    UTFGrid.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            return this.tileCache.get(tileCoordKey);\n        }\n        else {\n            var tileCoord = [z, x, y];\n            var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n            var tileUrl = this.tileUrlFunctio
 n_(urlTileCoord, pixelRatio, projection);\n            var tile = new CustomTile(tileCoord, tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY, tileUrl !== undefined ? tileUrl : '', this.tileGrid.getTileCoordExtent(tileCoord), this.preemptive_, this.jsonp_);\n            this.tileCache.set(tileCoordKey, tile);\n            return tile;\n        }\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     */\n    UTFGrid.prototype.useTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            this.tileCache.get(tileCoordKey);\n        }\n    };\n    return UTFGrid;\n}(TileSource));\nexport default UTFGrid;\n//# sourceMappingURL=UTFGrid.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = f
 unction (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nvar VectorTile = /** @class */ (function (_super) {\n    __extends(VectorTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {string} src Data source url.\n     * @param {import(\"./format/Feature.js\").default} format Feature format.\n     *
  @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"./Tile.js\").Options=} opt_options Tile options.\n     */\n    function VectorTile(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, opt_options) || this;\n        /**\n         * Extent of this tile; set by the source.\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.extent = null;\n        /**\n         * @private\n         * @type {import(\"./format/Feature.js\").default}\n         */\n        _this.format_ = format;\n        /**\n         * @private\n         * @type {Array<import(\"./Feature.js\").default>}\n         */\n        _this.features_ = null;\n        /**\n         * @private\n         * @type {import(\"./featureloader.js\").FeatureLoader}\n         */\n        _this.loader_;\n        /**\n         * Feature projection of this tile; set by the source.\n         * 
 @type {import(\"./proj/Projection.js\").default}\n         */\n        _this.projection = null;\n        /**\n         * Resolution of this tile; set by the source.\n         * @type {number}\n         */\n        _this.resolution;\n        /**\n         * @private\n         * @type {import(\"./Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction_ = tileLoadFunction;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.url_ = src;\n        return _this;\n    }\n    /**\n     * Get the feature format assigned for reading this tile's features.\n     * @return {import(\"./format/Feature.js\").default} Feature format.\n     * @api\n     */\n    VectorTile.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * Get the features for this tile. Geometries will be in the view projection.\n     * @return {Array<import(\"./Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    VectorTile.prototyp
 e.getFeatures = function () {\n        return this.features_;\n    };\n    /**\n     * @return {string} Key.\n     */\n    VectorTile.prototype.getKey = function () {\n        return this.url_;\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    VectorTile.prototype.load = function () {\n        if (this.state == TileState.IDLE) {\n            this.setState(TileState.LOADING);\n            this.tileLoadFunction_(this, this.url_);\n            if (this.loader_) {\n                this.loader_(this.extent, this.resolution, this.projection);\n            }\n        }\n    };\n    /**\n     * Handler for successful tile load.\n     * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n     * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n     */\n    VectorTile.prototype.onLoad = function (features, dataProjection) {\n        this.setFeatures(features);\n    };\n    /**\n     * Handler for tile load errors.\n   
   */\n    VectorTile.prototype.onError = function () {\n        this.setState(TileState.ERROR);\n    };\n    /**\n     * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n     * Sets the features for the tile.\n     * @param {Array<import(\"./Feature.js\").default>} features Features.\n     * @api\n     */\n    VectorTile.prototype.setFeatures = function (features) {\n        this.features_ = features;\n        this.setState(TileState.LOADED);\n    };\n    /**\n     * Set the feature loader for reading this tile's features.\n     * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n     * @api\n     */\n    VectorTile.prototype.setLoader = function (loader) {\n        this.loader_ = loader;\n    };\n    return VectorTile;\n}(Tile));\nexport default VectorTile;\n//# sourceMappingURL=VectorTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        ext
 endStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/VectorRenderTile\n */\nimport Tile from './Tile.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getUid } from './util.js';\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder\n * @property {number} renderedTileRevision\n * @property {number} renderedResolution\n * @property {number} renderedRevision\n * @property {number} renderedZ\n * @property {number} renderedTileResolution
 \n * @property {number} renderedTileZ\n */\n/**\n * @type {Array<HTMLCanvasElement>}\n */\nvar canvasPool = [];\nvar VectorRenderTile = /** @class */ (function (_super) {\n    __extends(VectorRenderTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {import(\"./tilecoord.js\").TileCoord} urlTileCoord Wrapped tile coordinate for source urls.\n     * @param {function(VectorRenderTile):Array<import(\"./VectorTile\").default>} getSourceTiles Function\n     * to get source tiles for this tile.\n     */\n    function VectorRenderTile(tileCoord, state, urlTileCoord, getSourceTiles) {\n        var _this = _super.call(this, tileCoord, state, { transition: 0 }) || this;\n        /**\n         * @private\n         * @type {!Object<string, CanvasRenderingContext2D>}\n         */\n        _this.context_ = {};\n        /**\n         * Executor groups by layer uid. E
 ntries are read/written by the renderer.\n         * @type {Object<string, Array<import(\"./render/canvas/ExecutorGroup.js\").default>>}\n         */\n        _this.executorGroups = {};\n        /**\n         * Number of loading source tiles. Read/written by the source.\n         * @type {number}\n         */\n        _this.loadingSourceTiles = 0;\n        /**\n         * Tile keys of error source tiles. Read/written by the source.\n         * @type {Object<string, boolean>}\n         */\n        _this.errorSourceTileKeys = {};\n        /**\n         * @type {Object<number, ImageData>}\n         */\n        _this.hitDetectionImageData = {};\n        /**\n         * @private\n         * @type {!Object<string, ReplayState>}\n         */\n        _this.replayState_ = {};\n        /**\n         * @type {Array<import(\"./VectorTile.js\").default>}\n         */\n        _this.sourceTiles = null;\n        /**\n         * @type {number}\n         */\n        _this.wantedResolution;\n       
  /**\n         * @type {!function():Array<import(\"./VectorTile.js\").default>}\n         */\n        _this.getSourceTiles = getSourceTiles.bind(undefined, _this);\n        /**\n         * z of the source tiles of the last getSourceTiles call.\n         * @type {number}\n         */\n        _this.sourceZ = -1;\n        /**\n         * True when all tiles for this tile's nominal resolution are available.\n         * @type {boolean}\n         */\n        _this.hifi = false;\n        /**\n         * @type {import(\"./tilecoord.js\").TileCoord}\n         */\n        _this.wrappedTileCoord = urlTileCoord;\n        return _this;\n    }\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {CanvasRenderingContext2D} The rendering context.\n     */\n    VectorRenderTile.prototype.getContext = function (layer) {\n        var key = getUid(layer);\n        if (!(key in this.context_)) {\n            this.context_[key] = createCanvasContext2D(1, 1, canvasP
 ool);\n        }\n        return this.context_[key];\n    };\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {boolean} Tile has a rendering context for the given layer.\n     */\n    VectorRenderTile.prototype.hasContext = function (layer) {\n        return getUid(layer) in this.context_;\n    };\n    /**\n     * Get the Canvas for this tile.\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {HTMLCanvasElement} Canvas.\n     */\n    VectorRenderTile.prototype.getImage = function (layer) {\n        return this.hasContext(layer) ? this.getContext(layer).canvas : null;\n    };\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {ReplayState} The replay state.\n     */\n    VectorRenderTile.prototype.getReplayState = function (layer) {\n        var key = getUid(layer);\n        if (!(key in this.replayState_)) {\n            this.replayState_[key] = {\n                dir
 ty: false,\n                renderedRenderOrder: null,\n                renderedResolution: NaN,\n                renderedRevision: -1,\n                renderedTileResolution: NaN,\n                renderedTileRevision: -1,\n                renderedZ: -1,\n                renderedTileZ: -1,\n            };\n        }\n        return this.replayState_[key];\n    };\n    /**\n     * Load the tile.\n     */\n    VectorRenderTile.prototype.load = function () {\n        this.getSourceTiles();\n    };\n    /**\n     * Remove from the cache due to expiry\n     */\n    VectorRenderTile.prototype.release = function () {\n        for (var key in this.context_) {\n            canvasPool.push(this.context_[key].canvas);\n        }\n        _super.prototype.release.call(this);\n    };\n    return VectorRenderTile;\n}(Tile));\nexport default VectorRenderTile;\n//# sourceMappingURL=VectorRenderTile.js.map","/**\n * @module ol/source/VectorTile\n */\nvar __extends = (this && this.__extends) || (fu
 nction () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport Tile from '../VectorTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport VectorRenderTile from '../VectorRenderTile.js';\nimport { buffer as bufferExtent, getIntersection, intersects, } from '../extent.js';\nimport { createForProjection, createXYZ, extentFromProjection, } from '../tilegrid.js';\nimport
  { equals } from '../array.js';\nimport { fromKey, getKeyZXY } from '../tilecoord.js';\nimport { loadFeaturesXhr } from '../featureloader.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {import(\"../format/Feature.js\").default} [format] Feature format for tiles. Used and required by the default.\n * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this\n * to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {imp
 ort(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection of the tile grid.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../VectorTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/VectorTile}.\n * @property {number} [maxZoom=22] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=512] Optional tile size. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. Could look like this for pbf tiles:\n * ```js\
 n * function(tile, url) {\n *   tile.setLoader(function(extent, resolution, projection) {\n *     fetch(url).then(function(response) {\n *       response.arrayBuffer().then(function(data) {\n *         const format = tile.getFormat() // ol/format/MVT configured as source format\n *         const features = format.readFeatures(data, {\n *           extent: extent,\n *           featureProjection: projection\n *         });\n *         tile.setFeatures(features);\n *       });\n *     });\n *   });\n * }\n * ```\n * If you do not need extent, resolution and projection to get the features for a tile (e.g.\n * for GeoJSON tiles), your `tileLoadFunction` does not need a `setLoader()` call. Only make sure\n * to call `setFeatures()` on the tile:\n * ```js\n * const format = new GeoJSON({featureProjection: map.getView().getProjection()});\n * async function tileLoadFunction(tile, url) {\n *   const response = await fetch(url);\n *   const data = await response.json();\n *   tile.setFeature
 s(format.readFeatures(data));\n * }\n * ```\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {number} [transition] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When set to `true`, tiles will be wrapped horizontally to\n * render multiple worlds.\n * @property {number} [zDirection=1] Indicate which resolution should be used\n * by a renderer if the view resolut
 ion does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n */\n/**\n * @classdesc\n * Class for layer sources providing vector data divided into a tile grid, to be\n * used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles\n * with vector features from the server, it is not meant for feature editing.\n * Features are optimized for rendering, their geometries are clipped at or near\n * tile boundaries and simplified for a view resolution. See\n * {@link module:ol/source/Vector} for vector sources that are suitable for feature\n * editing.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar VectorTile = /** @class */ (function (_super) {\n    __extends(VectorTile, _super);\n    /**\n     * @param {!Options} options Vector tile options.\n     */\n    function VectorTile(options) {\n 
        var _this = this;\n        var projection = options.projection || 'EPSG:3857';\n        var extent = options.extent || extentFromProjection(projection);\n        var tileGrid = options.tileGrid ||\n            createXYZ({\n                extent: extent,\n                maxResolution: options.maxResolution,\n                maxZoom: options.maxZoom !== undefined ? options.maxZoom : 22,\n                minZoom: options.minZoom,\n                tileSize: options.tileSize || 512,\n            });\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            opaque: false,\n            projection: projection,\n            state: options.state,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction\n                ? options.tileLoadFunction\n                : defaultLoadFunction,\n            ti
 leUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX === undefined ? true : options.wrapX,\n            transition: options.transition,\n            zDirection: options.zDirection === undefined ? 1 : options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../format/Feature.js\").default}\n         */\n        _this.format_ = options.format ? options.format : null;\n        /**\n         * @type {Object<string, import(\"./VectorTile\").default>}\n         */\n        _this.loadingTiles_ = {};\n        /**\n         * @private\n         * @type {TileCache}\n         */\n        _this.sourceTileCache = new TileCache(_this.tileCache.highWaterMark);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n        /**\n         * @protected\n         * @type
  {typeof import(\"../VectorTile.js\").default}\n         */\n        _this.tileClass = options.tileClass ? options.tileClass : Tile;\n        /**\n         * @private\n         * @type {Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n         */\n        _this.tileGrids_ = {};\n        return _this;\n    }\n    /**\n     * Get features whose bounding box intersects the provided extent. Only features for cached\n     * tiles for the last rendered zoom level are available in the source. So this method is only\n     * suitable for requesting tiles for extents that are currently rendered.\n     *\n     * Features are returned in random tile order and as they are included in the tiles. This means\n     * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    VectorTile.prot
 otype.getFeaturesInExtent = function (extent) {\n        var features = [];\n        var tileCache = this.tileCache;\n        if (tileCache.getCount() === 0) {\n            return features;\n        }\n        var z = fromKey(tileCache.peekFirstKey())[0];\n        var tileGrid = this.tileGrid;\n        tileCache.forEach(function (tile) {\n            if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n                return;\n            }\n            var sourceTiles = tile.getSourceTiles();\n            for (var i = 0, ii = sourceTiles.length; i < ii; ++i) {\n                var sourceTile = sourceTiles[i];\n                var tileCoord = sourceTile.tileCoord;\n                if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n                    var tileFeatures = sourceTile.getFeatures();\n                    if (tileFeatures) {\n                        for (var j = 0, jj = tileFeatures.length; j < jj; ++j) {\n                            var 
 candidate = tileFeatures[j];\n                            var geometry = candidate.getGeometry();\n                            if (intersects(extent, geometry.getExtent())) {\n                                features.push(candidate);\n                            }\n                        }\n                    }\n                }\n            }\n        });\n        return features;\n    };\n    /**\n     * @return {boolean} The source can have overlapping geometries.\n     */\n    VectorTile.prototype.getOverlaps = function () {\n        return this.overlaps_;\n    };\n    /**\n     * clear {@link module:ol/TileCache~TileCache} and delete all source tiles\n     * @api\n     */\n    VectorTile.prototype.clear = function () {\n        this.tileCache.clear();\n        this.sourceTileCache.clear();\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    VectorTile.
 prototype.expireCache = function (projection, usedTiles) {\n        _super.prototype.expireCache.call(this, projection, usedTiles);\n        this.sourceTileCache.expireCache({});\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection\").default} projection Projection.\n     * @param {VectorRenderTile} tile Vector image tile.\n     * @return {Array<import(\"../VectorTile\").default>} Tile keys.\n     */\n    VectorTile.prototype.getSourceTiles = function (pixelRatio, projection, tile) {\n        var urlTileCoord = tile.wrappedTileCoord;\n        var tileGrid = this.getTileGridForProjection(projection);\n        var extent = tileGrid.getTileCoordExtent(urlTileCoord);\n        var z = urlTileCoord[0];\n        var resolution = tileGrid.getResolution(z);\n        // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n        bufferExtent(extent, -resolution, extent);\n        var sourceTileGrid = this.til
 eGrid;\n        var sourceExtent = sourceTileGrid.getExtent();\n        if (sourceExtent) {\n            getIntersection(extent, sourceExtent, extent);\n        }\n        var sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n        var minZoom = sourceTileGrid.getMinZoom();\n        var previousSourceTiles = tile.sourceTiles;\n        var sourceTiles, covered, loadedZ;\n        if (previousSourceTiles &&\n            previousSourceTiles.length > 0 &&\n            previousSourceTiles[0].tileCoord[0] === sourceZ) {\n            sourceTiles = previousSourceTiles;\n            covered = true;\n            loadedZ = sourceZ;\n        }\n        else {\n            sourceTiles = [];\n            loadedZ = sourceZ + 1;\n            do {\n                --loadedZ;\n                covered = true;\n                sourceTileGrid.forEachTileCoord(extent, loadedZ, function (sourceTileCoord) {\n                    var tileUrl = this.tileUrlFunction(sourceTileCoord, pixelRatio, proj
 ection);\n                    var sourceTile;\n                    if (tileUrl !== undefined) {\n                        if (this.sourceTileCache.containsKey(tileUrl)) {\n                            sourceTile = this.sourceTileCache.get(tileUrl);\n                            var state = sourceTile.getState();\n                            if (state === TileState.LOADED ||\n                                state === TileState.ERROR ||\n                                state === TileState.EMPTY) {\n                                sourceTiles.push(sourceTile);\n                                return;\n                            }\n                        }\n                        else if (loadedZ === sourceZ) {\n                            sourceTile = new this.tileClass(sourceTileCoord, TileState.IDLE, tileUrl, this.format_, this.tileLoadFunction);\n                            sourceTile.extent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n                            sourceTil
 e.projection = projection;\n                            sourceTile.resolution = sourceTileGrid.getResolution(sourceTileCoord[0]);\n                            this.sourceTileCache.set(tileUrl, sourceTile);\n                            sourceTile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this));\n                            sourceTile.load();\n                        }\n                    }\n                    covered =\n                        covered &&\n                            sourceTile &&\n                            sourceTile.getState() === TileState.LOADED;\n                    if (!sourceTile) {\n                        return;\n                    }\n                    if (sourceTile.getState() !== TileState.EMPTY &&\n                        tile.getState() === TileState.IDLE) {\n                        tile.loadingSourceTiles++;\n                        sourceTile.addEventListener(EventType.CHANGE, function listenChange() {\n                     
        var state = sourceTile.getState();\n                            var sourceTileKey = sourceTile.getKey();\n                            if (state === TileState.LOADED || state === TileState.ERROR) {\n                                if (state === TileState.LOADED) {\n                                    sourceTile.removeEventListener(EventType.CHANGE, listenChange);\n                                    tile.loadingSourceTiles--;\n                                    delete tile.errorSourceTileKeys[sourceTileKey];\n                                }\n                                else if (state === TileState.ERROR) {\n                                    tile.errorSourceTileKeys[sourceTileKey] = true;\n                                }\n                                var errorTileCount = Object.keys(tile.errorSourceTileKeys)\n                                    .length;\n                                if (tile.loadingSourceTiles - errorTileCount === 0) {\n                        
             tile.hifi = errorTileCount === 0;\n                                    tile.sourceZ = sourceZ;\n                                    tile.setState(TileState.LOADED);\n                                }\n                            }\n                        });\n                    }\n                }.bind(this));\n                if (!covered) {\n                    sourceTiles.length = 0;\n                }\n            } while (!covered && loadedZ > minZoom);\n        }\n        if (tile.getState() === TileState.IDLE) {\n            tile.setState(TileState.LOADING);\n        }\n        if (covered) {\n            tile.hifi = sourceZ === loadedZ;\n            tile.sourceZ = loadedZ;\n            if (tile.getState() < TileState.LOADED) {\n                tile.setState(TileState.LOADED);\n            }\n            else if (!previousSourceTiles ||\n                !equals(sourceTiles, previousSourceTiles)) {\n                tile.sourceTiles = sourceTiles;\n            }\
 n        }\n        return sourceTiles;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!VectorRenderTile} Tile.\n     */\n    VectorTile.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var coordKey = getKeyZXY(z, x, y);\n        var key = this.getKey();\n        var tile;\n        if (this.tileCache.containsKey(coordKey)) {\n            tile = this.tileCache.get(coordKey);\n            if (tile.key === key) {\n                return tile;\n            }\n        }\n        var tileCoord = [z, x, y];\n        var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var sourceExtent = this.getTileGrid().getExtent();\n        var tileGrid = this.getTileGridForProjection(projection);
 \n        if (urlTileCoord && sourceExtent) {\n            var tileExtent = tileGrid.getTileCoordExtent(urlTileCoord);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            bufferExtent(tileExtent, -tileGrid.getResolution(z), tileExtent);\n            if (!intersects(sourceExtent, tileExtent)) {\n                urlTileCoord = null;\n            }\n        }\n        var empty = true;\n        if (urlTileCoord !== null) {\n            var sourceTileGrid = this.tileGrid;\n            var resolution = tileGrid.getResolution(z);\n            var sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            var extent = tileGrid.getTileCoordExtent(urlTileCoord);\n            bufferExtent(extent, -resolution, extent);\n            sourceTileGrid.forEachTileCoord(extent, sourceZ, function (sourceTileCoord) {\n                empty
  =\n                    empty &&\n                        !this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n            }.bind(this));\n        }\n        var newTile = new VectorRenderTile(tileCoord, empty ? TileState.EMPTY : TileState.IDLE, urlTileCoord, this.getSourceTiles.bind(this, pixelRatio, projection));\n        newTile.key = key;\n        if (tile) {\n            newTile.interimTile = tile;\n            newTile.refreshInterimChain();\n            this.tileCache.replace(coordKey, newTile);\n        }\n        else {\n            this.tileCache.set(coordKey, newTile);\n        }\n        return newTile;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    VectorTile.prototype.getTileGridForProjection = function (projection) {\n        var code = projection.getCode();\n        var tileGrid = this.tileGrids_[code];\n        if (!t
 ileGrid) {\n            // A tile grid that matches the tile size of the source tile grid is more\n            // likely to have 1:1 relationships between source tiles and rendered tiles.\n            var sourceTileGrid = this.tileGrid;\n            tileGrid = createForProjection(projection, undefined, sourceTileGrid\n                ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom())\n                : undefined);\n            this.tileGrids_[code] = tileGrid;\n        }\n        return tileGrid;\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    VectorTile.prototype.getTilePixelRatio = function (pixelRatio) {\n        return pixelRatio;\n    };\n    /**\n     * @param {number} z Z.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../size.js\").Size} T
 ile size.\n     */\n    VectorTile.prototype.getTilePixelSize = function (z, pixelRatio, projection) {\n        var tileGrid = this.getTileGridForProjection(projection);\n        var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n        return [\n            Math.round(tileSize[0] * pixelRatio),\n            Math.round(tileSize[1] * pixelRatio),\n        ];\n    };\n    /**\n     * Increases the cache size if needed\n     * @param {number} tileCount Minimum number of tiles needed.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    VectorTile.prototype.updateCacheSize = function (tileCount, projection) {\n        _super.prototype.updateCacheSize.call(this, tileCount * 2, projection);\n    };\n    return VectorTile;\n}(UrlTile));\nexport default VectorTile;\n/**\n * Sets the loader for a tile.\n * @param {import(\"../VectorTile.js\").default} tile Vector tile.\n * @param {string} url URL.\n */\nexport function defaultLoadFuncti
 on(tile, url) {\n    var loader = loadFeaturesXhr(url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));\n    tile.setLoader(loader);\n}\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/source/WMTSRequestEncoding\n */\n/**\n * Request encoding. One of 'KVP', 'REST'.\n * @enum {string}\n */\nexport default {\n    KVP: 'KVP',\n    REST: 'REST',\n};\n//# sourceMappingURL=WMTSRequestEncoding.js.map","/**\n * @module ol/source/WMTS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object
 .create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport WMTSRequestEncoding from './WMTSRequestEncoding.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { createFromCapabilitiesMatrixSet } from '../tilegrid/WMTS.js';\nimport { createFromTileUrlFunctions, expandUrl } from '../tileurlfunction.js';\nimport { equivalent, get as getProjection } from '../proj.js';\nimport { find, findIndex, includes } from '../array.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://develo
 per.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../tilegrid/WMTS.js\").default} tileGrid Tile grid.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./WMTSRequestEncoding.js\").default|string} [requestEncoding='KVP'] Request encoding.\n * @property {string} layer Layer name as advertised in the WMTS capabilities.\n * @property {string} style Style name as advertised in the WMTS capabilities.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass]  Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {number} [tilePixelRatio=1] The pixel 
 ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {string} [format='image/jpeg'] Image format. Only used when `requestEncoding` is `'KVP'`.\n * @property {string} [version='1.0.0'] WMTS version.\n * @property {string} matrixSet Matrix set.\n * @property {!Object} [dimensions] Additional \"dimensions\" for tile requests.\n * This is an object with properties named like the advertised WMTS dimensions.\n * @property {string} [url]  A URL for the service.\n * For the RESTful request encoding, this is a URL\n * template.  For KVP encoding, it is normal URL. A `{?-?}` template pattern,\n * for example `subdomain{a-f}.domain.com`, may be used instead of defining\n * each one separately in the `urls` option.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a til
 e given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {Array<string>} [urls] An array of URLs.\n * Requests will be distributed among the URLs in this array.\n * @property {boolean} [wrapX=false] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n/**\n * @classdesc\n * Layer source for tile data from WMTS servers.\n * @api\n */\nvar WMTS = /** @class */ (function (_super) {\n    __extends(WMTS, _super);\n    /**\n     * @param {Options} options WMTS options.\n     */\n    function WMTS(options) {\n        // TODO: add support for TileMatrixLimits\n        var _this = this;\n        var requestEncoding = options.requestEncoding !== undefined\n            ? /** @type {import(\"./WMTSRequestEncoding.js\").default} */ (options.requestEncoding)\n            : WMTSRe
 questEncoding.KVP;\n        // FIXME: should we create a default tileGrid?\n        // we could issue a getCapabilities xhr to retrieve missing configuration\n        var tileGrid = options.tileGrid;\n        var urls = options.urls;\n        if (urls === undefined && options.url !== undefined) {\n            urls = expandUrl(options.url);\n        }\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: options.tileClass,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            urls: urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : false,\n        
     transition: options.transition,\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.version_ = options.version !== undefined ? options.version : '1.0.0';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.format_ = options.format !== undefined ? options.format : 'image/jpeg';\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.dimensions_ =\n            options.dimensions !== undefined ? options.dimensions : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.layer_ = options.layer;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.matrixSet_ = options.matrixSet;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.style_ = options.style;\n        // FIXME: should we guess this requestEncoding from options.url(s)\n        //        s
 tructure? that would mean KVP only if a template is not provided.\n        /**\n         * @private\n         * @type {import(\"./WMTSRequestEncoding.js\").default}\n         */\n        _this.requestEncoding_ = requestEncoding;\n        _this.setKey(_this.getKeyForDimensions_());\n        if (urls && urls.length > 0) {\n            _this.tileUrlFunction = createFromTileUrlFunctions(urls.map(_this.createFromWMTSTemplate.bind(_this)));\n        }\n        return _this;\n    }\n    /**\n     * Set the URLs to use for requests.\n     * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.\n     * @param {Array<string>} urls URLs.\n     */\n    WMTS.prototype.setUrls = function (urls) {\n        this.urls = urls;\n        var key = urls.join('\\n');\n        this.setTileUrlFunction(createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate.bind(this))), key);\n    };\n    /**\n     * Get the dimensions, i.e. those passed to the constructor through
  the\n     * \"dimensions\" option, and possibly updated using the updateDimensions\n     * method.\n     * @return {!Object} Dimensions.\n     * @api\n     */\n    WMTS.prototype.getDimensions = function () {\n        return this.dimensions_;\n    };\n    /**\n     * Return the image format of the WMTS source.\n     * @return {string} Format.\n     * @api\n     */\n    WMTS.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * Return the layer of the WMTS source.\n     * @return {string} Layer.\n     * @api\n     */\n    WMTS.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Return the matrix set of the WMTS source.\n     * @return {string} MatrixSet.\n     * @api\n     */\n    WMTS.prototype.getMatrixSet = function () {\n        return this.matrixSet_;\n    };\n    /**\n     * Return the request encoding, either \"KVP\" or \"REST\".\n     * @return {import(\"./WMTSRequestEncoding.js\").default} Request enc
 oding.\n     * @api\n     */\n    WMTS.prototype.getRequestEncoding = function () {\n        return this.requestEncoding_;\n    };\n    /**\n     * Return the style of the WMTS source.\n     * @return {string} Style.\n     * @api\n     */\n    WMTS.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Return the version of the WMTS source.\n     * @return {string} Version.\n     * @api\n     */\n    WMTS.prototype.getVersion = function () {\n        return this.version_;\n    };\n    /**\n     * @private\n     * @return {string} The key for the current dimensions.\n     */\n    WMTS.prototype.getKeyForDimensions_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.dimensions_) {\n            res[i++] = key + '-' + this.dimensions_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Update the dimensions.\n     * @param {Object} dimensions Dimensions.\n     * @api\n     */\n    WMTS.prototype
 .updateDimensions = function (dimensions) {\n        assign(this.dimensions_, dimensions);\n        this.setKey(this.getKeyForDimensions_());\n    };\n    /**\n     * @param {string} template Template.\n     * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n     */\n    WMTS.prototype.createFromWMTSTemplate = function (template) {\n        var requestEncoding = this.requestEncoding_;\n        // context property names are lower case to allow for a case insensitive\n        // replacement as some services use different naming conventions\n        var context = {\n            'layer': this.layer_,\n            'style': this.style_,\n            'tilematrixset': this.matrixSet_,\n        };\n        if (requestEncoding == WMTSRequestEncoding.KVP) {\n            assign(context, {\n                'Service': 'WMTS',\n                'Request': 'GetTile',\n                'Version': this.version_,\n                'Format': this.format_,\n            });\n        }\n     
    // TODO: we may want to create our own appendParams function so that params\n        // order conforms to wmts spec guidance, and so that we can avoid to escape\n        // special template params\n        template =\n            requestEncoding == WMTSRequestEncoding.KVP\n                ? appendParams(template, context)\n                : template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                    return p.toLowerCase() in context ? context[p.toLowerCase()] : m;\n                });\n        var tileGrid = /** @type {import(\"../tilegrid/WMTS.js\").default} */ (this\n            .tileGrid);\n        var dimensions = this.dimensions_;\n        return (\n        /**\n         * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n         * @param {number} pixelRatio Pixel ratio.\n         * @param {import(\"../proj/Projection.js\").default} projection Projection.\n         * @return {string|undefined} Tile URL.\n         */\n        function (
 tileCoord, pixelRatio, projection) {\n            if (!tileCoord) {\n                return undefined;\n            }\n            else {\n                var localContext_1 = {\n                    'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),\n                    'TileCol': tileCoord[1],\n                    'TileRow': tileCoord[2],\n                };\n                assign(localContext_1, dimensions);\n                var url = template;\n                if (requestEncoding == WMTSRequestEncoding.KVP) {\n                    url = appendParams(url, localContext_1);\n                }\n                else {\n                    url = url.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                        return localContext_1[p];\n                    });\n                }\n                return url;\n            }\n        });\n    };\n    return WMTS;\n}(TileImage));\nexport default WMTS;\n/**\n * Generate source options from a capabilities object.\n * @param {Object} wm
 tsCap An object representing the capabilities document.\n * @param {!Object} config Configuration properties for the layer.  Defaults for\n *                  the layer will apply if not provided.\n *\n * Required config properties:\n *  - layer - {string} The layer identifier.\n *\n * Optional config properties:\n *  - matrixSet - {string} The matrix set identifier, required if there is\n *       more than one matrix set in the layer capabilities.\n *  - projection - {string} The desired CRS when no matrixSet is specified.\n *       eg: \"EPSG:3857\". If the desired projection is not available,\n *       an error is thrown.\n *  - requestEncoding - {string} url encoding format for the layer. Default is\n *       the first tile url format found in the GetCapabilities response.\n *  - style - {string} The name of the style\n *  - format - {string} Image format for the layer. Default is the first\n *       format returned in the GetCapabilities response.\n *  - crossOrigin - {string|n
 ull|undefined} Cross origin. Default is `undefined`.\n * @return {?Options} WMTS source options object or `null` if the layer was not found.\n * @api\n */\nexport function optionsFromCapabilities(wmtsCap, config) {\n    var layers = wmtsCap['Contents']['Layer'];\n    var l = find(layers, function (elt, index, array) {\n        return elt['Identifier'] == config['layer'];\n    });\n    if (l === null) {\n        return null;\n    }\n    var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];\n    var idx;\n    if (l['TileMatrixSetLink'].length > 1) {\n        if ('projection' in config) {\n            idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n                var tileMatrixSet = find(tileMatrixSets, function (el) {\n                    return el['Identifier'] == elt['TileMatrixSet'];\n                });\n                var supportedCRS = tileMatrixSet['SupportedCRS'];\n                var proj1 = getProjection(supportedCRS.replace(/urn:ogc:def:crs:(\
 \w+):(.*:)?(\\w+)$/, '$1:$3')) || getProjection(supportedCRS);\n                var proj2 = getProjection(config['projection']);\n                if (proj1 && proj2) {\n                    return equivalent(proj1, proj2);\n                }\n                else {\n                    return supportedCRS == config['projection'];\n                }\n            });\n        }\n        else {\n            idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n                return elt['TileMatrixSet'] == config['matrixSet'];\n            });\n        }\n    }\n    else {\n        idx = 0;\n    }\n    if (idx < 0) {\n        idx = 0;\n    }\n    var matrixSet = \n    /** @type {string} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSet']);\n    var matrixLimits = \n    /** @type {Array<Object>} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);\n    var format = /** @type {string} */ (l['Format'][0]);\n    if ('format' in config) {\n        format = config
 ['format'];\n    }\n    idx = findIndex(l['Style'], function (elt, index, array) {\n        if ('style' in config) {\n            return elt['Title'] == config['style'];\n        }\n        else {\n            return elt['isDefault'];\n        }\n    });\n    if (idx < 0) {\n        idx = 0;\n    }\n    var style = /** @type {string} */ (l['Style'][idx]['Identifier']);\n    var dimensions = {};\n    if ('Dimension' in l) {\n        l['Dimension'].forEach(function (elt, index, array) {\n            var key = elt['Identifier'];\n            var value = elt['Default'];\n            if (value === undefined) {\n                value = elt['Value'][0];\n            }\n            dimensions[key] = value;\n        });\n    }\n    var matrixSets = wmtsCap['Contents']['TileMatrixSet'];\n    var matrixSetObj = find(matrixSets, function (elt, index, array) {\n        return elt['Identifier'] == matrixSet;\n    });\n    var projection;\n    var code = matrixSetObj['SupportedCRS'];\n    if (code
 ) {\n        projection =\n            getProjection(code.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) || getProjection(code);\n    }\n    if ('projection' in config) {\n        var projConfig = getProjection(config['projection']);\n        if (projConfig) {\n            if (!projection || equivalent(projConfig, projection)) {\n                projection = projConfig;\n            }\n        }\n    }\n    var wrapX = false;\n    var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n    var matrix = matrixSetObj.TileMatrix[0];\n    // create default matrixLimit\n    var selectedMatrixLimit = {\n        MinTileCol: 0,\n        MinTileRow: 0,\n        // substract one to end up at tile top left\n        MaxTileCol: matrix.MatrixWidth - 1,\n        MaxTileRow: matrix.MatrixHeight - 1,\n    };\n    //in case of matrix limits, use matrix limits to calculate extent\n    if (matrixLimits) {\n        selectedMatrixLimit = matrixLimits[matrixLimits.length - 
 1];\n        matrix = find(matrixSetObj.TileMatrix, function (value) { return value.Identifier === selectedMatrixLimit.TileMatrix; });\n    }\n    var resolution = (matrix.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size\n    var origin = switchOriginXY\n        ? [matrix.TopLeftCorner[1], matrix.TopLeftCorner[0]]\n        : matrix.TopLeftCorner;\n    var tileSpanX = matrix.TileWidth * resolution;\n    var tileSpanY = matrix.TileHeight * resolution;\n    var extent = [\n        origin[0] + tileSpanX * selectedMatrixLimit.MinTileCol,\n        // add one to get proper bottom/right coordinate\n        origin[1] - tileSpanY * (1 + selectedMatrixLimit.MaxTileRow),\n        origin[0] + tileSpanX * (1 + selectedMatrixLimit.MaxTileCol),\n        origin[1] - tileSpanY * selectedMatrixLimit.MinTileRow,\n    ];\n    if (projection.getExtent() === null) {\n        projection.setExtent(extent);\n    }\n    var tileGrid = createFromCapa
 bilitiesMatrixSet(matrixSetObj, extent, matrixLimits);\n    /** @type {!Array<string>} */\n    var urls = [];\n    var requestEncoding = config['requestEncoding'];\n    requestEncoding = requestEncoding !== undefined ? requestEncoding : '';\n    if ('OperationsMetadata' in wmtsCap &&\n        'GetTile' in wmtsCap['OperationsMetadata']) {\n        var gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];\n        for (var i = 0, ii = gets.length; i < ii; ++i) {\n            if (gets[i]['Constraint']) {\n                var constraint = find(gets[i]['Constraint'], function (element) {\n                    return element['name'] == 'GetEncoding';\n                });\n                var encodings = constraint['AllowedValues']['Value'];\n                if (requestEncoding === '') {\n                    // requestEncoding not provided, use the first encoding from the list\n                    requestEncoding = encodings[0];\n                }\n                if (reque
 stEncoding === WMTSRequestEncoding.KVP) {\n                    if (includes(encodings, WMTSRequestEncoding.KVP)) {\n                        urls.push(/** @type {string} */ (gets[i]['href']));\n                    }\n                }\n                else {\n                    break;\n                }\n            }\n            else if (gets[i]['href']) {\n                requestEncoding = WMTSRequestEncoding.KVP;\n                urls.push(/** @type {string} */ (gets[i]['href']));\n            }\n        }\n    }\n    if (urls.length === 0) {\n        requestEncoding = WMTSRequestEncoding.REST;\n        l['ResourceURL'].forEach(function (element) {\n            if (element['resourceType'] === 'tile') {\n                format = element['format'];\n                urls.push(/** @type {string} */ (element['template']));\n            }\n        });\n    }\n    return {\n        urls: urls,\n        layer: config['layer'],\n        matrixSet: matrixSet,\n        format: format,\n   
      projection: projection,\n        requestEncoding: requestEncoding,\n        tileGrid: tileGrid,\n        style: style,\n        dimensions: dimensions,\n        wrapX: wrapX,\n        crossOrigin: config['crossOrigin'],\n    };\n}\n//# sourceMappingURL=WMTS.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseVector\n */\nimport Layer from './Layer.js';\nimport { assign } from '../obj.js';\nimport { creat
 eDefaultStyle, toFunction as toStyleFunction, } from '../style/Style.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this la
 yer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not ma
 nage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style} for default style\n * which will be used if this is not set.\n * @property {boolean} [updateWhileAnimating=false] When set to 
 `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    RENDER_ORDER: 'renderOrder',\n};\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @extend
 s {Layer<VectorSourceType>}\n * @api\n */\nvar BaseVectorLayer = /** @class */ (function (_super) {\n    __extends(BaseVectorLayer, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function BaseVectorLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.style;\n        delete baseOptions.renderBuffer;\n        delete baseOptions.updateWhileAnimating;\n        delete baseOptions.updateWhileInteracting;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.declutter_ =\n            options.declutter !== undefined ? options.declutter : false;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.renderBuffer_ =\n            options.renderBuffer !== undefined ? options.renderBuffer : 100;\n        /**\n      
    * User provided style.\n         * @type {import(\"../style/Style.js\").StyleLike}\n         * @private\n         */\n        _this.style_ = null;\n        /**\n         * Style function for use within the library.\n         * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n         * @private\n         */\n        _this.styleFunction_ = undefined;\n        _this.setStyle(options.style);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.updateWhileAnimating_ =\n            options.updateWhileAnimating !== undefined\n                ? options.updateWhileAnimating\n                : false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.updateWhileInteracting_ =\n            options.updateWhileInteracting !== undefined\n                ? options.updateWhileInteracting\n                : false;\n        return _this;\n    }\n    /**\n     * @return {boolean} Declutter.\n     */\n    Base
 VectorLayer.prototype.getDeclutter = function () {\n        return this.declutter_;\n    };\n    /**\n     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n     * that resolves with an array of features. The array will either contain the topmost feature\n     * when a hit was detected, or it will be empty.\n     *\n     * The hit detection algorithm used for this method is optimized for performance, but is less\n     * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n     * is not considered, and icons are only represented by their bounding box instead of the exact\n     * image.\n     *\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n     * @api\n     */\n    BaseVectorLayer.prototype.getFeatures = function (pixel) {\n        return _super.prototype.getFeature
 s.call(this, pixel);\n    };\n    /**\n     * @return {number|undefined} Render buffer.\n     */\n    BaseVectorLayer.prototype.getRenderBuffer = function () {\n        return this.renderBuffer_;\n    };\n    /**\n     * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): number|null|undefined} Render\n     *     order.\n     */\n    BaseVectorLayer.prototype.getRenderOrder = function () {\n        return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(Property.RENDER_ORDER));\n    };\n    /**\n     * Get the style for features.  This returns whatever was passed to the `style`\n     * option at construction or to the `setStyle` method.\n     * @return {import(\"../style/Style.js\").StyleLike|null|undefined} Layer style.\n     * @api\n     */\n    BaseVectorLayer.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Get the style function.\n     * @return {import(\"../style/Style.js
 \").StyleFunction|undefined} Layer style function.\n     * @api\n     */\n    BaseVectorLayer.prototype.getStyleFunction = function () {\n        return this.styleFunction_;\n    };\n    /**\n     * @return {boolean} Whether the rendered layer should be updated while\n     *     animating.\n     */\n    BaseVectorLayer.prototype.getUpdateWhileAnimating = function () {\n        return this.updateWhileAnimating_;\n    };\n    /**\n     * @return {boolean} Whether the rendered layer should be updated while\n     *     interacting.\n     */\n    BaseVectorLayer.prototype.getUpdateWhileInteracting = function () {\n        return this.updateWhileInteracting_;\n    };\n    /**\n     * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n     *     Render order.\n     */\n    BaseVectorLayer.prototype.setRenderOrder = function (renderOrder) {\n        this.set(Property.RENDER_ORDER, renderOrder);\n    };\n    /**\n     * Set the style for features.  This can be a sing
 le style object, an array\n     * of styles, or a function that takes a feature and resolution and returns\n     * an array of styles. If set to `null`, the layer has no style (a `null` style),\n     * so only features that have their own styles will be rendered in the layer. Call\n     * `setStyle()` without arguments to reset to the default style. See\n     * {@link module:ol/style} for information on the default style.\n     * @param {(import(\"../style/Style.js\").StyleLike|null)=} opt_style Layer style.\n     * @api\n     */\n    BaseVectorLayer.prototype.setStyle = function (opt_style) {\n        this.style_ = opt_style !== undefined ? opt_style : createDefaultStyle;\n        this.styleFunction_ =\n            opt_style === null ? undefined : toStyleFunction(this.style_);\n        this.changed();\n    };\n    return BaseVectorLayer;\n}(Layer));\nexport default BaseVectorLayer;\n//# sourceMappingURL=BaseVector.js.map","var __extends = (this && this.__extends) || (function () {\
 n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport WebGLHelper from '../../webgl/Helper.js';\n/**\n * @enum {string}\n */\nexport var WebGLWorkerMessageType = {\n    GENERATE_BUFFERS: 'GENERATE_BUFFERS',\n};\n/**\n * @typedef {Object} WebGLWorkerGenerateBuffersMessage\n * This message will trigger the generation of a vertex and an index buffer based on the given render instructions.\n * When the buffers are ge
 nerated, the worked will send a message of the same type to the main thread, with\n * the generated buffers in it.\n * Note that any addition properties present in the message *will* be sent back to the main thread.\n * @property {WebGLWorkerMessageType} type Message type\n * @property {ArrayBuffer} renderInstructions Render instructions raw binary buffer.\n * @property {ArrayBuffer} [vertexBuffer] Vertices array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [indexBuffer] Indices array raw binary buffer (sent by the worker).\n * @property {number} [customAttributesCount] Amount of custom attributes count in the render instructions.\n */\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {str
 ing} [fragmentShader] Fragment shader source\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} Options\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nvar WebGLLayerRenderer = /** @class */ (function (_super) {\n    __extends(WebGLLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     * @param {Options=} [opt_options] Options.\n     */\n    function WebGLLayerRenderer(layer, opt_options) {\n        var _this = _super.call(this, layer) || this;\n        var options = opt_op
 tions || {};\n        /**\n         * @type {WebGLHelper}\n         * @protected\n         */\n        _this.helper = new WebGLHelper({\n            postProcesses: options.postProcesses,\n            uniforms: options.uniforms,\n        });\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    WebGLLayerRenderer.prototype.disposeInternal = function () {\n        this.helper.dispose();\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Will return the last shader compilation errors. If no error happened, will return null;\n     * @return {string|null} Errors, or null if last compilation was successful\n     * @api\n     */\n    WebGLLayerRenderer.prototype.getShaderCompileErrors = function () {\n        return this.helper.getShaderCompileErrors();\n    };\n    return WebGLLayerRenderer;\n}(LayerRenderer));\nvar tmpArray_ = [];\nvar bufferPositions_ = { vertexPosition: 0, indexPosition: 0 };\nfunction writePointVertex(buffer, pos, x, y, ind
 ex) {\n    buffer[pos + 0] = x;\n    buffer[pos + 1] = y;\n    buffer[pos + 2] = index;\n}\n/**\n * An object holding positions both in an index and a vertex buffer.\n * @typedef {Object} BufferPositions\n * @property {number} vertexPosition Position in the vertex buffer\n * @property {number} indexPosition Position in the index buffer\n */\n/**\n * Pushes a quad (two triangles) based on a point geometry\n * @param {Float32Array} instructions Array of render instructions for points.\n * @param {number} elementIndex Index from which render instructions will be read.\n * @param {Float32Array} vertexBuffer Buffer in the form of a typed array.\n * @param {Uint32Array} indexBuffer Buffer in the form of a typed array.\n * @param {number} customAttributesCount Amount of custom attributes for each element.\n * @param {BufferPositions} [bufferPositions] Buffer write positions; if not specified, positions will be set at 0.\n * @return {BufferPositions} New buffer positions where to write next
 \n * @property {number} vertexPosition New position in the vertex buffer where future writes should start.\n * @property {number} indexPosition New position in the index buffer where future writes should start.\n * @private\n */\nexport function writePointFeatureToBuffers(instructions, elementIndex, vertexBuffer, indexBuffer, customAttributesCount, bufferPositions) {\n    // This is for x, y and index\n    var baseVertexAttrsCount = 3;\n    var baseInstructionsCount = 2;\n    var stride = baseVertexAttrsCount + customAttributesCount;\n    var x = instructions[elementIndex + 0];\n    var y = instructions[elementIndex + 1];\n    // read custom numerical attributes on the feature\n    var customAttrs = tmpArray_;\n    customAttrs.length = customAttributesCount;\n    for (var i = 0; i < customAttrs.length; i++) {\n        customAttrs[i] = instructions[elementIndex + baseInstructionsCount + i];\n    }\n    var vPos = bufferPositions ? bufferPositions.vertexPosition : 0;\n    var iPos = b
 ufferPositions ? bufferPositions.indexPosition : 0;\n    var baseIndex = vPos / stride;\n    // push vertices for each of the four quad corners (first standard then custom attributes)\n    writePointVertex(vertexBuffer, vPos, x, y, 0);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 1);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 2);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 3);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    indexBuffer[iPos++] = baseIndex;\n    indexBuffer[iPos++] = baseIndex + 1;\n    indexBuffer[iPos++] = baseIndex + 3;\n    indexBuffe
 r[iPos++] = baseIndex + 1;\n    indexBuffer[iPos++] = baseIndex + 2;\n    indexBuffer[iPos++] = baseIndex + 3;\n    bufferPositions_.vertexPosition = vPos;\n    bufferPositions_.indexPosition = iPos;\n    return bufferPositions_;\n}\n/**\n * Returns a texture of 1x1 pixel, white\n * @private\n * @return {ImageData} Image data.\n */\nexport function getBlankImageData() {\n    var canvas = document.createElement('canvas');\n    var image = canvas.getContext('2d').createImageData(1, 1);\n    image.data[0] = 255;\n    image.data[1] = 255;\n    image.data[2] = 255;\n    image.data[3] = 255;\n    return image;\n}\n/**\n * Generates a color array based on a numerical id\n * Note: the range for each component is 0 to 1 with 256 steps\n * @param {number} id Id\n * @param {Array<number>} [opt_array] Reusable array\n * @return {Array<number>} Color array containing the encoded id\n */\nexport function colorEncodeId(id, opt_array) {\n    var array = opt_array || [];\n    var radix = 256;\n    v
 ar divide = radix - 1;\n    array[0] = Math.floor(id / radix / radix / radix) / divide;\n    array[1] = (Math.floor(id / radix / radix) % radix) / divide;\n    array[2] = (Math.floor(id / radix) % radix) / divide;\n    array[3] = (id % radix) / divide;\n    return array;\n}\n/**\n * Reads an id from a color-encoded array\n * Note: the expected range for each component is 0 to 1 with 256 steps.\n * @param {Array<number>} color Color array containing the encoded id\n * @return {number} Decoded id\n */\nexport function colorDecodeId(color) {\n    var id = 0;\n    var radix = 256;\n    var mult = radix - 1;\n    id += Math.round(color[0] * radix * radix * radix * mult);\n    id += Math.round(color[1] * radix * radix * mult);\n    id += Math.round(color[2] * radix * mult);\n    id += Math.round(color[3] * mult);\n    return id;\n}\nexport default WebGLLayerRenderer;\n//# sourceMappingURL=Layer.js.map","var source = \"var e=\\\"function\\\"==typeof Object.assign?Object.assign:function(e,n
 ){if(null==e)throw new TypeError(\\\"Cannot convert undefined or null to object\\\");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n=\\\"GENERATE_BUFFERS\\\",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=
 0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};\";\nvar blob = new Blob([source], { type: 'application/javascript' });\nvar url = URL.createObjectURL(blob);\nexport function create() {\n    return new Worker(url);\n}\n//# sourceMappingURL=webgl.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/rende
 rer/webgl/PointsLayer\n */\nimport BaseVector from '../../layer/BaseVector.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorEventType from '../../source/VectorEventType.js';\nimport ViewHint from '../../ViewHint.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport WebGLLayerRenderer, { WebGLWorkerMessageType, colorDecodeId, colorEncodeId, } from './Layer.js';\nimport WebGLRenderTarget from '../../webgl/RenderTarget.js';\nimport { ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER } from '../../webgl.js';\nimport { AttributeType, DefaultUniform } from '../../webgl/Helper.js';\nimport { apply as applyTransform, create as createTransform, makeInverse as makeInverseTransform, multiply as multiplyTransform, } from '../../transform.js';\nimport { assert } from '../../asserts.js';\nimport { buffer, createEmpty, equals } from '../../extent.js';\nimport { create as createWebGLWorker } from '../../worker/webgl.js';\nimport { getUid } from '../../util.js'
 ;\nimport { listen, unlistenByKey } from '../../events.js';\n/**\n * @typedef {Object} CustomAttribute A description of a custom attribute to be passed on to the GPU, with a value different\n * for each feature.\n * @property {string} name Attribute name.\n * @property {function(import(\"../../Feature\").default, Object<string, *>):number} callback This callback computes the numerical value of the\n * attribute for a given feature (properties are available as 2nd arg for quicker access).\n */\n/**\n * @typedef {Object} FeatureCacheItem Object that holds a reference to a feature, its geometry and properties. Used to optimize\n * rebuildBuffers by accessing these objects quicker.\n * @property {import(\"../../Feature\").default} feature Feature\n * @property {Object<string, *>} properties Feature properties\n * @property {import(\"../../geom\").Geometry} geometry Feature geometry\n */\n/**\n * @typedef {Object} Options\n * @property {Array<CustomAttribute>} [attributes] These attribut
 es will be read from the features in the source and then\n * passed to the GPU. The `name` property of each attribute will serve as its identifier:\n *  * In the vertex shader as an `attribute` by prefixing it with `a_`\n *  * In the fragment shader as a `varying` by prefixing it with `v_`\n * Please note that these can only be numerical values.\n * @property {string} vertexShader Vertex shader source, mandatory.\n * @property {string} fragmentShader Fragment shader source, mandatory.\n * @property {string} [hitVertexShader] Vertex shader source for hit detection rendering.\n * @property {string} [hitFragmentShader] Fragment shader source for hit detection rendering.\n * @property {Object.<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * Please note that `u_texture` is reserved for the main texture slot.\n * @property {Array<import(\"./Layer\").PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/*
 *\n * @classdesc\n * WebGL vector renderer optimized for points.\n * All features will be rendered as quads (two triangles forming a square). New data will be flushed to the GPU\n * every time the vector source changes.\n *\n * You need to provide vertex and fragment shaders for rendering. This can be done using\n * {@link module:ol/webgl/ShaderBuilder} utilities. These shaders shall expect a `a_position` attribute\n * containing the screen-space projected center of the quad, as well as a `a_index` attribute\n * whose value (0, 1, 2 or 3) indicates which quad vertex is currently getting processed (see structure below).\n *\n * To include variable attributes in the shaders, you need to declare them using the `attributes` property of\n * the options object like so:\n * ```js\n * new WebGLPointsLayerRenderer(layer, {\n *   attributes: [\n *     {\n *       name: 'size',\n *       callback: function(feature) {\n *         // compute something with the feature\n *       }\n *     },\n * 
     {\n *       name: 'weight',\n *       callback: function(feature) {\n *         // compute something with the feature\n *       }\n *     },\n *   ],\n *   vertexShader:\n *     // shader using attribute a_weight and a_size\n *   fragmentShader:\n *     // shader using varying v_weight and v_size\n * ```\n *\n * To enable hit detection, you must as well provide dedicated shaders using the `hitVertexShader`\n * and `hitFragmentShader` properties. These shall expect the `a_hitColor` attribute to contain\n * the final color that will have to be output for hit detection to work.\n *\n * The following uniform is used for the main texture: `u_texture`.\n *\n * Please note that the main shader output should have premultiplied alpha, otherwise visual anomalies may occur.\n *\n * Points are rendered as quads with the following structure:\n *\n * ```\n *   (u0, v1)      (u1, v1)\n *  [3]----------[2]\n *   |`           |\n *   |  `         |\n *   |    `       |\n *   |      `     |\n *  
  |        `   |\n *   |          ` |\n *  [0]----------[1]\n *   (u0, v0)      (u1, v0)\n *  ```\n *\n * This uses {@link module:ol/webgl/Helper~WebGLHelper} internally.\n *\n * @api\n */\nvar WebGLPointsLayerRenderer = /** @class */ (function (_super) {\n    __extends(WebGLPointsLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Layer.js\").default} layer Layer.\n     * @param {Options} options Options.\n     */\n    function WebGLPointsLayerRenderer(layer, options) {\n        var _this = this;\n        var uniforms = options.uniforms || {};\n        var projectionMatrixTransform = createTransform();\n        uniforms[DefaultUniform.PROJECTION_MATRIX] = projectionMatrixTransform;\n        _this = _super.call(this, layer, {\n            uniforms: uniforms,\n            postProcesses: options.postProcesses,\n        }) || this;\n        _this.sourceRevision_ = -1;\n        _this.verticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.hitV
 erticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.indicesBuffer_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.program_ = _this.helper.getProgram(options.fragmentShader, options.vertexShader);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.hitDetectionEnabled_ =\n            options.hitFragmentShader && options.hitVertexShader ? true : false;\n        _this.hitProgram_ =\n            _this.hitDetectionEnabled_ &&\n                _this.helper.getProgram(options.hitFragmentShader, options.hitVertexShader);\n        var customAttributes = options.attributes\n            ? options.attributes.map(function (attribute) {\n                return {\n                    name: 'a_' + attribute.name,\n                    size: 1,\n                    type: AttributeType.FLOAT,\n                };\n            })\n            : [];\n        /**\n         * A list of attributes used by the ren
 derer. By default only the position and\n         * index of the vertex (0 to 3) are required.\n         * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n         */\n        _this.attributes = [\n            {\n                name: 'a_position',\n                size: 2,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_index',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n        ].concat(customAttributes);\n        /**\n         * A list of attributes used for hit detection.\n         * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n         */\n        _this.hitDetectionAttributes = [\n            {\n                name: 'a_position',\n                size: 2,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_index',\n                size: 1,\n                type: AttributeType.FLOAT,\n      
       },\n            {\n                name: 'a_hitColor',\n                size: 4,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_featureUid',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n        ].concat(customAttributes);\n        _this.customAttributes = options.attributes ? options.attributes : [];\n        _this.previousExtent_ = createEmpty();\n        /**\n         * This transform is updated on every frame and is the composition of:\n         * - invert of the world->screen transform that was used when rebuilding buffers (see `this.renderTransform_`)\n         * - current world->screen transform\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.currentTransform_ = projectionMatrixTransform;\n        /**\n         * This transform is updated when buffers are rebuilt and converts world space coordinates to screen space\
 n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.renderTransform_ = createTransform();\n        /**\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.invertRenderTransform_ = createTransform();\n        /**\n         * @type {Float32Array}\n         * @private\n         */\n        _this.renderInstructions_ = new Float32Array(0);\n        /**\n         * These instructions are used for hit detection\n         * @type {Float32Array}\n         * @private\n         */\n        _this.hitRenderInstructions_ = new Float32Array(0);\n        /**\n         * @type {WebGLRenderTarget}\n         * @private\n         */\n        _this.hitRenderTarget_ =\n            _this.hitDetectionEnabled_ && new WebGLRenderTarget(_this.helper);\n        _this.worker_ = createWebGLWorker();\n        _this.worker_.addEventListener('message', function (event) {\n            var received = ev
 ent.data;\n            if (received.type === WebGLWorkerMessageType.GENERATE_BUFFERS) {\n                var projectionTransform = received.projectionTransform;\n                if (received.hitDetection) {\n                    this.hitVerticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n                    this.helper.flushBufferData(this.hitVerticesBuffer_);\n                }\n                else {\n                    this.verticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n                    this.helper.flushBufferData(this.verticesBuffer_);\n                }\n                this.indicesBuffer_.fromArrayBuffer(received.indexBuffer);\n                this.helper.flushBufferData(this.indicesBuffer_);\n                this.renderTransform_ = projectionTransform;\n                makeInverseTransform(this.invertRenderTransform_, this.renderTransform_);\n                if (received.hitDetection) {\n                    this.hitRenderInstructions_ = new Float32Array(even
 t.data.renderInstructions);\n                }\n                else {\n                    this.renderInstructions_ = new Float32Array(event.data.renderInstructions);\n                }\n                this.getLayer().changed();\n            }\n        }.bind(_this));\n        /**\n         * This object will be updated when the source changes. Key is uid.\n         * @type {Object<string, FeatureCacheItem>}\n         * @private\n         */\n        _this.featureCache_ = {};\n        /**\n         * Amount of features in the cache.\n         * @type {number}\n         * @private\n         */\n        _this.featureCount_ = 0;\n        var source = _this.getLayer().getSource();\n        _this.sourceListenKeys_ = [\n            listen(source, VectorEventType.ADDFEATURE, _this.handleSourceFeatureAdded_, _this),\n            listen(source, VectorEventType.CHANGEFEATURE, _this.handleSourceFeatureChanged_, _this),\n            listen(source, VectorEventType.REMOVEFEATURE, _this.handleSo
 urceFeatureDelete_, _this),\n            listen(source, VectorEventType.CLEAR, _this.handleSourceFeatureClear_, _this),\n        ];\n        source.forEachFeature(function (feature) {\n            this.featureCache_[getUid(feature)] = {\n                feature: feature,\n                properties: feature.getProperties(),\n                geometry: feature.getGeometry(),\n            };\n            this.featureCount_++;\n        }.bind(_this));\n        return _this;\n    }\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureAdded_ = function (event) {\n        var feature = event.feature;\n        this.featureCache_[getUid(feature)] = {\n            feature: feature,\n            properties: feature.getProperties(),\n            geometry: feature.getGeometry(),\n        };\n        this.featureCount_++;\n    };\n    /**\n     * @param {import(\"../../sourc
 e/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureChanged_ = function (event) {\n        var feature = event.feature;\n        this.featureCache_[getUid(feature)] = {\n            feature: feature,\n            properties: feature.getProperties(),\n            geometry: feature.getGeometry(),\n        };\n    };\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureDelete_ = function (event) {\n        var feature = event.feature;\n        delete this.featureCache_[getUid(feature)];\n        this.featureCount_--;\n    };\n    /**\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureClear_ = function () {\n        this.featureCache_ = {};\n        this.featureCount_ = 0;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../Pluggab
 leMap.js\").FrameState} frameState Frame state.\n     * @return {HTMLElement} The rendered element.\n     */\n    WebGLPointsLayerRenderer.prototype.renderFrame = function (frameState) {\n        var renderCount = this.indicesBuffer_.getSize();\n        this.helper.drawElements(0, renderCount);\n        this.helper.finalizeDraw(frameState);\n        var canvas = this.helper.getCanvas();\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var opacity = layerState.opacity;\n        if (opacity !== parseFloat(canvas.style.opacity)) {\n            canvas.style.opacity = String(opacity);\n        }\n        if (this.hitDetectionEnabled_) {\n            this.renderHitDetection(frameState);\n            this.hitRenderTarget_.clearCachedData();\n        }\n        return canvas;\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} 
 Layer is ready to be rendered.\n     */\n    WebGLPointsLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layer = this.getLayer();\n        var vectorSource = layer.getSource();\n        var viewState = frameState.viewState;\n        var viewNotMoving = !frameState.viewHints[ViewHint.ANIMATING] &&\n            !frameState.viewHints[ViewHint.INTERACTING];\n        var extentChanged = !equals(this.previousExtent_, frameState.extent);\n        var sourceChanged = this.sourceRevision_ < vectorSource.getRevision();\n        if (sourceChanged) {\n            this.sourceRevision_ = vectorSource.getRevision();\n        }\n        if (viewNotMoving && (extentChanged || sourceChanged)) {\n            var projection = viewState.projection;\n            var resolution = viewState.resolution;\n            var renderBuffer = layer instanceof BaseVector ? layer.getRenderBuffer() : 0;\n            var extent = buffer(frameState.extent, renderBuffer * resolution);\n        
     vectorSource.loadFeatures(extent, resolution, projection);\n            this.rebuildBuffers_(frameState);\n            this.previousExtent_ = frameState.extent.slice();\n        }\n        // apply the current projection transform with the invert of the one used to fill buffers\n        this.helper.makeProjectionTransform(frameState, this.currentTransform_);\n        multiplyTransform(this.currentTransform_, this.invertRenderTransform_);\n        this.helper.useProgram(this.program_);\n        this.helper.prepareDraw(frameState);\n        // write new data\n        this.helper.bindBuffer(this.verticesBuffer_);\n        this.helper.bindBuffer(this.indicesBuffer_);\n        this.helper.enableAttributes(this.attributes);\n        return true;\n    };\n    /**\n     * Rebuild internal webgl buffers based on current view extent; costly, should not be called too much\n     * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGL
 PointsLayerRenderer.prototype.rebuildBuffers_ = function (frameState) {\n        // saves the projection transform for the current frame state\n        var projectionTransform = createTransform();\n        this.helper.makeProjectionTransform(frameState, projectionTransform);\n        // here we anticipate the amount of render instructions that we well generate\n        // this can be done since we know that for normal render we only have x, y as base instructions,\n        // and x, y, r, g, b, a and featureUid for hit render instructions\n        // and we also know the amount of custom attributes to append to these\n        var totalInstructionsCount = (2 + this.customAttributes.length) * this.featureCount_;\n        if (!this.renderInstructions_ ||\n            this.renderInstructions_.length !== totalInstructionsCount) {\n            this.renderInstructions_ = new Float32Array(totalInstructionsCount);\n        }\n        if (this.hitDetectionEnabled_) {\n            var totalHit
 InstructionsCount = (7 + this.customAttributes.length) * this.featureCount_;\n            if (!this.hitRenderInstructions_ ||\n                this.hitRenderInstructions_.length !== totalHitInstructionsCount) {\n                this.hitRenderInstructions_ = new Float32Array(totalHitInstructionsCount);\n            }\n        }\n        // loop on features to fill the buffer\n        var featureCache, geometry;\n        var tmpCoords = [];\n        var tmpColor = [];\n        var renderIndex = 0;\n        var hitIndex = 0;\n        var hitColor;\n        for (var featureUid in this.featureCache_) {\n            featureCache = this.featureCache_[featureUid];\n            geometry = /** @type {import(\"../../geom\").Point} */ (featureCache.geometry);\n            if (!geometry || geometry.getType() !== GeometryType.POINT) {\n                continue;\n            }\n            tmpCoords[0] = geometry.getFlatCoordinates()[0];\n            tmpCoords[1] = geometry.getFlatCoordinates()[1]
 ;\n            applyTransform(projectionTransform, tmpCoords);\n            hitColor = colorEncodeId(hitIndex + 6, tmpColor);\n            this.renderInstructions_[renderIndex++] = tmpCoords[0];\n            this.renderInstructions_[renderIndex++] = tmpCoords[1];\n            // for hit detection, the feature uid is saved in the opacity value\n            // and the index of the opacity value is encoded in the color values\n            if (this.hitDetectionEnabled_) {\n                this.hitRenderInstructions_[hitIndex++] = tmpCoords[0];\n                this.hitRenderInstructions_[hitIndex++] = tmpCoords[1];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[0];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[1];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[2];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[3];\n                this.hitRenderInstructions_[hitIndex++] = Number(featureUid);\n          
   }\n            // pushing custom attributes\n            var value = void 0;\n            for (var j = 0; j < this.customAttributes.length; j++) {\n                value = this.customAttributes[j].callback(featureCache.feature, featureCache.properties);\n                this.renderInstructions_[renderIndex++] = value;\n                if (this.hitDetectionEnabled_) {\n                    this.hitRenderInstructions_[hitIndex++] = value;\n                }\n            }\n        }\n        /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n        var message = {\n            type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n            renderInstructions: this.renderInstructions_.buffer,\n            customAttributesCount: this.customAttributes.length,\n        };\n        // additional properties will be sent back as-is by the worker\n        message['projectionTransform'] = projectionTransform;\n        this.worker_.postMessage(message, [this.renderInstructions_.b
 uffer]);\n        this.renderInstructions_ = null;\n        /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n        if (this.hitDetectionEnabled_) {\n            var hitMessage = {\n                type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n                renderInstructions: this.hitRenderInstructions_.buffer,\n                customAttributesCount: 5 + this.customAttributes.length,\n            };\n            hitMessage['projectionTransform'] = projectionTransform;\n            hitMessage['hitDetection'] = true;\n            this.worker_.postMessage(hitMessage, [\n                this.hitRenderInstructions_.buffer,\n            ]);\n            this.hitRenderInstructions_ = null;\n        }\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {funct
 ion(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    WebGLPointsLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        assert(this.hitDetectionEnabled_, 66);\n        if (!this.hitRenderInstructions_) {\n            return;\n        }\n        var pixel = applyTransform(frameState.coordinateToPixelTransform, coordinate.slice());\n        var data = this.hitRenderTarget_.readPixel(pixel[0] / 2, pixel[1] / 2);\n        var color = [data[0] / 255, data[1] / 255, data[2] / 255, data[3] / 255];\n        var index = colorDecodeId(color);\n        var opacity = this.hitRenderInstructions_[index];\n        var uid = Math.floor(opacity).toString();\n        var
  source = this.getLayer().getSource();\n        var feature = source.getFeatureByUid(uid);\n        if (feature) {\n            return callback(feature, this.getLayer());\n        }\n    };\n    /**\n     * Render the hit detection data to the corresponding render target\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState current frame state\n     */\n    WebGLPointsLayerRenderer.prototype.renderHitDetection = function (frameState) {\n        // skip render entirely if vertex buffers not ready/generated yet\n        if (!this.hitVerticesBuffer_.getSize()) {\n            return;\n        }\n        this.hitRenderTarget_.setSize([\n            Math.floor(frameState.size[0] / 2),\n            Math.floor(frameState.size[1] / 2),\n        ]);\n        this.helper.useProgram(this.hitProgram_);\n        this.helper.prepareDrawToRenderTarget(frameState, this.hitRenderTarget_, true);\n        this.helper.bindBuffer(this.hitVerticesBuffer_);\n        this.helper.bindBuffe
 r(this.indicesBuffer_);\n        this.helper.enableAttributes(this.hitDetectionAttributes);\n        var renderCount = this.indicesBuffer_.getSize();\n        this.helper.drawElements(0, renderCount);\n    };\n    /**\n     * Clean up.\n     */\n    WebGLPointsLayerRenderer.prototype.disposeInternal = function () {\n        this.worker_.terminate();\n        this.layer_ = null;\n        this.sourceListenKeys_.forEach(function (key) {\n            unlistenByKey(key);\n        });\n        this.sourceListenKeys_ = null;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return WebGLPointsLayerRenderer;\n}(WebGLLayerRenderer));\nexport default WebGLPointsLayerRenderer;\n//# sourceMappingURL=PointsLayer.js.map","/**\n * @module ol/render/canvas/Instruction\n */\n/**\n * @enum {number}\n */\nvar Instruction = {\n    BEGIN_GEOMETRY: 0,\n    BEGIN_PATH: 1,\n    CIRCLE: 2,\n    CLOSE_PATH: 3,\n    CUSTOM: 4,\n    DRAW_CHARS: 5,\n    DRAW_IMAGE: 6,\n    END_GEOMETRY: 7,\n    
 FILL: 8,\n    MOVE_TO_LINE_TO: 9,\n    SET_FILL_STYLE: 10,\n    SET_STROKE_STYLE: 11,\n    STROKE: 12,\n};\n/**\n * @type {Array<Instruction>}\n */\nexport var fillInstruction = [Instruction.FILL];\n/**\n * @type {Array<Instruction>}\n */\nexport var strokeInstruction = [Instruction.STROKE];\n/**\n * @type {Array<Instruction>}\n */\nexport var beginPathInstruction = [Instruction.BEGIN_PATH];\n/**\n * @type {Array<Instruction>}\n */\nexport var closePathInstruction = [Instruction.CLOSE_PATH];\nexport default Instruction;\n//# sourceMappingURL=Instruction.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStat
 ics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/Builder\n */\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport Relationship from '../../extent/Relationship.js';\nimport VectorContext from '../VectorContext.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { buffer, clone, coordinateRelationship } from '../../extent.js';\nimport { defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../canvas.js';\nimport { equals, reverseSubArray } from '../../array.js';\nimport { inflateCoordinates, inflateCoordinatesArray, inflateMultiCoordinatesArray, } from '../../geom/flat/inflate.js';\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} i
 nstructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, import(\"../canvas.js\").TextState>} [textStates] The text states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").StrokeState>} [strokeStates] The stroke states (decluttering).\n */\nvar CanvasBuilder = /** @class */ (function (_super) {\n    __extends(CanvasBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(thi
 s) || this;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.tolerance = tolerance;\n        /**\n         * @protected\n         * @const\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.maxExtent = maxExtent;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.pixelRatio = pixelRatio;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.maxLineWidth = 0;\n        /**\n         * @protected\n         * @const\n         * @type {number}\n         */\n        _this.resolution = resolution;\n        /**\n         * @private\n         * @type {Array<*>}\n         */\n        _this.beginGeometryInstruction1_ = null;\n        /**\n         * @private\n         * @type {Array<*>}\n         */\n        _this.beginGeometryInstruction2_ = null;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n        
  */\n        _this.bufferedMaxExtent_ = null;\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        _this.instructions = [];\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        _this.coordinates = [];\n        /**\n         * @private\n         * @type {import(\"../../coordinate.js\").Coordinate}\n         */\n        _this.tmpCoordinate_ = [];\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        _this.hitDetectionInstructions = [];\n        /**\n         * @protected\n         * @type {import(\"../canvas.js\").FillStrokeState}\n         */\n        _this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {Array<number>} dashArray Dash array.\n     * @return {Array<number>} Dash array with pixel ratio applied\n     */\n    CanvasBuilder.prototype.applyPixelRatio = function (dashArray) {\
 n        var pixelRatio = this.pixelRatio;\n        return pixelRatio == 1\n            ? dashArray\n            : dashArray.map(function (dash) {\n                return dash * pixelRatio;\n            });\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @param {boolean} closed Last input coordinate equals first.\n     * @param {boolean} skipFirst Skip first coordinate.\n     * @protected\n     * @return {number} My end.\n     */\n    CanvasBuilder.prototype.appendFlatCoordinates = function (flatCoordinates, offset, end, stride, closed, skipFirst) {\n        var myEnd = this.coordinates.length;\n        var extent = this.getBufferedMaxExtent();\n        if (skipFirst) {\n            offset += stride;\n        }\n        var lastXCoord = flatCoordinates[offset];\n        var lastYCoord = flatCoordinates[offset + 1];\n        var next
 Coord = this.tmpCoordinate_;\n        var skipped = true;\n        var i, lastRel, nextRel;\n        for (i = offset + stride; i < end; i += stride) {\n            nextCoord[0] = flatCoordinates[i];\n            nextCoord[1] = flatCoordinates[i + 1];\n            nextRel = coordinateRelationship(extent, nextCoord);\n            if (nextRel !== lastRel) {\n                if (skipped) {\n                    this.coordinates[myEnd++] = lastXCoord;\n                    this.coordinates[myEnd++] = lastYCoord;\n                }\n                this.coordinates[myEnd++] = nextCoord[0];\n                this.coordinates[myEnd++] = nextCoord[1];\n                skipped = false;\n            }\n            else if (nextRel === Relationship.INTERSECTING) {\n                this.coordinates[myEnd++] = nextCoord[0];\n                this.coordinates[myEnd++] = nextCoord[1];\n                skipped = false;\n            }\n            else {\n                skipped = true;\n            }\n 
            lastXCoord = nextCoord[0];\n            lastYCoord = nextCoord[1];\n            lastRel = nextRel;\n        }\n        // Last coordinate equals first or only one point to append:\n        if ((closed && skipped) || i === offset + stride) {\n            this.coordinates[myEnd++] = lastXCoord;\n            this.coordinates[myEnd++] = lastYCoord;\n        }\n        return myEnd;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @param {Array<number>} builderEnds Builder ends.\n     * @return {number} Offset.\n     */\n    CanvasBuilder.prototype.drawCustomCoordinates_ = function (flatCoordinates, offset, ends, stride, builderEnds) {\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var builderEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, f
 alse, false);\n            builderEnds.push(builderEnd);\n            offset = end;\n        }\n        return offset;\n    };\n    /**\n     * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {Function} renderer Renderer.\n     */\n    CanvasBuilder.prototype.drawCustom = function (geometry, feature, renderer) {\n        this.beginGeometry(geometry, feature);\n        var type = geometry.getType();\n        var stride = geometry.getStride();\n        var builderBegin = this.coordinates.length;\n        var flatCoordinates, builderEnd, builderEnds, builderEndss;\n        var offset;\n        if (type == GeometryType.MULTI_POLYGON) {\n            flatCoordinates = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getOrientedFlatCoordinates();\n            builderEndss = [];\n            var endss = /** @type {import(\"../../geom/MultiPolygon.js\
 ").default} */ (geometry).getEndss();\n            offset = 0;\n            for (var i = 0, ii = endss.length; i < ii; ++i) {\n                var myEnds = [];\n                offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);\n                builderEndss.push(myEnds);\n            }\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEndss,\n                geometry,\n                renderer,\n                inflateMultiCoordinatesArray,\n            ]);\n        }\n        else if (type == GeometryType.POLYGON ||\n            type == GeometryType.MULTI_LINE_STRING) {\n            builderEnds = [];\n            flatCoordinates =\n                type == GeometryType.POLYGON\n                    ? /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates()\n                    : geometry.getFlatCoordinates();\n            
 offset = this.drawCustomCoordinates_(flatCoordinates, 0, \n            /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(), stride, builderEnds);\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnds,\n                geometry,\n                renderer,\n                inflateCoordinatesArray,\n            ]);\n        }\n        else if (type == GeometryType.LINE_STRING ||\n            type == GeometryType.MULTI_POINT) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            builderEnd = this.appendFlatCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnd,\n                geometry,\n                renderer,\n                inflateCoord
 inates,\n            ]);\n        }\n        else if (type == GeometryType.POINT) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n            builderEnd = this.coordinates.length;\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnd,\n                geometry,\n                renderer,\n            ]);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @protected\n     * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasBuilder.prototype.beginGeometry = function (geometry, feature) {\n        var extent = geometry.getExtent();\n        this.beginGeometryInstruction1_ = [\n            CanvasInstruction.BEGIN_GEOMETRY,\n            featur
 e,\n            0,\n            extent,\n        ];\n        this.instructions.push(this.beginGeometryInstruction1_);\n        this.beginGeometryInstruction2_ = [\n            CanvasInstruction.BEGIN_GEOMETRY,\n            feature,\n            0,\n            extent,\n        ];\n        this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n    };\n    /**\n     * @return {SerializableInstructions} the serializable instructions.\n     */\n    CanvasBuilder.prototype.finish = function () {\n        return {\n            instructions: this.instructions,\n            hitDetectionInstructions: this.hitDetectionInstructions,\n            coordinates: this.coordinates,\n        };\n    };\n    /**\n     * Reverse the hit detection instructions.\n     */\n    CanvasBuilder.prototype.reverseHitDetectionInstructions = function () {\n        var hitDetectionInstructions = this.hitDetectionInstructions;\n        // step 1 - reverse array\n        hitDetectionInstructions.rever
 se();\n        // step 2 - reverse instructions within geometry blocks\n        var i;\n        var n = hitDetectionInstructions.length;\n        var instruction;\n        var type;\n        var begin = -1;\n        for (i = 0; i < n; ++i) {\n            instruction = hitDetectionInstructions[i];\n            type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n            if (type == CanvasInstruction.END_GEOMETRY) {\n                begin = i;\n            }\n            else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n                instruction[2] = i;\n                reverseSubArray(this.hitDetectionInstructions, begin, i);\n                begin = -1;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    CanvasBuilder.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) 
 {\n        var state = this.state;\n        if (fillStyle) {\n            var fillStyleColor = fillStyle.getColor();\n            state.fillStyle = asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle);\n        }\n        else {\n            state.fillStyle = undefined;\n        }\n        if (strokeStyle) {\n            var strokeStyleColor = strokeStyle.getColor();\n            state.strokeStyle = asColorLike(strokeStyleColor ? strokeStyleColor : defaultStrokeStyle);\n            var strokeStyleLineCap = strokeStyle.getLineCap();\n            state.lineCap =\n                strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n            var strokeStyleLineDash = strokeStyle.getLineDash();\n            state.lineDash = strokeStyleLineDash\n                ? strokeStyleLineDash.slice()\n                : defaultLineDash;\n            var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n            state.lineDashOffset = strokeStyleLineDa
 shOffset\n                ? strokeStyleLineDashOffset\n                : defaultLineDashOffset;\n            var strokeStyleLineJoin = strokeStyle.getLineJoin();\n            state.lineJoin =\n                strokeStyleLineJoin !== undefined\n                    ? strokeStyleLineJoin\n                    : defaultLineJoin;\n            var strokeStyleWidth = strokeStyle.getWidth();\n            state.lineWidth =\n                strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n            var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n            state.miterLimit =\n                strokeStyleMiterLimit !== undefined\n                    ? strokeStyleMiterLimit\n                    : defaultMiterLimit;\n            if (state.lineWidth > this.maxLineWidth) {\n                this.maxLineWidth = state.lineWidth;\n                // invalidate the buffered max extent cache\n                this.bufferedMaxExtent_ = null;\n            }\n        }\n    
     else {\n            state.strokeStyle = undefined;\n            state.lineCap = undefined;\n            state.lineDash = null;\n            state.lineDashOffset = undefined;\n            state.lineJoin = undefined;\n            state.lineWidth = undefined;\n            state.miterLimit = undefined;\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @return {Array<*>} Fill instruction.\n     */\n    CanvasBuilder.prototype.createFill = function (state) {\n        var fillStyle = state.fillStyle;\n        /** @type {Array<*>} */\n        var fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n        if (typeof fillStyle !== 'string') {\n            // Fill is a pattern or gradient - align it!\n            fillInstruction.push(true);\n        }\n        return fillInstruction;\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     */\n    CanvasBuilder.prototype.applyStroke
  = function (state) {\n        this.instructions.push(this.createStroke(state));\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @return {Array<*>} Stroke instruction.\n     */\n    CanvasBuilder.prototype.createStroke = function (state) {\n        return [\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth * this.pixelRatio,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            this.applyPixelRatio(state.lineDash),\n            state.lineDashOffset * this.pixelRatio,\n        ];\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n     */\n    CanvasBuilder.prototype.updateFillStyle = function (state, createFill) {\n        var fillStyle = state.fillStyle;\n        if (typeof 
 fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n            if (fillStyle !== undefined) {\n                this.instructions.push(createFill.call(this, state));\n            }\n            state.currentFillStyle = fillStyle;\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n     */\n    CanvasBuilder.prototype.updateStrokeStyle = function (state, applyStroke) {\n        var strokeStyle = state.strokeStyle;\n        var lineCap = state.lineCap;\n        var lineDash = state.lineDash;\n        var lineDashOffset = state.lineDashOffset;\n        var lineJoin = state.lineJoin;\n        var lineWidth = state.lineWidth;\n        var miterLimit = state.miterLimit;\n        if (state.currentStrokeStyle != strokeStyle ||\n            state.currentLineCap != lineCap ||\n            (lineDash != state.curren
 tLineDash &&\n                !equals(state.currentLineDash, lineDash)) ||\n            state.currentLineDashOffset != lineDashOffset ||\n            state.currentLineJoin != lineJoin ||\n            state.currentLineWidth != lineWidth ||\n            state.currentMiterLimit != miterLimit) {\n            if (strokeStyle !== undefined) {\n                applyStroke.call(this, state);\n            }\n            state.currentStrokeStyle = strokeStyle;\n            state.currentLineCap = lineCap;\n            state.currentLineDash = lineDash;\n            state.currentLineDashOffset = lineDashOffset;\n            state.currentLineJoin = lineJoin;\n            state.currentLineWidth = lineWidth;\n            state.currentMiterLimit = miterLimit;\n        }\n    };\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasBuilder.prototype.endGeometry = function (feature) {\n        this.beginGeometryInstruction1_[2] = this.instructions.leng
 th;\n        this.beginGeometryInstruction1_ = null;\n        this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n        this.beginGeometryInstruction2_ = null;\n        var endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n        this.instructions.push(endGeometryInstruction);\n        this.hitDetectionInstructions.push(endGeometryInstruction);\n    };\n    /**\n     * Get the buffered rendering extent.  Rendering will be clipped to the extent\n     * provided to the constructor.  To account for symbolizers that may intersect\n     * this extent, we calculate a buffered extent (e.g. based on stroke width).\n     * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n     * @protected\n     */\n    CanvasBuilder.prototype.getBufferedMaxExtent = function () {\n        if (!this.bufferedMaxExtent_) {\n            this.bufferedMaxExtent_ = clone(this.maxExtent);\n            if (this.maxLineWidth > 0) {\n             
    var width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n                buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n            }\n        }\n        return this.bufferedMaxExtent_;\n    };\n    return CanvasBuilder;\n}(VectorContext));\nexport default CanvasBuilder;\n//# sourceMappingURL=Builder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport C
 anvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nvar CanvasImageBuilder = /** @class */ (function (_super) {\n    __extends(CanvasImageBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasImageBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").DeclutterGroups}\n         */\n        _this.declutterGroups_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.hitDetectionImage_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement
 |HTMLImageElement}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.imagePixelRatio_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.anchorX_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.anchorY_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.height_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.opacity_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.originX_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.originY_ = undefined;\n        /**\n         * @private\n         * @type {boolean|undefined}\n        
  */\n        _this.rotateWithView_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.rotation_ = undefined;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size|undefined}\n         */\n        _this.scale_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.width_ = undefined;\n        return _this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} My end.\n     */\n    CanvasImageBuilder.prototype.drawCoordinates_ = function (flatCoordinates, offset, end, stride) {\n        return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n    };\n    /**\n     * @param {import(\"../../geom/Point.js\").default|import(\"../Feature
 .js\").default} pointGeometry Point geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasImageBuilder.prototype.drawPoint = function (pointGeometry, feature) {\n        if (!this.image_) {\n            return;\n        }\n        this.beginGeometry(pointGeometry, feature);\n        var flatCoordinates = pointGeometry.getFlatCoordinates();\n        var stride = pointGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        var myEnd = this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n        this.instructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.image_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            this.declutterGroups_,\n            Math.ceil(this.height_ * this.imagePi
 xelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.hitDetectionImage_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            this.declutterGroups_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n           
  this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n        ]);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasImageBuilder.prototype.drawMultiPoint = function (multiPointGeometry, feature) {\n        if (!this.image_) {\n            return;\n        }\n        this.beginGeometry(multiPointGeometry, feature);\n        var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n        var stride = multiPointGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        var myEnd = this.drawCoordinates_(flatCoordinates, 0, 
 flatCoordinates.length, stride);\n        this.instructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.image_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            this.declutterGroups_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n  
           this.hitDetectionImage_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            this.declutterGroups_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n        ]);\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasImageBuilder.prototype.finish = function () {\n        this.reverseHitDetectionInstructions();\n        /
 / FIXME this doesn't really protect us against further calls to draw*Geometry\n        this.anchorX_ = undefined;\n        this.anchorY_ = undefined;\n        this.hitDetectionImage_ = null;\n        this.image_ = null;\n        this.imagePixelRatio_ = undefined;\n        this.height_ = undefined;\n        this.scale_ = undefined;\n        this.opacity_ = undefined;\n        this.originX_ = undefined;\n        this.originY_ = undefined;\n        this.rotateWithView_ = undefined;\n        this.rotation_ = undefined;\n        this.width_ = undefined;\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroups Declutter.\n     */\n    CanvasImageBuilder.prototype.setImageStyle = function (imageStyle, declutterGroups) {\n        var anchor = imageStyle.getAnchor();\n        var size = imageStyle.getSize();\n        var hitDet
 ectionImage = imageStyle.getHitDetectionImage(this.pixelRatio);\n        var image = imageStyle.getImage(this.pixelRatio);\n        var origin = imageStyle.getOrigin();\n        this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n        this.anchorX_ = anchor[0];\n        this.anchorY_ = anchor[1];\n        this.declutterGroups_ = declutterGroups;\n        this.hitDetectionImage_ = hitDetectionImage;\n        this.image_ = image;\n        this.height_ = size[1];\n        this.opacity_ = imageStyle.getOpacity();\n        this.originX_ = origin[0];\n        this.originY_ = origin[1];\n        this.rotateWithView_ = imageStyle.getRotateWithView();\n        this.rotation_ = imageStyle.getRotation();\n        this.scale_ = imageStyle.getScaleArray();\n        this.width_ = size[0];\n    };\n    return CanvasImageBuilder;\n}(CanvasBuilder));\nexport default CanvasImageBuilder;\n//# sourceMappingURL=ImageBuilder.js.map","var __extends = (this && this.__extends) || (functio
 n () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, { beginPathInstruction, strokeInstruction, } from './Instruction.js';\nvar CanvasLineStringBuilder = /** @class */ (function (_super) {\n    __extends(CanvasLineStringBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     *
  @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasLineStringBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        return _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} end.\n     */\n    CanvasLineStringBuilder.prototype.drawFlatCoordinates_ = function (flatCoordinates, offset, end, stride) {\n        var myBegin = this.coordinates.length;\n        var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n        var moveToLineToInstruction = [\n            CanvasInstruction.MOVE_TO_LINE_TO,\n            myBegin,\n            myEnd,\n        ];\n        this.instructions.push(moveToLineToInstruction);\n        this.h
 itDetectionInstructions.push(moveToLineToInstruction);\n        return end;\n    };\n    /**\n     * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasLineStringBuilder.prototype.drawLineString = function (lineStringGeometry, feature) {\n        var state = this.state;\n        var strokeStyle = state.strokeStyle;\n        var lineWidth = state.lineWidth;\n        if (strokeStyle === undefined || lineWidth === undefined) {\n            return;\n        }\n        this.updateStrokeStyle(state, this.applyStroke);\n        this.beginGeometry(lineStringGeometry, feature);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n  
           state.lineDash,\n            state.lineDashOffset,\n        ], beginPathInstruction);\n        var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n        var stride = lineStringGeometry.getStride();\n        this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n        this.hitDetectionInstructions.push(strokeInstruction);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasLineStringBuilder.prototype.drawMultiLineString = function (multiLineStringGeometry, feature) {\n        var state = this.state;\n        var strokeStyle = state.strokeStyle;\n        var lineWidth = state.lineWidth;\n        if (strokeStyle === undefined || lineWidth === undefined) {\n            return;\n        }\n     
    this.updateStrokeStyle(state, this.applyStroke);\n        this.beginGeometry(multiLineStringGeometry, feature);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            state.lineDash,\n            state.lineDashOffset,\n        ], beginPathInstruction);\n        var ends = multiLineStringGeometry.getEnds();\n        var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n        var stride = multiLineStringGeometry.getStride();\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            offset = this.drawFlatCoordinates_(flatCoordinates, offset, \n            /** @type {number} */ (ends[i]), stride);\n        }\n        this.hitDetectionInstructions.push(strokeInstruction);\n        this.endGeometry(feature);\n    };\n    /**\n     *
  @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasLineStringBuilder.prototype.finish = function () {\n        var state = this.state;\n        if (state.lastStroke != undefined &&\n            state.lastStroke != this.coordinates.length) {\n            this.instructions.push(strokeInstruction);\n        }\n        this.reverseHitDetectionInstructions();\n        this.state = null;\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     */\n    CanvasLineStringBuilder.prototype.applyStroke = function (state) {\n        if (state.lastStroke != undefined &&\n            state.lastStroke != this.coordinates.length) {\n            this.instructions.push(strokeInstruction);\n            state.lastStroke = this.coordinates.length;\n        }\n        state.lastStroke = 0;\n        _super.prototype.applyStroke.call(this, state);\n        thi
 s.instructions.push(beginPathInstruction);\n    };\n    return CanvasLineStringBuilder;\n}(CanvasBuilder));\nexport default CanvasLineStringBuilder;\n//# sourceMappingURL=LineStringBuilder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, { beginPathInstruction, closePathInstruction, fillInstruction, strokeInstruct
 ion, } from './Instruction.js';\nimport { defaultFillStyle } from '../canvas.js';\nimport { snap } from '../../geom/flat/simplify.js';\nvar CanvasPolygonBuilder = /** @class */ (function (_super) {\n    __extends(CanvasPolygonBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasPolygonBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        return _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} End.\n     */\n    CanvasPolygonBuilder.prototype.drawFlatCoordinatess_ = function (flatCoordinates, o
 ffset, ends, stride) {\n        var state = this.state;\n        var fill = state.fillStyle !== undefined;\n        var stroke = state.strokeStyle !== undefined;\n        var numEnds = ends.length;\n        this.instructions.push(beginPathInstruction);\n        this.hitDetectionInstructions.push(beginPathInstruction);\n        for (var i = 0; i < numEnds; ++i) {\n            var end = ends[i];\n            var myBegin = this.coordinates.length;\n            var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, true, !stroke);\n            var moveToLineToInstruction = [\n                CanvasInstruction.MOVE_TO_LINE_TO,\n                myBegin,\n                myEnd,\n            ];\n            this.instructions.push(moveToLineToInstruction);\n            this.hitDetectionInstructions.push(moveToLineToInstruction);\n            if (stroke) {\n                // Performance optimization: only call closePath() when we have a stroke.\n                // Other
 wise the ring is closed already (see appendFlatCoordinates above).\n                this.instructions.push(closePathInstruction);\n                this.hitDetectionInstructions.push(closePathInstruction);\n            }\n            offset = end;\n        }\n        if (fill) {\n            this.instructions.push(fillInstruction);\n            this.hitDetectionInstructions.push(fillInstruction);\n        }\n        if (stroke) {\n            this.instructions.push(strokeInstruction);\n            this.hitDetectionInstructions.push(strokeInstruction);\n        }\n        return offset;\n    };\n    /**\n     * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawCircle = function (circleGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if
  (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(circleGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var flatCoordinates = circleGeometry.getFlatCoordinates();\n        var stride = circleGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        this.appe
 ndFlatCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n        var circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n        this.instructions.push(beginPathInstruction, circleInstruction);\n        this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n        if (state.fillStyle !== undefined) {\n            this.instructions.push(fillInstruction);\n            this.hitDetectionInstructions.push(fillInstruction);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.instructions.push(strokeInstruction);\n            this.hitDetectionInstructions.push(strokeInstruction);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawPolygon = function
  (polygonGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(polygonGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var ends = p
 olygonGeometry.getEnds();\n        var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n        var stride = polygonGeometry.getStride();\n        this.drawFlatCoordinatess_(flatCoordinates, 0, \n        /** @type {Array<number>} */ (ends), stride);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawMultiPolygon = function (multiPolygonGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(multiPolygonGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitD
 etectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var endss = multiPolygonGeometry.getEndss();\n        var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n        var stride = multiPolygonGeometry.getStride();\n        var offset = 0;\n        for (var i = 0, ii = endss.length; i < ii; ++i) {\n            offset = this.drawFlatCoordinatess_(flatCoordinates, offset, endss[i], stride);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n
      * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasPolygonBuilder.prototype.finish = function () {\n        this.reverseHitDetectionInstructions();\n        this.state = null;\n        // We want to preserve topology when drawing polygons.  Polygons are\n        // simplified using quantization and point elimination. However, we might\n        // have received a mix of quantized and non-quantized geometries, so ensure\n        // that all are quantized by quantizing all coordinates in the batch.\n        var tolerance = this.tolerance;\n        if (tolerance !== 0) {\n            var coordinates = this.coordinates;\n            for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n                coordinates[i] = snap(coordinates[i], tolerance);\n            }\n        }\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @private\n     */\n    CanvasPolygonBuilder.prototype.setFillStrokeS
 tyles_ = function () {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        if (fillStyle !== undefined) {\n            this.updateFillStyle(state, this.createFill);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.updateStrokeStyle(state, this.applyStroke);\n        }\n    };\n    return CanvasPolygonBuilder;\n}(CanvasBuilder));\nexport default CanvasPolygonBuilder;\n//# sourceMappingURL=PolygonBuilder.js.map","/**\n * @module ol/geom/flat/straightchunk\n */\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n    var chunkStart = offset;\n    var 
 chunkEnd = offset;\n    var chunkM = 0;\n    var m = 0;\n    var start = offset;\n    var acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n    for (i = offset; i < end; i += stride) {\n        var x2 = flatCoordinates[i];\n        var y2 = flatCoordinates[i + 1];\n        if (x1 !== undefined) {\n            x23 = x2 - x1;\n            y23 = y2 - y1;\n            m23 = Math.sqrt(x23 * x23 + y23 * y23);\n            if (x12 !== undefined) {\n                m += m12;\n                acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n                if (acos > maxAngle) {\n                    if (m > chunkM) {\n                        chunkM = m;\n                        chunkStart = start;\n                        chunkEnd = i;\n                    }\n                    m = 0;\n                    start = i - stride;\n                }\n            }\n            m12 = m23;\n            x12 = x23;\n            y12 = y23;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n
     m += m23;\n    return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n//# sourceMappingURL=straightchunk.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/TextBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport TextPlacement from '../../style/TextPlacement.js';\nimport { asCol
 orLike } from '../../colorlike.js';\nimport { defaultFillStyle, defaultFont, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultPadding, defaultStrokeStyle, defaultTextAlign, defaultTextBaseline, registerFont, } from '../canvas.js';\nimport { getUid } from '../../util.js';\nimport { intersects } from '../../extent.js';\nimport { matchingChunk } from '../../geom/flat/straightchunk.js';\n/**\n * @const\n * @enum {number}\n */\nexport var TEXT_ALIGN = {\n    'left': 0,\n    'end': 0,\n    'center': 0.5,\n    'right': 1,\n    'start': 1,\n    'top': 0,\n    'middle': 0.5,\n    'hanging': 0.2,\n    'alphabetic': 0.8,\n    'ideographic': 0.8,\n    'bottom': 1,\n};\nvar CanvasTextBuilder = /** @class */ (function (_super) {\n    __extends(CanvasTextBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resol
 ution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasTextBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").DeclutterGroups}\n         */\n        _this.declutterGroups_;\n        /**\n         * @private\n         * @type {Array<HTMLCanvasElement>}\n         */\n        _this.labels_ = null;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = '';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetY_ = 0;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        _this.textRotateWithView_ = undefined;\n        /**\n         * @private\n 
         * @type {number}\n         */\n        _this.textRotation_ = 0;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.textFillState_ = null;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").FillState>}\n         */\n        _this.fillStates = {};\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.textStrokeState_ = null;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n         */\n        _this.strokeStates = {};\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").TextState}\n         */\n        _this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").TextState>}\n         */\n        _this.textStates = {};\n        /**\n         * @private\n         * @type {string
 }\n         */\n        _this.textKey_ = '';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.fillKey_ = '';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.strokeKey_ = '';\n        return _this;\n    }\n    /**\n     * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasTextBuilder.prototype.finish = function () {\n        var instructions = _super.prototype.finish.call(this);\n        instructions.textStates = this.textStates;\n        instructions.fillStates = this.fillStates;\n        instructions.strokeStates = this.strokeStates;\n        return instructions;\n    };\n    /**\n     * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasTextBuilder.prototype.drawText = function (geometry, f
 eature) {\n        var fillState = this.textFillState_;\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n            return;\n        }\n        var begin = this.coordinates.length;\n        var geometryType = geometry.getType();\n        var flatCoordinates = null;\n        var end = 2;\n        var stride = 2;\n        var i, ii;\n        if (textState.placement === TextPlacement.LINE) {\n            if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n                return;\n            }\n            var ends = void 0;\n            flatCoordinates = geometry.getFlatCoordinates();\n            stride = geometry.getStride();\n            if (geometryType == GeometryType.LINE_STRING) {\n                ends = [flatCoordinates.length];\n            }\n            else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n                ends
  = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds();\n            }\n            else if (geometryType == GeometryType.POLYGON) {\n                ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n                    .getEnds()\n                    .slice(0, 1);\n            }\n            else if (geometryType == GeometryType.MULTI_POLYGON) {\n                var endss = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n                ends = [];\n                for (i = 0, ii = endss.length; i < ii; ++i) {\n                    ends.push(endss[i][0]);\n                }\n            }\n            this.beginGeometry(geometry, feature);\n            var textAlign = textState.textAlign;\n            var flatOffset = 0;\n            var flatEnd = void 0;\n            for (var o = 0, oo = ends.length; o < oo; ++o) {\n                if (textAlign == undefined) {\n                    var 
 range = matchingChunk(textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);\n                    flatOffset = range[0];\n                    flatEnd = range[1];\n                }\n                else {\n                    flatEnd = ends[o];\n                }\n                for (i = flatOffset; i < flatEnd; i += stride) {\n                    this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n                }\n                end = this.coordinates.length;\n                flatOffset = ends[o];\n                var declutterGroup = this.declutterGroups_\n                    ? o === 0\n                        ? this.declutterGroups_[0]\n                        : [].concat(this.declutterGroups_[0])\n                    : null;\n                this.drawChars_(begin, end, declutterGroup);\n                begin = end;\n            }\n            this.endGeometry(feature);\n        }\n        else {\n            var geometryWidths = null;\n           
  if (!textState.overflow) {\n                geometryWidths = [];\n            }\n            switch (geometryType) {\n                case GeometryType.POINT:\n                case GeometryType.MULTI_POINT:\n                    flatCoordinates = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry).getFlatCoordinates();\n                    end = flatCoordinates.length;\n                    break;\n                case GeometryType.LINE_STRING:\n                    flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n                    break;\n                case GeometryType.CIRCLE:\n                    flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n                    break;\n                case GeometryType.MULTI_LINE_STRING:\n                    flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoin
 ts();\n                    end = flatCoordinates.length;\n                    break;\n                case GeometryType.POLYGON:\n                    flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n                    if (!textState.overflow) {\n                        geometryWidths.push(flatCoordinates[2] / this.resolution);\n                    }\n                    stride = 3;\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    var interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n                    flatCoordinates = [];\n                    for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n                        if (!textState.overflow) {\n                            geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n                        }\n                        flatCoordinate
 s.push(interiorPoints[i], interiorPoints[i + 1]);\n                    }\n                    end = flatCoordinates.length;\n                    if (end == 0) {\n                        return;\n                    }\n                    break;\n                default:\n            }\n            end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);\n            this.saveTextStates_();\n            if (textState.backgroundFill || textState.backgroundStroke) {\n                this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);\n                if (textState.backgroundFill) {\n                    this.updateFillStyle(this.state, this.createFill);\n                    this.hitDetectionInstructions.push(this.createFill(this.state));\n                }\n                if (textState.backgroundStroke) {\n                    this.updateStrokeStyle(this.state, this.applyStroke);\n                    this.hitDetectionInstructions.push(t
 his.createStroke(this.state));\n                }\n            }\n            this.beginGeometry(geometry, feature);\n            // adjust padding for negative scale\n            var padding = textState.padding;\n            if (padding != defaultPadding &&\n                (textState.scale[0] < 0 || textState.scale[1] < 0)) {\n                var p0 = textState.padding[0];\n                var p1 = textState.padding[1];\n                var p2 = textState.padding[2];\n                var p3 = textState.padding[3];\n                if (textState.scale[0] < 0) {\n                    p1 = -p1;\n                    p3 = -p3;\n                }\n                if (textState.scale[1] < 0) {\n                    p0 = -p0;\n                    p2 = -p2;\n                }\n                padding = [p0, p1, p2, p3];\n            }\n            // The image is unknown at this stage so we pass null; it will be computed at render time.\n            // For clarity, we pass NaN for offsetX, o
 ffsetY, width and height, which will be computed at\n            // render time.\n            var pixelRatio_1 = this.pixelRatio;\n            this.instructions.push([\n                CanvasInstruction.DRAW_IMAGE,\n                begin,\n                end,\n                null,\n                NaN,\n                NaN,\n                this.declutterGroups_,\n                NaN,\n                1,\n                0,\n                0,\n                this.textRotateWithView_,\n                this.textRotation_,\n                [1, 1],\n                NaN,\n                padding == defaultPadding\n                    ? defaultPadding\n                    : padding.map(function (p) {\n                        return p * pixelRatio_1;\n                    }),\n                !!textState.backgroundFill,\n                !!textState.backgroundStroke,\n                this.text_,\n                this.textKey_,\n                this.strokeKey_,\n                this.fillK
 ey_,\n                this.textOffsetX_,\n                this.textOffsetY_,\n                geometryWidths,\n            ]);\n            var scale = 1 / pixelRatio_1;\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.DRAW_IMAGE,\n                begin,\n                end,\n                null,\n                NaN,\n                NaN,\n                this.declutterGroups_,\n                NaN,\n                1,\n                0,\n                0,\n                this.textRotateWithView_,\n                this.textRotation_,\n                [scale, scale],\n                NaN,\n                padding,\n                !!textState.backgroundFill,\n                !!textState.backgroundStroke,\n                this.text_,\n                this.textKey_,\n                this.strokeKey_,\n                this.fillKey_,\n                this.textOffsetX_,\n                this.textOffsetY_,\n                geometryWidths,\n         
    ]);\n            this.endGeometry(feature);\n        }\n    };\n    /**\n     * @private\n     */\n    CanvasTextBuilder.prototype.saveTextStates_ = function () {\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        var fillState = this.textFillState_;\n        var strokeKey = this.strokeKey_;\n        if (strokeState) {\n            if (!(strokeKey in this.strokeStates)) {\n                this.strokeStates[strokeKey] = {\n                    strokeStyle: strokeState.strokeStyle,\n                    lineCap: strokeState.lineCap,\n                    lineDashOffset: strokeState.lineDashOffset,\n                    lineWidth: strokeState.lineWidth,\n                    lineJoin: strokeState.lineJoin,\n                    miterLimit: strokeState.miterLimit,\n                    lineDash: strokeState.lineDash,\n                };\n            }\n        }\n        var textKey = this.textKey_;\n        if (!(textKey in this.textStates)
 ) {\n            this.textStates[textKey] = {\n                font: textState.font,\n                textAlign: textState.textAlign || defaultTextAlign,\n                textBaseline: textState.textBaseline || defaultTextBaseline,\n                scale: textState.scale,\n            };\n        }\n        var fillKey = this.fillKey_;\n        if (fillState) {\n            if (!(fillKey in this.fillStates)) {\n                this.fillStates[fillKey] = {\n                    fillStyle: fillState.fillStyle,\n                };\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {number} begin Begin.\n     * @param {number} end End.\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n     */\n    CanvasTextBuilder.prototype.drawChars_ = function (begin, end, declutterGroup) {\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        var strokeKey = this.strokeKey_;\n        var tex
 tKey = this.textKey_;\n        var fillKey = this.fillKey_;\n        this.saveTextStates_();\n        var pixelRatio = this.pixelRatio;\n        var baseline = TEXT_ALIGN[textState.textBaseline];\n        var offsetY = this.textOffsetY_ * pixelRatio;\n        var text = this.text_;\n        var strokeWidth = strokeState\n            ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n            : 0;\n        this.instructions.push([\n            CanvasInstruction.DRAW_CHARS,\n            begin,\n            end,\n            baseline,\n            declutterGroup,\n            textState.overflow,\n            fillKey,\n            textState.maxAngle,\n            pixelRatio,\n            offsetY,\n            strokeKey,\n            strokeWidth * pixelRatio,\n            text,\n            textKey,\n            1,\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_CHARS,\n            begin,\n            end,\n            baseline
 ,\n            declutterGroup,\n            textState.overflow,\n            fillKey,\n            textState.maxAngle,\n            1,\n            offsetY,\n            strokeKey,\n            strokeWidth,\n            text,\n            textKey,\n            1 / pixelRatio,\n        ]);\n    };\n    /**\n     * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n     * @param {import(\"../canvas.js\").DeclutterGroups} declutterGroups Declutter.\n     */\n    CanvasTextBuilder.prototype.setTextStyle = function (textStyle, declutterGroups) {\n        var textState, fillState, strokeState;\n        if (!textStyle) {\n            this.text_ = '';\n        }\n        else {\n            this.declutterGroups_ = declutterGroups;\n            var textFillStyle = textStyle.getFill();\n            if (!textFillStyle) {\n                fillState = null;\n                this.textFillState_ = fillState;\n            }\n            else {\n                fillState = this.
 textFillState_;\n                if (!fillState) {\n                    fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n                    this.textFillState_ = fillState;\n                }\n                fillState.fillStyle = asColorLike(textFillStyle.getColor() || defaultFillStyle);\n            }\n            var textStrokeStyle = textStyle.getStroke();\n            if (!textStrokeStyle) {\n                strokeState = null;\n                this.textStrokeState_ = strokeState;\n            }\n            else {\n                strokeState = this.textStrokeState_;\n                if (!strokeState) {\n                    strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n                    this.textStrokeState_ = strokeState;\n                }\n                var lineDash = textStrokeStyle.getLineDash();\n                var lineDashOffset = textStrokeStyle.getLineDashOffset();\n                var lineWidth = textStrokeStyle.ge
 tWidth();\n                var miterLimit = textStrokeStyle.getMiterLimit();\n                strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n                strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n                strokeState.lineDashOffset =\n                    lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n                strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n                strokeState.lineWidth =\n                    lineWidth === undefined ? defaultLineWidth : lineWidth;\n                strokeState.miterLimit =\n                    miterLimit === undefined ? defaultMiterLimit : miterLimit;\n                strokeState.strokeStyle = asColorLike(textStrokeStyle.getColor() || defaultStrokeStyle);\n            }\n            textState = this.textState_;\n            var font = textStyle.getFont() || defaultFont;\n            registerFont(font);\n            var textS
 cale = textStyle.getScaleArray();\n            textState.overflow = textStyle.getOverflow();\n            textState.font = font;\n            textState.maxAngle = textStyle.getMaxAngle();\n            textState.placement = textStyle.getPlacement();\n            textState.textAlign = textStyle.getTextAlign();\n            textState.textBaseline =\n                textStyle.getTextBaseline() || defaultTextBaseline;\n            textState.backgroundFill = textStyle.getBackgroundFill();\n            textState.backgroundStroke = textStyle.getBackgroundStroke();\n            textState.padding = textStyle.getPadding() || defaultPadding;\n            textState.scale = textScale === undefined ? [1, 1] : textScale;\n            var textOffsetX = textStyle.getOffsetX();\n            var textOffsetY = textStyle.getOffsetY();\n            var textRotateWithView = textStyle.getRotateWithView();\n            var textRotation = textStyle.getRotation();\n            this.text_ = textStyle.getText() 
 || '';\n            this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n            this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n            this.textRotateWithView_ =\n                textRotateWithView === undefined ? false : textRotateWithView;\n            this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n            this.strokeKey_ = strokeState\n                ? (typeof strokeState.strokeStyle == 'string'\n                    ? strokeState.strokeStyle\n                    : getUid(strokeState.strokeStyle)) +\n                    strokeState.lineCap +\n                    strokeState.lineDashOffset +\n                    '|' +\n                    strokeState.lineWidth +\n                    strokeState.lineJoin +\n                    strokeState.miterLimit +\n                    '[' +\n                    strokeState.lineDash.join() +\n                    ']'\n                : '';\n            this.textKey_ =\n           
      textState.font +\n                    textState.scale +\n                    (textState.textAlign || '?') +\n                    (textState.textBaseline || '?');\n            this.fillKey_ = fillState\n                ? typeof fillState.fillStyle == 'string'\n                    ? fillState.fillStyle\n                    : '|' + getUid(fillState.fillStyle)\n                : '';\n        }\n    };\n    return CanvasTextBuilder;\n}(CanvasBuilder));\nexport default CanvasTextBuilder;\n//# sourceMappingURL=TextBuilder.js.map","/**\n * @module ol/render/canvas/BuilderGroup\n */\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n/**\n * @type {Object<import(\"./BuilderType\").default, typeof Builder>}\n */\nvar BATCH_CONSTRUCTORS = {\n    'Circle': PolygonBuilder,\n    'Default': Builder,\n    'Imag
 e': ImageBuilder,\n    'LineString': LineStringBuilder,\n    'Polygon': PolygonBuilder,\n    'Text': TextBuilder,\n};\nvar BuilderGroup = /** @class */ (function () {\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} declutter Decluttering enabled.\n     */\n    function BuilderGroup(tolerance, maxExtent, resolution, pixelRatio, declutter) {\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.declutter_ = declutter;\n        /**\n         * @type {import(\"../canvas.js\").DeclutterGroups}\n         * @private\n         */\n        this.declutterGroups_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.tolerance_ = tolerance;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Ex
 tent}\n         */\n        this.maxExtent_ = maxExtent;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.resolution_ = resolution;\n        /**\n         * @private\n         * @type {!Object<string, !Object<import(\"./BuilderType\").default, Builder>>}\n         */\n        this.buildersByZIndex_ = {};\n    }\n    /**\n     * @param {boolean} group Group with previous builder.\n     * @return {import(\"../canvas\").DeclutterGroups} The resulting instruction groups.\n     */\n    BuilderGroup.prototype.addDeclutter = function (group) {\n        /** @type {Array<*>} */\n        var declutter = null;\n        if (this.declutter_) {\n            if (group) {\n                declutter = this.declutterGroups_;\n                /** @type {number} */ (declutter[0][0])++;\n            }\n            else {\n                declutter = [[1
 ]];\n                this.declutterGroups_ = declutter;\n            }\n        }\n        return declutter;\n    };\n    /**\n     * @return {!Object<string, !Object<import(\"./BuilderType\").default, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n     */\n    BuilderGroup.prototype.finish = function () {\n        var builderInstructions = {};\n        for (var zKey in this.buildersByZIndex_) {\n            builderInstructions[zKey] = builderInstructions[zKey] || {};\n            var builders = this.buildersByZIndex_[zKey];\n            for (var builderKey in builders) {\n                var builderInstruction = builders[builderKey].finish();\n                builderInstructions[zKey][builderKey] = builderInstruction;\n            }\n        }\n        return builderInstructions;\n    };\n    /**\n     * @param {number|undefined} zIndex Z index.\n     * @param {import(\"./BuilderType.js\").default} builderType Replay type.\n     * @return {impor
 t(\"../VectorContext.js\").default} Replay.\n     */\n    BuilderGroup.prototype.getBuilder = function (zIndex, builderType) {\n        var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n        var replays = this.buildersByZIndex_[zIndexKey];\n        if (replays === undefined) {\n            replays = {};\n            this.buildersByZIndex_[zIndexKey] = replays;\n        }\n        var replay = replays[builderType];\n        if (replay === undefined) {\n            var Constructor = BATCH_CONSTRUCTORS[builderType];\n            replay = new Constructor(this.tolerance_, this.maxExtent_, this.resolution_, this.pixelRatio_);\n            replays[builderType] = replay;\n        }\n        return replay;\n    };\n    return BuilderGroup;\n}());\nexport default BuilderGroup;\n//# sourceMappingURL=BuilderGroup.js.map","/**\n * @module ol/geom/flat/textpath\n */\nimport { lerp } from '../../math.js';\nimport { rotate } from './transform.js';\n/**\n * @param {Array<number>} f
 latCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @return {Array<Array<*>>} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOn
 Path(flatCoordinates, offset, end, stride, text, startM, maxAngle, scale, measureAndCacheTextWidth, font, cache, rotation) {\n    var result = [];\n    // Keep text upright\n    var reverse;\n    if (rotation) {\n        var rotatedCoordinates = rotate(flatCoordinates, offset, end, stride, rotation, [flatCoordinates[offset], flatCoordinates[offset + 1]]);\n        reverse =\n            rotatedCoordinates[0] >\n                rotatedCoordinates[rotatedCoordinates.length - stride];\n    }\n    else {\n        reverse = flatCoordinates[offset] > flatCoordinates[end - stride];\n    }\n    var numChars = text.length;\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    offset += stride;\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    var segmentM = 0;\n    var segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n    var angleChanged = false;\n    var index, previousAngle;\n    for (var i = 0; i
  < numChars; ++i) {\n        index = reverse ? numChars - i - 1 : i;\n        var char = text[index];\n        var charLength = scale * measureAndCacheTextWidth(font, char, cache);\n        var charM = startM + charLength / 2;\n        while (offset < end - stride && segmentM + segmentLength < charM) {\n            x1 = x2;\n            y1 = y2;\n            offset += stride;\n            x2 = flatCoordinates[offset];\n            y2 = flatCoordinates[offset + 1];\n            segmentM += segmentLength;\n            segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n        }\n        var segmentPos = charM - segmentM;\n        var angle = Math.atan2(y2 - y1, x2 - x1);\n        if (reverse) {\n            angle += angle > 0 ? -Math.PI : Math.PI;\n        }\n        if (previousAngle !== undefined) {\n            var delta = angle - previousAngle;\n            angleChanged = angleChanged || delta !== 0;\n            delta +=\n                delta > Math.PI ? -2
  * Math.PI : delta < -Math.PI ? 2 * Math.PI : 0;\n            if (Math.abs(delta) > maxAngle) {\n                return null;\n            }\n        }\n        previousAngle = angle;\n        var interpolate = segmentPos / segmentLength;\n        var x = lerp(x1, x2, interpolate);\n        var y = lerp(y1, y2, interpolate);\n        result[index] = [x, y, charLength / 2, angle, char];\n        startM += charLength;\n    }\n    return angleChanged\n        ? result\n        : [[result[0][0], result[0][1], result[0][2], result[0][3], text]];\n}\n//# sourceMappingURL=textpath.js.map","/**\n * @module ol/geom/flat/length\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    var le
 ngth = 0;\n    for (var i = offset + stride; i < end; i += stride) {\n        var x2 = flatCoordinates[i];\n        var y2 = flatCoordinates[i + 1];\n        length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n        x1 = x2;\n        y1 = y2;\n    }\n    return length;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n    var perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n    var dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n    var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n    perimeter += Math.sqrt(dx * dx + dy * dy);\n    return perimeter;\n}\n//# sourceMappingURL=length.js.map","/**\n * @module ol/render/canvas/Executor\n */\nimport CanvasInstruction from './Instructi
 on.js';\nimport RBush from 'rbush/rbush.js';\nimport { TEXT_ALIGN } from './TextBuilder.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../../has.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, setFromArray as transformSetFromArray, } from '../../transform.js';\nimport { createEmpty, createOrUpdate, getHeight, getWidth, intersects, } from '../../extent.js';\nimport { defaultPadding, defaultTextBaseline, drawImageOrLabel, } from '../canvas.js';\nimport { defaultTextAlign, measureAndCacheTextWidth, measureTextHeight, measureTextWidths, } from '../canvas.js';\nimport { drawTextOnPath } from '../../geom/flat/textpath.js';\nimport { equals } from '../../array.js';\nimport { lineStringLength } from '../../geom/flat/length.js';\nimport { transform2D } from '../../geom/flat/transform.js';\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionIns
 tructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, import(\"../canvas.js\").TextState>} textStates The text states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").FillState>} fillStates The fill states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").StrokeState>} strokeStates The stroke states (decluttering).\n */\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nvar tmpExtent = createEmpty();\n/**\n * @type {!import(\"../../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p4 = [];\nvar Executor = /** @class */ (function () {\
 n    /**\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} overlaps The replay can have overlapping geometries.\n     * @param {SerializableInstructions} instructions The serializable instructions\n     * @param {import(\"../../size.js\").Size} renderBuffer Render buffer (width/height) in pixels.\n     */\n    function Executor(resolution, pixelRatio, overlaps, instructions, renderBuffer) {\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        this.overlaps = overlaps;\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.pixelRatio = pixelRatio;\n        /**\n         * @protected\n         * @const\n         * @type {number}\n         */\n        this.resolution = resolution;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.alignFill_;\n        /**\n         * @type {Array<*>}\n         */\n        this.de
 clutterItems = [];\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        this.instructions = instructions.instructions;\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        this.coordinates = instructions.coordinates;\n        /**\n         * @private\n         * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n         */\n        this.coordinateCache_ = {};\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        this.renderBuffer_ = renderBuffer;\n        /**\n         * @private\n         * @type {!import(\"../../transform.js\").Transform}\n         */\n        this.renderedTransform_ = createTransform();\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        this.hitDetectionInstructions = instructions.
 hitDetectionInstructions;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.pixelCoordinates_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.viewRotation_ = 0;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").FillState>}\n         */\n        this.fillStates = instructions.fillStates || {};\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n         */\n        this.strokeStates = instructions.strokeStates || {};\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").TextState>}\n         */\n        this.textStates = instructions.textStates || {};\n        /**\n         * @private\n         * @type {Object<string, Object<string, number>>}\n         */\n        this.widths_ = {};\n        /**\n         * @private\n         * @type {Object<string, import(\"../canvas.js\").Label>}\n         */\n        this.labels_
  = {};\n    }\n    /**\n     * @param {string} text Text.\n     * @param {string} textKey Text style key.\n     * @param {string} fillKey Fill style key.\n     * @param {string} strokeKey Stroke style key.\n     * @return {import(\"../canvas.js\").Label} Label.\n     */\n    Executor.prototype.createLabel = function (text, textKey, fillKey, strokeKey) {\n        var key = text + textKey + fillKey + strokeKey;\n        if (this.labels_[key]) {\n            return this.labels_[key];\n        }\n        var strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n        var fillState = fillKey ? this.fillStates[fillKey] : null;\n        var textState = this.textStates[textKey];\n        var pixelRatio = this.pixelRatio;\n        var scale = [\n            textState.scale[0] * pixelRatio,\n            textState.scale[1] * pixelRatio,\n        ];\n        var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n        var strokeWidth = strokeKey && strokeState.lineWidth
  ? strokeState.lineWidth : 0;\n        var lines = text.split('\\n');\n        var numLines = lines.length;\n        var widths = [];\n        var width = measureTextWidths(textState.font, lines, widths);\n        var lineHeight = measureTextHeight(textState.font);\n        var height = lineHeight * numLines;\n        var renderWidth = width + strokeWidth;\n        var contextInstructions = [];\n        // make canvas 2 pixels wider to account for italic text width measurement errors\n        var w = (renderWidth + 2) * scale[0];\n        var h = (height + strokeWidth) * scale[1];\n        /** @type {import(\"../canvas.js\").Label} */\n        var label = {\n            width: w < 0 ? Math.floor(w) : Math.ceil(w),\n            height: h < 0 ? Math.floor(h) : Math.ceil(h),\n            contextInstructions: contextInstructions,\n        };\n        if (scale[0] != 1 || scale[1] != 1) {\n            contextInstructions.push('scale', scale);\n        }\n        contextInstructions.push(
 'font', textState.font);\n        if (strokeKey) {\n            contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n            contextInstructions.push('lineWidth', strokeWidth);\n            contextInstructions.push('lineCap', strokeState.lineCap);\n            contextInstructions.push('lineJoin', strokeState.lineJoin);\n            contextInstructions.push('miterLimit', strokeState.miterLimit);\n            // eslint-disable-next-line\n            var Context = WORKER_OFFSCREEN_CANVAS ? OffscreenCanvasRenderingContext2D : CanvasRenderingContext2D;\n            if (Context.prototype.setLineDash) {\n                contextInstructions.push('setLineDash', [strokeState.lineDash]);\n                contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n            }\n        }\n        if (fillKey) {\n            contextInstructions.push('fillStyle', fillState.fillStyle);\n        }\n        contextInstructions.push('textBaseline', 'middle');\n        
 contextInstructions.push('textAlign', 'center');\n        var leftRight = 0.5 - align;\n        var x = align * renderWidth + leftRight * strokeWidth;\n        var i;\n        if (strokeKey) {\n            for (i = 0; i < numLines; ++i) {\n                contextInstructions.push('strokeText', [\n                    lines[i],\n                    x + leftRight * widths[i],\n                    0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n                ]);\n            }\n        }\n        if (fillKey) {\n            for (i = 0; i < numLines; ++i) {\n                contextInstructions.push('fillText', [\n                    lines[i],\n                    x + leftRight * widths[i],\n                    0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n                ]);\n            }\n        }\n        this.labels_[key] = label;\n        return label;\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../coordinate.j
 s\").Coordinate} p1 1st point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n     * @param {Array<*>} fillInstruction Fill instruction.\n     * @param {Array<*>} strokeInstruction Stroke instruction.\n     * @param {boolean} declutter Declutter.\n     */\n    Executor.prototype.replayTextBackground_ = function (context, p1, p2, p3, p4, fillInstruction, strokeInstruction, declutter) {\n        context.beginPath();\n        context.moveTo.apply(context, p1);\n        context.lineTo.apply(context, p2);\n        context.lineTo.apply(context, p3);\n        context.lineTo.apply(context, p4);\n        context.lineTo.apply(context, p1);\n        if (fillInstruction) {\n            this.alignFill_ = /** @type {boolean} */ (fillInst
 ruction[2]);\n            if (declutter) {\n                context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (fillInstruction[1]);\n            }\n            this.fill_(context);\n        }\n        if (strokeInstruction) {\n            this.setStrokeStyle_(context, \n            /** @type {Array<*>} */ (strokeInstruction));\n            context.stroke();\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n     * @param {number} anchorX Anchor X.\n     * @param {number} anchorY Anchor Y.\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n     * @param {number} height Height.\n     * @param {number} opacity Opacity.\n     * @param {number} originX Or
 igin X.\n     * @param {number} originY Origin Y.\n     * @param {number} rotation Rotation.\n     * @param {import(\"../../size.js\").Size} scale Scale.\n     * @param {boolean} snapToPixel Snap to pixel.\n     * @param {number} width Width.\n     * @param {Array<number>} padding Padding.\n     * @param {Array<*>} fillInstruction Fill instruction.\n     * @param {Array<*>} strokeInstruction Stroke instruction.\n     * @return {boolean} The image or label was rendered.\n     */\n    Executor.prototype.replayImageOrLabel_ = function (context, contextScale, x, y, imageOrLabel, anchorX, anchorY, declutterGroup, height, opacity, originX, originY, rotation, scale, snapToPixel, width, padding, fillInstruction, strokeInstruction) {\n        var fillStroke = fillInstruction || strokeInstruction;\n        anchorX *= scale[0];\n        anchorY *= scale[1];\n        x -= anchorX;\n        y -= anchorY;\n        var w = width + originX > imageOrLabel.width\n            ? imageOrLabel.width - or
 iginX\n            : width;\n        var h = height + originY > imageOrLabel.height\n            ? imageOrLabel.height - originY\n            : height;\n        var boxW = padding[3] + w * scale[0] + padding[1];\n        var boxH = padding[0] + h * scale[1] + padding[2];\n        var boxX = x - padding[3];\n        var boxY = y - padding[0];\n        if (fillStroke || rotation !== 0) {\n            p1[0] = boxX;\n            p4[0] = boxX;\n            p1[1] = boxY;\n            p2[1] = boxY;\n            p2[0] = boxX + boxW;\n            p3[0] = p2[0];\n            p3[1] = boxY + boxH;\n            p4[1] = p3[1];\n        }\n        var transform = null;\n        if (rotation !== 0) {\n            var centerX = x + anchorX;\n            var centerY = y + anchorY;\n            transform = composeTransform(tmpTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n            applyTransform(tmpTransform, p1);\n            applyTransform(tmpTransform, p2);\n            apply
 Transform(tmpTransform, p3);\n            applyTransform(tmpTransform, p4);\n            createOrUpdate(Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1]), tmpExtent);\n        }\n        else {\n            createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);\n        }\n        this.renderBuffer_[0] = Math.max(this.renderBuffer_[0], getWidth(tmpExtent));\n        this.renderBuffer_[1] = Math.max(this.renderBuffer_[1], getHeight(tmpExtent));\n        var canvas = context.canvas;\n        var strokePadding = strokeInstruction\n            ? (strokeInstruction[2] * scale[0]) / 2\n            : 0;\n        var renderBuffer = this.renderBuffer_;\n        var intersects = tmpExtent[0] - strokePadding <=\n            (canvas.width + renderBuffer[0]) / contextScale &&\n            tmpExtent[2] + strokePadding >= -renderBuffer[0] / contextScale &&\n            tmpExtent[1] - stro
 kePadding <=\n                (canvas.height + renderBuffer[1]) / contextScale &&\n            tmpExtent[3] + strokePadding >= -renderBuffer[1] / contextScale;\n        if (snapToPixel) {\n            x = Math.round(x);\n            y = Math.round(y);\n        }\n        if (declutterGroup) {\n            if (!intersects && declutterGroup[0] == 1) {\n                return false;\n            }\n            var declutterArgs = intersects\n                ? [\n                    context,\n                    transform ? transform.slice(0) : null,\n                    opacity,\n                    imageOrLabel,\n                    originX,\n                    originY,\n                    w,\n                    h,\n                    x,\n                    y,\n                    scale,\n                    tmpExtent.slice(),\n                ]\n                : null;\n            if (declutterArgs) {\n                if (fillStroke) {\n                    declutterArgs.push(fi
 llInstruction, strokeInstruction, p1.slice(0), p2.slice(0), p3.slice(0), p4.slice(0));\n                }\n                declutterGroup.push(declutterArgs);\n            }\n        }\n        else if (intersects) {\n            if (fillStroke) {\n                this.replayTextBackground_(context, p1, p2, p3, p4, \n                /** @type {Array<*>} */ (fillInstruction), \n                /** @type {Array<*>} */ (strokeInstruction), false);\n            }\n            drawImageOrLabel(context, transform, opacity, imageOrLabel, originX, originY, w, h, x, y, scale);\n        }\n        return true;\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     */\n    Executor.prototype.fill_ = function (context) {\n        if (this.alignFill_) {\n            var origin_1 = applyTransform(this.renderedTransform_, [0, 0]);\n            var repeatSize = 512 * this.pixelRatio;\n            context.save();\n            context.translate(origin_1[0] 
 % repeatSize, origin_1[1] % repeatSize);\n            context.rotate(this.viewRotation_);\n        }\n        context.fill();\n        if (this.alignFill_) {\n            context.restore();\n        }\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {Array<*>} instruction Instruction.\n     */\n    Executor.prototype.setStrokeStyle_ = function (context, instruction) {\n        context.strokeStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n        context.lineWidth = /** @type {number} */ (instruction[2]);\n        context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n        context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n        context.miterLimit = /** @type {number} */ (instruction[5]);\n        if (context.setLineDash) {\n            context.lineDashOffset = /** @type {number} */ (instruction[7]);\n            context.setLineDash(/** @type {Array<number>} 
 */ (instruction[6]));\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {number} opacity Layer opacity.\n     * @param {?} declutterTree Declutter tree.\n     * @return {?} Declutter tree.\n     */\n    Executor.prototype.renderDeclutter = function (declutterGroup, feature, opacity, declutterTree) {\n        /** @type {Array<import(\"../../structs/RBush.js\").Entry>} */\n        var boxes = [];\n        for (var i = 1, ii = declutterGroup.length; i < ii; ++i) {\n            var declutterData = declutterGroup[i];\n            var box = declutterData[11];\n            boxes.push({\n                minX: box[0],\n                minY: box[1],\n                maxX: box[2],\n                maxY: box[3],\n                value: feature,\n            });\n        }\n        if (!declutterTree) {\n            declutterTree = new RBush
 (9);\n        }\n        var collides = false;\n        for (var i = 0, ii = boxes.length; i < ii; ++i) {\n            if (declutterTree.collides(boxes[i])) {\n                collides = true;\n                break;\n            }\n        }\n        if (!collides) {\n            declutterTree.load(boxes);\n            for (var j = 1, jj = declutterGroup.length; j < jj; ++j) {\n                var declutterData = /** @type {Array} */ (declutterGroup[j]);\n                var context = declutterData[0];\n                var currentAlpha = context.globalAlpha;\n                if (currentAlpha !== opacity) {\n                    context.globalAlpha = opacity;\n                }\n                if (declutterData.length > 12) {\n                    this.replayTextBackground_(declutterData[0], declutterData[14], declutterData[15], declutterData[16], declutterData[17], declutterData[12], declutterData[13], true);\n                }\n                drawImageOrLabel.apply(undefined, decl
 utterData);\n                if (currentAlpha !== opacity) {\n                    context.globalAlpha = currentAlpha;\n                }\n            }\n        }\n        declutterGroup.length = 1;\n        return declutterTree;\n    };\n    /**\n     * @private\n     * @param {string} text The text to draw.\n     * @param {string} textKey The key of the text state.\n     * @param {string} strokeKey The key for the stroke state.\n     * @param {string} fillKey The key for the fill state.\n     * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n     */\n    Executor.prototype.drawLabelWithPointPlacement_ = function (text, textKey, strokeKey, fillKey) {\n        var textState = this.textStates[textKey];\n        var label = this.createLabel(text, textKey, fillKey, strokeKey);\n        var strokeState = this.strokeStates[strokeKey];\n        var pixelRatio = this.pixelRatio;\n        var align = TEXT_ALIGN[textState.te
 xtAlign || defaultTextAlign];\n        var baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n        var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n        // Remove the 2 pixels we added in createLabel() for the anchor\n        var width = label.width / pixelRatio - 2 * textState.scale[0];\n        var anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n        var anchorY = (baseline * label.height) / pixelRatio +\n            2 * (0.5 - baseline) * strokeWidth;\n        return {\n            label: label,\n            anchorX: anchorX,\n            anchorY: anchorY,\n        };\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {Array<*>} instructions Instructions array.\n     * @param {boolean} snapToPixel Snap point symb
 ols and text to integer pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike): T|undefined} featureCallback Feature callback.\n     * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n     *     extent.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    Executor.prototype.execute_ = function (context, contextScale, transform, instructions, snapToPixel, featureCallback, opt_hitExtent) {\n        this.declutterItems.length = 0;\n        /** @type {Array<number>} */\n        var pixelCoordinates;\n        if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n            pixelCoordinates = this.pixelCoordinates_;\n        }\n        else {\n            if (!this.pixelCoordinates_) {\n                this.pixelCoordinates_ = [];\n            }\n            pixelCoordinates = transform2D(this.coordinates, 0, this.coordinates.length, 2, transform, this.pixelCoordinate
 s_);\n            transformSetFromArray(this.renderedTransform_, transform);\n        }\n        var i = 0; // instruction index\n        var ii = instructions.length; // end of instructions\n        var d = 0; // data index\n        var dd; // end of per-instruction data\n        var anchorX, anchorY, prevX, prevY, roundX, roundY, declutterGroup, declutterGroups, image, text, textKey;\n        var strokeKey, fillKey;\n        var pendingFill = 0;\n        var pendingStroke = 0;\n        var lastFillInstruction = null;\n        var lastStrokeInstruction = null;\n        var coordinateCache = this.coordinateCache_;\n        var viewRotation = this.viewRotation_;\n        var viewRotationFromTransform = Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n        var state = /** @type {import(\"../../render.js\").State} */ ({\n            context: context,\n            pixelRatio: this.pixelRatio,\n            resolution: this.resolution,\n            rotation: viewRota
 tion,\n        });\n        // When the batch size gets too big, performance decreases. 200 is a good\n        // balance between batch size and number of fill/stroke instructions.\n        var batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;\n        var /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n        var x, y;\n        while (i < ii) {\n            var instruction = instructions[i];\n            var type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n            switch (type) {\n                case CanvasInstruction.BEGIN_GEOMETRY:\n                    feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n                    if (!feature.getGeometry()) {\n                        i = /** @type {number} */ (instruction[2]);\n                    }\n                    else if (opt_hitExtent !== undefined &&\n                        !intersects(opt_hitExtent, instruction[3])) {
 \n                        i = /** @type {number} */ (instruction[2]) + 1;\n                    }\n                    else {\n                        ++i;\n                    }\n                    break;\n                case CanvasInstruction.BEGIN_PATH:\n                    if (pendingFill > batchSize) {\n                        this.fill_(context);\n                        pendingFill = 0;\n                    }\n                    if (pendingStroke > batchSize) {\n                        context.stroke();\n                        pendingStroke = 0;\n                    }\n                    if (!pendingFill && !pendingStroke) {\n                        context.beginPath();\n                        prevX = NaN;\n                        prevY = NaN;\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.CIRCLE:\n                    d = /** @type {number} */ (instruction[1]);\n                    var x1 = pixelCoordi
 nates[d];\n                    var y1 = pixelCoordinates[d + 1];\n                    var x2 = pixelCoordinates[d + 2];\n                    var y2 = pixelCoordinates[d + 3];\n                    var dx = x2 - x1;\n                    var dy = y2 - y1;\n                    var r = Math.sqrt(dx * dx + dy * dy);\n                    context.moveTo(x1 + r, y1);\n                    context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n                    ++i;\n                    break;\n                case CanvasInstruction.CLOSE_PATH:\n                    context.closePath();\n                    ++i;\n                    break;\n                case CanvasInstruction.CUSTOM:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = instruction[2];\n                    var geometry = /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n                    var renderer = instruction[4];\n                    var fn = instruction.
 length == 6 ? instruction[5] : undefined;\n                    state.geometry = geometry;\n                    state.feature = feature;\n                    if (!(i in coordinateCache)) {\n                        coordinateCache[i] = [];\n                    }\n                    var coords = coordinateCache[i];\n                    if (fn) {\n                        fn(pixelCoordinates, d, dd, 2, coords);\n                    }\n                    else {\n                        coords[0] = pixelCoordinates[d];\n                        coords[1] = pixelCoordinates[d + 1];\n                        coords.length = 2;\n                    }\n                    renderer(coords, state);\n                    ++i;\n                    break;\n                case CanvasInstruction.DRAW_IMAGE:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = /** @type {number} */ (instruction[2]);\n                    image = /** @type {HTMLCanvasElement|HTMLVid
 eoElement|HTMLImageElement} */ (instruction[3]);\n                    // Remaining arguments in DRAW_IMAGE are in alphabetical order\n                    anchorX = /** @type {number} */ (instruction[4]);\n                    anchorY = /** @type {number} */ (instruction[5]);\n                    declutterGroups = featureCallback ? null : instruction[6];\n                    var height = /** @type {number} */ (instruction[7]);\n                    var opacity = /** @type {number} */ (instruction[8]);\n                    var originX = /** @type {number} */ (instruction[9]);\n                    var originY = /** @type {number} */ (instruction[10]);\n                    var rotateWithView = /** @type {boolean} */ (instruction[11]);\n                    var rotation = /** @type {number} */ (instruction[12]);\n                    var scale = /** @type {import(\"../../size.js\").Size} */ (instruction[13]);\n                    var width = /** @type {number} */ (instruction[14]);\n        
             if (!image && instruction.length >= 19) {\n                        // create label images\n                        text = /** @type {string} */ (instruction[18]);\n                        textKey = /** @type {string} */ (instruction[19]);\n                        strokeKey = /** @type {string} */ (instruction[20]);\n                        fillKey = /** @type {string} */ (instruction[21]);\n                        var labelWithAnchor = this.drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey);\n                        image = labelWithAnchor.label;\n                        instruction[3] = image;\n                        var textOffsetX = /** @type {number} */ (instruction[22]);\n                        anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n                        instruction[4] = anchorX;\n                        var textOffsetY = /** @type {number} */ (instruction[23]);\n                        anchorY = (labelWithAnchor.ancho
 rY - textOffsetY) * this.pixelRatio;\n                        instruction[5] = anchorY;\n                        height = image.height;\n                        instruction[7] = height;\n                        width = image.width;\n                        instruction[14] = width;\n                    }\n                    var geometryWidths = void 0;\n                    if (instruction.length > 24) {\n                        geometryWidths = /** @type {number} */ (instruction[24]);\n                    }\n                    var padding = void 0, backgroundFill = void 0, backgroundStroke = void 0;\n                    if (instruction.length > 16) {\n                        padding = /** @type {Array<number>} */ (instruction[15]);\n                        backgroundFill = /** @type {boolean} */ (instruction[16]);\n                        backgroundStroke = /** @type {boolean} */ (instruction[17]);\n                    }\n                    else {\n                        padding 
 = defaultPadding;\n                        backgroundFill = false;\n                        backgroundStroke = false;\n                    }\n                    if (rotateWithView && viewRotationFromTransform) {\n                        // Canvas is expected to be rotated to reverse view rotation.\n                        rotation += viewRotation;\n                    }\n                    else if (!rotateWithView && !viewRotationFromTransform) {\n                        // Canvas is not rotated, images need to be rotated back to be north-up.\n                        rotation -= viewRotation;\n                    }\n                    var widthIndex = 0;\n                    var declutterGroupIndex = 0;\n                    for (; d < dd; d += 2) {\n                        if (geometryWidths &&\n                            geometryWidths[widthIndex++] < width / this.pixelRatio) {\n                            continue;\n                        }\n                        if (declut
 terGroups) {\n                            var index = Math.floor(declutterGroupIndex);\n                            declutterGroup =\n                                declutterGroups.length < index + 1\n                                    ? [declutterGroups[0][0]]\n                                    : declutterGroups[index];\n                        }\n                        var rendered = this.replayImageOrLabel_(context, contextScale, pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY, declutterGroup, height, opacity, originX, originY, rotation, scale, snapToPixel, width, padding, backgroundFill\n                            ? /** @type {Array<*>} */ (lastFillInstruction)\n                            : null, backgroundStroke\n                            ? /** @type {Array<*>} */ (lastStrokeInstruction)\n                            : null);\n                        if (rendered &&\n                            declutterGroup &&\n                            declutt
 erGroups[declutterGroups.length - 1] !== declutterGroup) {\n                            declutterGroups.push(declutterGroup);\n                        }\n                        if (declutterGroup) {\n                            if (declutterGroup.length - 1 === declutterGroup[0]) {\n                                this.declutterItems.push(this, declutterGroup, feature);\n                            }\n                            declutterGroupIndex += 1 / declutterGroup[0];\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.DRAW_CHARS:\n                    var begin = /** @type {number} */ (instruction[1]);\n                    var end = /** @type {number} */ (instruction[2]);\n                    var baseline = /** @type {number} */ (instruction[3]);\n                    declutterGroup = featureCallback ? null : instruction[4];\n                    var overflow = /** @type {number} */ (ins
 truction[5]);\n                    fillKey = /** @type {string} */ (instruction[6]);\n                    var maxAngle = /** @type {number} */ (instruction[7]);\n                    var measurePixelRatio = /** @type {number} */ (instruction[8]);\n                    var offsetY = /** @type {number} */ (instruction[9]);\n                    strokeKey = /** @type {string} */ (instruction[10]);\n                    var strokeWidth = /** @type {number} */ (instruction[11]);\n                    text = /** @type {string} */ (instruction[12]);\n                    textKey = /** @type {string} */ (instruction[13]);\n                    var pixelRatioScale = [\n                        /** @type {number} */ (instruction[14]),\n                        /** @type {number} */ (instruction[14]),\n                    ];\n                    var textState = this.textStates[textKey];\n                    var font = textState.font;\n                    var textScale = [\n                        textS
 tate.scale[0] * measurePixelRatio,\n                        textState.scale[1] * measurePixelRatio,\n                    ];\n                    var cachedWidths = void 0;\n                    if (font in this.widths_) {\n                        cachedWidths = this.widths_[font];\n                    }\n                    else {\n                        cachedWidths = {};\n                        this.widths_[font] = cachedWidths;\n                    }\n                    var pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n                    var textLength = Math.abs(textScale[0]) *\n                        measureAndCacheTextWidth(font, text, cachedWidths);\n                    if (overflow || textLength <= pathLength) {\n                        var textAlign = this.textStates[textKey].textAlign;\n                        var startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n                        var parts = drawTextOnPath(pixelCoordinates, begin, e
 nd, 2, text, startM, maxAngle, Math.abs(textScale[0]), measureAndCacheTextWidth, font, cachedWidths, viewRotationFromTransform ? 0 : this.viewRotation_);\n                        if (parts) {\n                            var rendered = false;\n                            var c = void 0, cc = void 0, chars = void 0, label = void 0, part = void 0;\n                            if (strokeKey) {\n                                for (c = 0, cc = parts.length; c < cc; ++c) {\n                                    part = parts[c]; // x, y, anchorX, rotation, chunk\n                                    chars = /** @type {string} */ (part[4]);\n                                    label = this.createLabel(chars, textKey, '', strokeKey);\n                                    anchorX = /** @type {number} */ (part[2]) + strokeWidth;\n                                    anchorY =\n                                        baseline * label.height +\n                                            ((0.5 - bas
 eline) * 2 * strokeWidth * textScale[1]) /\n                                                textScale[0] -\n                                            offsetY;\n                                    rendered =\n                                        this.replayImageOrLabel_(context, contextScale, \n                                        /** @type {number} */ (part[0]), \n                                        /** @type {number} */ (part[1]), label, anchorX, anchorY, declutterGroup, label.height, 1, 0, 0, \n                                        /** @type {number} */ (part[3]), pixelRatioScale, false, label.width, defaultPadding, null, null) || rendered;\n                                }\n                            }\n                            if (fillKey) {\n                                for (c = 0, cc = parts.length; c < cc; ++c) {\n                                    part = parts[c]; // x, y, anchorX, rotation, chunk\n                                    chars = /** @type 
 {string} */ (part[4]);\n                                    label = this.createLabel(chars, textKey, fillKey, '');\n                                    anchorX = /** @type {number} */ (part[2]);\n                                    anchorY = baseline * label.height - offsetY;\n                                    rendered =\n                                        this.replayImageOrLabel_(context, contextScale, \n                                        /** @type {number} */ (part[0]), \n                                        /** @type {number} */ (part[1]), label, anchorX, anchorY, declutterGroup, label.height, 1, 0, 0, \n                                        /** @type {number} */ (part[3]), pixelRatioScale, false, label.width, defaultPadding, null, null) || rendered;\n                                }\n                            }\n                            if (rendered) {\n                                this.declutterItems.push(this, declutterGroup, feature);\n              
               }\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.END_GEOMETRY:\n                    if (featureCallback !== undefined) {\n                        feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n                        var result = featureCallback(feature);\n                        if (result) {\n                            return result;\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.FILL:\n                    if (batchSize) {\n                        pendingFill++;\n                    }\n                    else {\n                        this.fill_(context);\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.MOVE_TO_LINE_TO:\n                    d = /** @type {number} */ (in
 struction[1]);\n                    dd = /** @type {number} */ (instruction[2]);\n                    x = pixelCoordinates[d];\n                    y = pixelCoordinates[d + 1];\n                    roundX = (x + 0.5) | 0;\n                    roundY = (y + 0.5) | 0;\n                    if (roundX !== prevX || roundY !== prevY) {\n                        context.moveTo(x, y);\n                        prevX = roundX;\n                        prevY = roundY;\n                    }\n                    for (d += 2; d < dd; d += 2) {\n                        x = pixelCoordinates[d];\n                        y = pixelCoordinates[d + 1];\n                        roundX = (x + 0.5) | 0;\n                        roundY = (y + 0.5) | 0;\n                        if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n                            context.lineTo(x, y);\n                            prevX = roundX;\n                            prevY = roundY;\n                        }\n      
               }\n                    ++i;\n                    break;\n                case CanvasInstruction.SET_FILL_STYLE:\n                    lastFillInstruction = instruction;\n                    this.alignFill_ = instruction[2];\n                    if (pendingFill) {\n                        this.fill_(context);\n                        pendingFill = 0;\n                        if (pendingStroke) {\n                            context.stroke();\n                            pendingStroke = 0;\n                        }\n                    }\n                    context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n                    ++i;\n                    break;\n                case CanvasInstruction.SET_STROKE_STYLE:\n                    lastStrokeInstruction = instruction;\n                    if (pendingStroke) {\n                        context.stroke();\n                        pendingStroke = 0;\n                    }\n   
                  this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n                    ++i;\n                    break;\n                case CanvasInstruction.STROKE:\n                    if (batchSize) {\n                        pendingStroke++;\n                    }\n                    else {\n                        context.stroke();\n                    }\n                    ++i;\n                    break;\n                default:\n                    ++i; // consume the instruction anyway, to avoid an infinite loop\n                    break;\n            }\n        }\n        if (pendingFill) {\n            this.fill_(context);\n        }\n        if (pendingStroke) {\n            context.stroke();\n        }\n        return undefined;\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n   
   * @param {number} viewRotation View rotation.\n     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n     */\n    Executor.prototype.execute = function (context, contextScale, transform, viewRotation, snapToPixel) {\n        this.viewRotation_ = viewRotation;\n        this.execute_(context, contextScale, transform, this.instructions, snapToPixel, undefined, undefined);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {function(import(\"../../Feature.js\").FeatureLike): T=} opt_featureCallback\n     *     Feature callback.\n     * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n     *     extent.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    Executor.prototype.executeHitDetection = function (conte
 xt, transform, viewRotation, opt_featureCallback, opt_hitExtent) {\n        this.viewRotation_ = viewRotation;\n        return this.execute_(context, 1, transform, this.hitDetectionInstructions, true, opt_featureCallback, opt_hitExtent);\n    };\n    return Executor;\n}());\nexport default Executor;\n//# sourceMappingURL=Executor.js.map","/**\n * @module ol/render/canvas/ExecutorGroup\n */\nimport BuilderType from './BuilderType.js';\nimport Executor from './Executor.js';\nimport { buffer, createEmpty, extendCoordinate } from '../../extent.js';\nimport { compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { isEmpty } from '../../obj.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nimport { transform2D } from '../../geom/flat/transform.js';\n/**\n * @const\n * @type {Array<import(\"./BuilderType.js\").default>}\n */\nvar ORDER = [\n    BuilderType.POLYGON,\n    BuilderTyp
 e.CIRCLE,\n    BuilderType.LINE_STRING,\n    BuilderType.IMAGE,\n    BuilderType.TEXT,\n    BuilderType.DEFAULT,\n];\nvar ExecutorGroup = /** @class */ (function () {\n    /**\n     * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n     * `maxExtent` was set on the Buillder for this executor group, the same `maxExtent`\n     * should be set here, unless the target context does not exceet that extent (which\n     * can be the case when rendering to tiles).\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} overlaps The executor group can have overlapping geometries.\n     * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Builder.js\").SerializableInstructions>>} allInstructions\n     * The serializable instructions.\n     * @param {number=} opt_renderBuffer Optional rendering buffer.\n     */\n    function ExecutorGroup(maxExtent, resolution, pi
 xelRatio, overlaps, allInstructions, opt_renderBuffer) {\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        this.maxExtent_ = maxExtent;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.overlaps_ = overlaps;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.resolution_ = resolution;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.renderBuffer_ = opt_renderBuffer;\n        /**\n         * @private\n         * @type {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Executor\").default>>}\n         */\n        this.executorsByZIndex_ = {};\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        this.hitDetectionContext_ =
  null;\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        this.hitDetectionTransform_ = createTransform();\n        this.createExecutors_(allInstructions);\n    }\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     */\n    ExecutorGroup.prototype.clip = function (context, transform) {\n        var flatClipCoords = this.getClipCoords(transform);\n        context.beginPath();\n        context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n        context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n        context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n        context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n        context.clip();\n    };\n    /**\n     * Create executors and populate them using the provided instructions.\n     * @private\n     * @param {!Object<string, !Object<import(\"./BuilderType.js\
 ").default, import(\"./Builder.js\").SerializableInstructions>>} allInstructions The serializable instructions\n     */\n    ExecutorGroup.prototype.createExecutors_ = function (allInstructions) {\n        for (var zIndex in allInstructions) {\n            var executors = this.executorsByZIndex_[zIndex];\n            if (executors === undefined) {\n                executors = {};\n                this.executorsByZIndex_[zIndex] = executors;\n            }\n            var instructionByZindex = allInstructions[zIndex];\n            var renderBuffer = [this.renderBuffer_ || 0, this.renderBuffer_ || 0];\n            for (var builderType in instructionByZindex) {\n                var instructions = instructionByZindex[builderType];\n                executors[builderType] = new Executor(this.resolution_, this.pixelRatio_, this.overlaps_, instructions, renderBuffer);\n            }\n        }\n    };\n    /**\n     * @param {Array<import(\"./BuilderType.js\").default>} executors Executors
 .\n     * @return {boolean} Has executors of the provided types.\n     */\n    ExecutorGroup.prototype.hasExecutors = function (executors) {\n        for (var zIndex in this.executorsByZIndex_) {\n            var candidates = this.executorsByZIndex_[zIndex];\n            for (var i = 0, ii = executors.length; i < ii; ++i) {\n                if (executors[i] in candidates) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|undefined} Callback result.\n     * @templ
 ate T\n     */\n    ExecutorGroup.prototype.forEachFeatureAtCoordinate = function (coordinate, resolution, rotation, hitTolerance, callback, declutteredFeatures) {\n        hitTolerance = Math.round(hitTolerance);\n        var contextSize = hitTolerance * 2 + 1;\n        var transform = composeTransform(this.hitDetectionTransform_, hitTolerance + 0.5, hitTolerance + 0.5, 1 / resolution, -1 / resolution, -rotation, -coordinate[0], -coordinate[1]);\n        if (!this.hitDetectionContext_) {\n            this.hitDetectionContext_ = createCanvasContext2D(contextSize, contextSize);\n        }\n        var context = this.hitDetectionContext_;\n        if (context.canvas.width !== contextSize ||\n            context.canvas.height !== contextSize) {\n            context.canvas.width = contextSize;\n            context.canvas.height = contextSize;\n        }\n        else {\n            context.clearRect(0, 0, contextSize, contextSize);\n        }\n        /**\n         * @type {import(\"../
 ../extent.js\").Extent}\n         */\n        var hitExtent;\n        if (this.renderBuffer_ !== undefined) {\n            hitExtent = createEmpty();\n            extendCoordinate(hitExtent, coordinate);\n            buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);\n        }\n        var mask = getCircleArray(hitTolerance);\n        var builderType;\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @return {?} Callback result.\n         */\n        function featureCallback(feature) {\n            var imageData = context.getImageData(0, 0, contextSize, contextSize)\n                .data;\n            for (var i_1 = 0; i_1 < contextSize; i_1++) {\n                for (var j_1 = 0; j_1 < contextSize; j_1++) {\n                    if (mask[i_1][j_1]) {\n                        if (imageData[(j_1 * contextSize + i_1) * 4 + 3] > 0) {\n                            var result_1 = void 0;\n                 
            if (!(declutteredFeatures &&\n                                (builderType == BuilderType.IMAGE ||\n                                    builderType == BuilderType.TEXT)) ||\n                                declutteredFeatures.indexOf(feature) !== -1) {\n                                result_1 = callback(feature);\n                            }\n                            if (result_1) {\n                                return result_1;\n                            }\n                            else {\n                                context.clearRect(0, 0, contextSize, contextSize);\n                                return undefined;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n        /** @type {Array<number>} */\n        var zs = Object.keys(this.executorsByZIndex_).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        var i, j, executors, executor, result;\n        for (i =
  zs.length - 1; i >= 0; --i) {\n            var zIndexKey = zs[i].toString();\n            executors = this.executorsByZIndex_[zIndexKey];\n            for (j = ORDER.length - 1; j >= 0; --j) {\n                builderType = ORDER[j];\n                executor = executors[builderType];\n                if (executor !== undefined) {\n                    result = executor.executeHitDetection(context, transform, rotation, featureCallback, hitExtent);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @return {Array<number>} Clip coordinates.\n     */\n    ExecutorGroup.prototype.getClipCoords = function (transform) {\n        var maxExtent = this.maxExtent_;\n        if (!maxExtent) {\n            return null;\n        }\n        var minX = maxExtent[0];\n        var
  minY = maxExtent[1];\n        var maxX = maxExtent[2];\n        var maxY = maxExtent[3];\n        var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n        transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n        return flatClipCoords;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    ExecutorGroup.prototype.isEmpty = function () {\n        return isEmpty(this.executorsByZIndex_);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n     * @param {Array<import(\"./BuilderType.js\").default>=} opt_builderTypes Ordered replay types to replay.\n     *     Default is {@link module:ol/render/replay~ORDER}\n     * @param {Object<string, impo
 rt(\"../canvas.js\").DeclutterGroup>=} opt_declutterReplays Declutter replays.\n     */\n    ExecutorGroup.prototype.execute = function (context, contextScale, transform, viewRotation, snapToPixel, opt_builderTypes, opt_declutterReplays) {\n        /** @type {Array<number>} */\n        var zs = Object.keys(this.executorsByZIndex_).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        // setup clipping so that the parts of over-simplified geometries are not\n        // visible outside the current extent when panning\n        if (this.maxExtent_) {\n            context.save();\n            this.clip(context, transform);\n        }\n        var builderTypes = opt_builderTypes ? opt_builderTypes : ORDER;\n        var i, ii, j, jj, replays, replay;\n        for (i = 0, ii = zs.length; i < ii; ++i) {\n            var zIndexKey = zs[i].toString();\n            replays = this.executorsByZIndex_[zIndexKey];\n            for (j = 0, jj = builderTypes.length; j < jj; ++j) {\n     
            var builderType = builderTypes[j];\n                replay = replays[builderType];\n                if (replay !== undefined) {\n                    if (opt_declutterReplays &&\n                        (builderType == BuilderType.IMAGE ||\n                            builderType == BuilderType.TEXT)) {\n                        var declutter = opt_declutterReplays[zIndexKey];\n                        if (!declutter) {\n                            opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n                        }\n                        else {\n                            declutter.push(replay, transform.slice(0));\n                        }\n                    }\n                    else {\n                        replay.execute(context, contextScale, transform, viewRotation, snapToPixel);\n                    }\n                }\n            }\n        }\n        if (this.maxExtent_) {\n            context.restore();\n        }\n    };\n    retu
 rn ExecutorGroup;\n}());\n/**\n * This cache is used for storing calculated pixel circles for increasing performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<Array<(boolean|undefined)>>>}\n */\nvar circleArrayCache = {\n    0: [[true]],\n};\n/**\n * This method fills a row in the array from the given coordinate to the\n * middle with `true`.\n * @param {Array<Array<(boolean|undefined)>>} array The array that will be altered.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n */\nfunction fillCircleArrayRowToMiddle(array, x, y) {\n    var i;\n    var radius = Math.floor(array.length / 2);\n    if (x >= radius) {\n        for (i = radius; i < x; i++) {\n            array[i][y] = true;\n        }\n    }\n    else if (x < radius) {\n        for (i = x + 1; i < radius; i++) {\n            array[i][y] = true;\n        }\n    }\n}\n/**\n * This methods creates a circle inside a fitting array. Points inside t
 he\n * circle are marked by true, points on the outside are undefined.\n * It uses the midpoint circle algorithm.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<Array<(boolean|undefined)>>} An array with marked circle points.\n */\nexport function getCircleArray(radius) {\n    if (circleArrayCache[radius] !== undefined) {\n        return circleArrayCache[radius];\n    }\n    var arraySize = radius * 2 + 1;\n    var arr = new Array(arraySize);\n    for (var i = 0; i < arraySize; i++) {\n        arr[i] = new Array(arraySize);\n    }\n    var x = radius;\n    var y = 0;\n    var error = 0;\n    while (x >= y) {\n        fillCircleArrayRowToMiddle(arr, radius + x, radius + y);\n        fillCircleArrayRowToMiddle(arr, radius + y, radius + x);\n        fillCircleArrayRowToMiddle(arr, radius - y, radius + x);\n        fillCircleArrayRowToMiddle(arr, radius - x, radius + y);\n        fillCircleArrayRowToMiddle(arr, radius - x, radius - y)
 ;\n        fillCircleArrayRowToMiddle(arr, radius - y, radius - x);\n        fillCircleArrayRowToMiddle(arr, radius + y, radius - x);\n        fillCircleArrayRowToMiddle(arr, radius + x, radius - y);\n        y++;\n        error += 1 + 2 * y;\n        if (2 * (error - x) + 1 > 0) {\n            x -= 1;\n            error += 1 - 2 * x;\n        }\n    }\n    circleArrayCache[radius] = arr;\n    return arr;\n}\n/**\n * @param {!Object<string, Array<*>>} declutterReplays Declutter replays.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} opacity Opacity.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {Array<import(\"../../PluggableMap.js\").DeclutterItems>} declutterItems Declutter items.\n */\nexport function replayDeclutter(declutterReplays, context, rotation, opacity, snapToPixel, declutterItems) {\n    var zs = Object.keys(declutterReplays)\n        .map(Number)\n        .so
 rt(numberSafeCompareFunction);\n    for (var z = 0, zz = zs.length; z < zz; ++z) {\n        var executorData = declutterReplays[zs[z].toString()];\n        var currentExecutor = void 0;\n        for (var i = 0, ii = executorData.length; i < ii;) {\n            var executor = executorData[i++];\n            var transform = executorData[i++];\n            executor.execute(context, 1, transform, rotation, snapToPixel);\n            if (executor !== currentExecutor && executor.declutterItems.length > 0) {\n                currentExecutor = executor;\n                declutterItems.push({\n                    items: executor.declutterItems,\n                    opacity: opacity,\n                });\n            }\n        }\n    }\n}\nexport default ExecutorGroup;\n//# sourceMappingURL=ExecutorGroup.js.map","/**\n * @module ol/render/canvas/hitdetet\n */\nimport CanvasImmediateRenderer from './Immediate.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport IconAnchorUnits
  from '../../style/IconAnchorUnits.js';\nimport { Icon } from '../../style.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { intersects } from '../../extent.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(size, transforms, features,
  styleFunction, extent, resolution, rotation) {\n    var width = size[0] / 2;\n    var height = size[1] / 2;\n    var context = createCanvasContext2D(width, height);\n    context.imageSmoothingEnabled = false;\n    var canvas = context.canvas;\n    var renderer = new CanvasImmediateRenderer(context, 0.5, extent, null, rotation);\n    var featureCount = features.length;\n    // Stretch hit detection index to use the whole available color range\n    var indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n    var featuresByZIndex = {};\n    for (var i = 1; i <= featureCount; ++i) {\n        var feature = features[i - 1];\n        var featureStyleFunction = feature.getStyleFunction() || styleFunction;\n        if (!styleFunction) {\n            continue;\n        }\n        var styles = featureStyleFunction(feature, resolution);\n        if (!styles) {\n            continue;\n        }\n        if (!Array.isArray(styles)) {\n            styles = [styles];\n        }\n      
   var index = i * indexFactor;\n        var color = '#' + ('000000' + index.toString(16)).slice(-6);\n        for (var j = 0, jj = styles.length; j < jj; ++j) {\n            var originalStyle = styles[j];\n            var style = originalStyle.clone();\n            var fill = style.getFill();\n            if (fill) {\n                fill.setColor(color);\n            }\n            var stroke = style.getStroke();\n            if (stroke) {\n                stroke.setColor(color);\n            }\n            style.setText(undefined);\n            var image = originalStyle.getImage();\n            if (image) {\n                var imgSize = image.getImageSize();\n                if (!imgSize) {\n                    continue;\n                }\n                var canvas_1 = document.createElement('canvas');\n                canvas_1.width = imgSize[0];\n                canvas_1.height = imgSize[1];\n                var imgContext = canvas_1.getContext('2d', { alpha: false });\n     
            imgContext.fillStyle = color;\n                var img = imgContext.canvas;\n                imgContext.fillRect(0, 0, img.width, img.height);\n                var width_1 = imgSize ? imgSize[0] : img.width;\n                var height_1 = imgSize ? imgSize[1] : img.height;\n                var iconContext = createCanvasContext2D(width_1, height_1);\n                iconContext.drawImage(img, 0, 0);\n                style.setImage(new Icon({\n                    img: img,\n                    imgSize: imgSize,\n                    anchor: image.getAnchor(),\n                    anchorXUnits: IconAnchorUnits.PIXELS,\n                    anchorYUnits: IconAnchorUnits.PIXELS,\n                    offset: image.getOrigin(),\n                    size: image.getSize(),\n                    opacity: image.getOpacity(),\n                    scale: image.getScale(),\n                    rotation: image.getRotation(),\n                    rotateWithView: image.getRotateWithView(),\
 n                }));\n            }\n            var zIndex = Number(style.getZIndex());\n            var byGeometryType = featuresByZIndex[zIndex];\n            if (!byGeometryType) {\n                byGeometryType = {};\n                featuresByZIndex[zIndex] = byGeometryType;\n                byGeometryType[GeometryType.POLYGON] = [];\n                byGeometryType[GeometryType.CIRCLE] = [];\n                byGeometryType[GeometryType.LINE_STRING] = [];\n                byGeometryType[GeometryType.POINT] = [];\n            }\n            var geometry = style.getGeometryFunction()(feature);\n            if (geometry && intersects(extent, geometry.getExtent())) {\n                byGeometryType[geometry.getType().replace('Multi', '')].push(geometry, style);\n            }\n        }\n    }\n    var zIndexKeys = Object.keys(featuresByZIndex)\n        .map(Number)\n        .sort(numberSafeCompareFunction);\n    for (var i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n        var
  byGeometryType = featuresByZIndex[zIndexKeys[i]];\n        for (var type in byGeometryType) {\n            var geomAndStyle = byGeometryType[type];\n            for (var j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n                renderer.setStyle(geomAndStyle[j + 1]);\n                for (var k = 0, kk = transforms.length; k < kk; ++k) {\n                    renderer.setTransform(transforms[k]);\n                    renderer.drawGeometry(geomAndStyle[j]);\n                }\n            }\n        }\n    }\n    return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<import(\"../../Feature\").FeatureLike>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @retu
 rn {Array<import(\"../../Feature\").FeatureLike>} features Features.\n */\nexport function hitDetect(pixel, features, imageData) {\n    var resultFeatures = [];\n    if (imageData) {\n        var index = (Math.round(pixel[0] / 2) + Math.round(pixel[1] / 2) * imageData.width) *\n            4;\n        var r = imageData.data[index];\n        var g = imageData.data[index + 1];\n        var b = imageData.data[index + 2];\n        var i = b + 256 * (g + 256 * r);\n        var indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n        if (i && i % indexFactor === 0) {\n            resultFeatures.push(features[i / indexFactor - 1]);\n        }\n    }\n    return resultFeatures;\n}\n//# sourceMappingURL=hitdetect.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n         
    function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport ExecutorGroup, { replayDeclutter, } from '../../render/canvas/ExecutorGroup.js';\nimport ViewHint from '../../ViewHint.js';\nimport { apply, makeInverse, makeScale, toString as transformToString, } from '../../transform.js';\nimport { buffer, containsExtent, createEmpty, getWidth, intersects as intersectsExtent, wrapX as wrapExtentX, } from '../../extent.js';\nimport { createHitDetectionImageData, hitDetect, } from '../../render/canvas/hitdetect.js';\nimport { defaultOrd
 er as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { fromUserExtent, getTransformFromProjections, getUserProjection, toUserExtent, } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { wrapX as wrapCoordinateX } from '../../coordinate.js';\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Vector.js\").default} vectorLayer Vector layer.\n     */\n    function CanvasVectorLayerRenderer(vectorLayer) {\n        var _this = _super.call(this, vectorLayer) || this;\n        /** @private */\n        _this.boundHandleStyleImageChange_ = _this.handleStyleImageChange_.bind(_this);\n        /**\n         * @type {boolean}\n         */\n        _this.animatingOrInteracting_;\n        /
 **\n         * @private\n         * @type {boolean}\n         */\n        _this.dirty_ = false;\n        /**\n         * @type {ImageData}\n         */\n        _this.hitDetectionImageData_ = null;\n        /**\n         * @type {Array<import(\"../../Feature.js\").default>}\n         */\n        _this.renderedFeatures_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedResolution_ = NaN;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         * @private\n         * @type {import(\"../../coordinate\").Coordinate}\n         */\n        _this.renderedCenter_ = null;\n        /**\n         * @private\n
          * @type {import(\"../../proj/Projection\").default}\n         */\n        _this.renderedProjection_ = null;\n        /**\n         * @private\n         * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n         */\n        _this.renderedRenderOrder_ = null;\n        /**\n         * @private\n         * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n         */\n        _this.replayGroup_ = null;\n        /**\n         * A new replay group had to be created by `prepareFrame()`\n         * @type {boolean}\n         */\n        _this.replayGroupChanged = true;\n        return _this;\n    }\n    /**\n     * Get a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {number} opacity Opacity.\n     */\n    CanvasVectorLayerRenderer.prototype.useContainer = function (target, tr
 ansform, opacity) {\n        if (opacity < 1) {\n            target = null;\n        }\n        _super.prototype.useContainer.call(this, target, transform, opacity);\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var pixelRatio = frameState.pixelRatio;\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        // set forward and inverse pixel transforms\n        makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        var canvasTransform = transformToString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n   
      var context = this.context;\n        var canvas = context.canvas;\n        var replayGroup = this.replayGroup_;\n        if (!replayGroup || replayGroup.isEmpty()) {\n            if (!this.containerReused && canvas.width > 0) {\n                canvas.width = 0;\n            }\n            return this.container;\n        }\n        // resize and clear\n        var width = Math.round(frameState.size[0] * pixelRatio);\n        var height = Math.round(frameState.size[1] * pixelRatio);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n            if (canvas.style.transform !== canvasTransform) {\n                canvas.style.transform = canvasTransform;\n            }\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        this.preRender(context, frameState);\n        var extent = frameState.extent;\n        var viewState = f
 rameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var rotation = viewState.rotation;\n        var projectionExtent = projection.getExtent();\n        var vectorSource = this.getLayer().getSource();\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        if (layerState.extent) {\n            var layerExtent = fromUserExtent(layerState.extent, projection);\n            clipped =\n                !containsExtent(layerExtent, frameState.extent) &&\n                    intersectsExtent(layerExtent, frameState.extent);\n            if (clipped) {\n                this.clipUnrotated(context, frameState, layerExtent);\n            }\n        }\n        var viewHints = frameState.viewHints;\n        var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        var transform = this.getRenderTransform(center, r
 esolution, rotation, pixelRatio, width, height, 0);\n        var declutterReplays = this.getLayer().getDeclutter() ? {} : null;\n        replayGroup.execute(context, 1, transform, rotation, snapToPixel, undefined, declutterReplays);\n        if (vectorSource.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            var startX = extent[0];\n            var worldWidth = getWidth(projectionExtent);\n            var world = 0;\n            var offsetX = void 0;\n            while (startX < projectionExtent[0]) {\n                --world;\n                offsetX = worldWidth * world;\n                var transform_1 = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, offsetX);\n                replayGroup.execute(context, 1, transform_1, rotation, snapToPixel, undefined, declutterReplays);\n                startX += worldWidth;\n            }\n            world = 0;\n            startX = exte
 nt[2];\n            while (startX > projectionExtent[2]) {\n                ++world;\n                offsetX = worldWidth * world;\n                var transform_2 = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, offsetX);\n                replayGroup.execute(context, 1, transform_2, rotation, snapToPixel, undefined, declutterReplays);\n                startX -= worldWidth;\n            }\n        }\n        if (declutterReplays) {\n            var viewHints_1 = frameState.viewHints;\n            var hifi = !(viewHints_1[ViewHint.ANIMATING] || viewHints_1[ViewHint.INTERACTING]);\n            replayDeclutter(declutterReplays, context, rotation, 1, hifi, frameState.declutterItems);\n        }\n        if (clipped) {\n            context.restore();\n        }\n        this.postRender(context, frameState);\n        var opacity = layerState.opacity;\n        var container = this.container;\n        if (opacity !== parseFloat(container.style.opacity)) {\
 n            container.style.opacity = opacity === 1 ? '' : String(opacity);\n        }\n        if (this.renderedRotation_ !== viewState.rotation) {\n            this.renderedRotation_ = viewState.rotation;\n            this.hitDetectionImageData_ = null;\n        }\n        return this.container;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(function (resolve, reject) {\n            if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {\n                var size = [this.context.canvas.width, this.context.canvas.height];\n                apply(this.pixelTransform, size);\n                var center = this.renderedCenter_;\n                var resolution = this.ren
 deredResolution_;\n                var rotation = this.renderedRotation_;\n                var projection = this.renderedProjection_;\n                var extent = this.renderedExtent_;\n                var layer = this.getLayer();\n                var transforms = [];\n                var width = size[0] / 2;\n                var height = size[1] / 2;\n                transforms.push(this.getRenderTransform(center, resolution, rotation, 0.5, width, height, 0).slice());\n                var source = layer.getSource();\n                var projectionExtent = projection.getExtent();\n                if (source.getWrapX() &&\n                    projection.canWrapX() &&\n                    !containsExtent(projectionExtent, extent)) {\n                    var startX = extent[0];\n                    var worldWidth = getWidth(projectionExtent);\n                    var world = 0;\n                    var offsetX = void 0;\n                    while (startX < projectionExtent[0]) {\n    
                     --world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, 0.5, width, height, offsetX).slice());\n                        startX += worldWidth;\n                    }\n                    world = 0;\n                    startX = extent[2];\n                    while (startX > projectionExtent[2]) {\n                        ++world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, 0.5, width, height, offsetX).slice());\n                        startX -= worldWidth;\n                    }\n                }\n                this.hitDetectionImageData_ = createHitDetectionImageData(size, transforms, this.renderedFeatures_, layer.getStyleFunction(), extent, resolution, rotation);\n            }\n            resolve(hitDetect(pixel, this.renderedFeatures_, this.hitDetec
 tionImageData_));\n        }.bind(this));\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        if (!this.replayGroup_) {\n            return undefined;\n        }\n        else {\n            var resolution = frameState.viewState.resolution;\n            var rotation = frameState.viewState.rotation;\n            var layer_
 1 = this.getLayer();\n            /** @type {!Object<string, boolean>} */\n            var features_1 = {};\n            var result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, \n            /**\n             * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n             * @return {?} Callback result.\n             */\n            function (feature) {\n                var key = getUid(feature);\n                if (!(key in features_1)) {\n                    features_1[key] = true;\n                    return callback(feature, layer_1);\n                }\n            }, layer_1.getDeclutter() ? declutteredFeatures : null);\n            return result;\n        }\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorLayerRenderer.prototype.handleFontsChanged = function () {\n        var layer = this.getLayer();\n        if (layer.getVisibl
 e() && this.replayGroup_) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var vectorLayer = this.getLayer();\n        var vectorSource = vectorLayer.getSource();\n        if (!vectorSource) {\n            return false;\n        }\n        var animating = frameState.viewHints[ViewHint.ANIMATING];\n        var interacting = frameState.viewHints[ViewHint.INTERACTING];\n        var update
 WhileAnimating = vectorLayer.getUpdateWhileAnimating();\n        var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n        if ((!this.dirty_ && !updateWhileAnimating && animating) ||\n            (!updateWhileInteracting && interacting)) {\n            this.animatingOrInteracting_ = true;\n            return true;\n        }\n        this.animatingOrInteracting_ = false;\n        var frameStateExtent = frameState.extent;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var resolution = viewState.resolution;\n        var pixelRatio = frameState.pixelRatio;\n        var vectorLayerRevision = vectorLayer.getRevision();\n        var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n        var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n        if (vectorLayerRenderOrder === undefined) {\n            vectorLayerRenderOrder = defaultRenderOrder;\n        }\n        var center = viewState.cente
 r.slice();\n        var extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution);\n        var loadExtents = [extent.slice()];\n        var projectionExtent = projection.getExtent();\n        if (vectorSource.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, frameState.extent)) {\n            // For the replay group, we need an extent that intersects the real world\n            // (-180° to +180°). To support geometries in a coordinate range from -540°\n            // to +540°, we add at least 1 world width on each side of the projection\n            // extent. If the viewport is wider than the world, we need to add half of\n            // the viewport width to make sure we cover the whole viewport.\n            var worldWidth = getWidth(projectionExtent);\n            var gutter = Math.max(getWidth(extent) / 2, worldWidth);\n            extent[0] = projectionExtent[0] - gutter;\n            extent[2] = projectionEx
 tent[2] + gutter;\n            wrapCoordinateX(center, projection);\n            var loadExtent = wrapExtentX(loadExtents[0], projection);\n            // If the extent crosses the date line, we load data for both edges of the worlds\n            if (loadExtent[0] < projectionExtent[0] &&\n                loadExtent[2] < projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] + worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] + worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n            else if (loadExtent[0] > projectionExtent[0] &&\n                loadExtent[2] > projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] - worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] - worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n        }\n        if (!this.dirty_ &&\n         
    this.renderedResolution_ == resolution &&\n            this.renderedRevision_ == vectorLayerRevision &&\n            this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n            containsExtent(this.renderedExtent_, extent)) {\n            this.replayGroupChanged = false;\n            return true;\n        }\n        this.replayGroup_ = null;\n        this.dirty_ = false;\n        var replayGroup = new CanvasBuilderGroup(getRenderTolerance(resolution, pixelRatio), extent, resolution, pixelRatio, vectorLayer.getDeclutter());\n        var userProjection = getUserProjection();\n        var userTransform;\n        if (userProjection) {\n            for (var i = 0, ii = loadExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(toUserExtent(loadExtents[i], projection), resolution, userProjection);\n            }\n            userTransform = getTransformFromProjections(userProjection, projection);\n        }\n        else {\n            for (var i = 0, ii = loa
 dExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n            }\n        }\n        var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n        /**\n         * @param {import(\"../../Feature.js\").default} feature Feature.\n         * @this {CanvasVectorLayerRenderer}\n         */\n        var render = function (feature) {\n            var styles;\n            var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n            if (styleFunction) {\n                styles = styleFunction(feature, resolution);\n            }\n            if (styles) {\n                var dirty = this.renderFeature(feature, squaredTolerance, styles, replayGroup, userTransform);\n                this.dirty_ = this.dirty_ || dirty;\n            }\n        }.bind(this);\n        var userExtent = toUserExtent(extent, projection);\n        /** @type {Array<import(\"../../Feature.js\").defaul
 t>} */\n        var features = vectorSource.getFeaturesInExtent(userExtent);\n        if (vectorLayerRenderOrder) {\n            features.sort(vectorLayerRenderOrder);\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            render(features[i]);\n        }\n        this.renderedFeatures_ = features;\n        var replayGroupInstructions = replayGroup.finish();\n        var executorGroup = new ExecutorGroup(extent, resolution, pixelRatio, vectorSource.getOverlaps(), replayGroupInstructions, vectorLayer.getRenderBuffer());\n        this.renderedResolution_ = resolution;\n        this.renderedRevision_ = vectorLayerRevision;\n        this.renderedRenderOrder_ = vectorLayerRenderOrder;\n        this.renderedExtent_ = extent;\n        this.renderedCenter_ = center;\n        this.renderedProjection_ = projection;\n        this.replayGroup_ = executorGroup;\n        this.hitDetectionImageData_ = null;\n        this.replayGroupChanged = true;\n        return true
 ;\n    };\n    /**\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {number} squaredTolerance Squared render tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n     * @param {import(\"../../proj.js\").TransformFunction=} opt_transform Transform from user to view projection.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styles, builderGroup, opt_transform) {\n        if (!styles) {\n            return false;\n        }\n        var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(builderGroup, feature, st
 yles[i], squaredTolerance, this.boundHandleStyleImageChange_, opt_transform) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(builderGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_, opt_transform);\n        }\n        return loading;\n    };\n    return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasVectorLayerRenderer;\n//# sourceMappingURL=VectorLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.cre
 ate(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorImageLayer\n */\nimport CanvasImageLayerRenderer from './ImageLayer.js';\nimport CanvasVectorLayerRenderer from './VectorLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport ImageState from '../../ImageState.js';\nimport ViewHint from '../../ViewHint.js';\nimport { apply, compose, create } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { getHeight, getWidth, isEmpty, scaleFromCenter } from '../../extent.js';\nimport { renderDeclutterItems } from '../../render.js';\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasVectorImageLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorImageLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/VectorImage.js\").default} layer Vector image layer.\n     */\n    function Canv
 asVectorImageLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @private\n         * @type {import(\"./VectorLayer.js\").default}\n         */\n        _this.vectorRenderer_ = new CanvasVectorLayerRenderer(layer);\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.layerImageRatio_ = layer.getImageRatio();\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.coordinateToVectorPixelTransform_ = create();\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.renderedPixelToCoordinateTransform_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    CanvasVectorImageLayerRenderer.prototype.disposeInternal = function () {\n        this.vectorRenderer_.dispose();\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * 
 Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorImageLayerRenderer.prototype.getFeatures = function (pixel) {\n        if (this.vectorRenderer_) {\n            var vectorPixel = apply(this.coordinateToVectorPixelTransform_, apply(this.renderedPixelToCoordinateTransform_, pixel.slice()));\n            return this.vectorRenderer_.getFeatures(vectorPixel);\n        }\n        else {\n            var promise = new Promise(function (resolve, reject) {\n                resolve([]);\n            });\n            return promise;\n        }\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorImageLayerRenderer.prototype.handleFontsChanged = function () {\n        this.vectorRenderer_.handleFontsChanged();\n    };\n    /*
 *\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorImageLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewResolution = viewState.resolution;\n        var hints = frameState.viewHints;\n        var vectorRenderer = this.vectorRenderer_;\n        var renderedExtent = frameState.extent;\n        if (this.layerImageRatio_ !== 1) {\n            renderedExtent = renderedExtent.slice(0);\n            scaleFromCenter(renderedExtent, this.layerImageRatio_);\n        }\n        var width = getWidth(renderedExtent) / viewResolution;\n        var height = getHeight(renderedExtent) / viewResolution;\n        if (!hints[ViewHint.ANIMATING] &&\n            !hints[ViewHint.INTERACTING] &&\n            !isEm
 pty(renderedExtent)) {\n            vectorRenderer.useContainer(null, null, 1);\n            var context = vectorRenderer.context;\n            var imageFrameState_1 = /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign({}, frameState, {\n                coordinateToPixelTransform: create(),\n                declutterItems: [],\n                extent: renderedExtent,\n                size: [width, height],\n                viewState: /** @type {import(\"../../View.js\").State} */ (assign({}, frameState.viewState, {\n                    rotation: 0,\n                })),\n            }));\n            var image_1 = new ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas, function (callback) {\n                if (vectorRenderer.prepareFrame(imageFrameState_1) &&\n                    vectorRenderer.replayGroupChanged) {\n                    vectorRenderer.renderFrame(imageFrameState_1, null);\n                    renderDeclutterItems(imageFrameState
 _1, null);\n                    callback();\n                }\n            });\n            image_1.addEventListener(EventType.CHANGE, function () {\n                if (image_1.getState() === ImageState.LOADED) {\n                    this.image_ = image_1;\n                    var imageResolution = image_1.getResolution();\n                    var imagePixelRatio = image_1.getPixelRatio();\n                    var renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n                    this.renderedResolution = renderedResolution;\n                    this.coordinateToVectorPixelTransform_ = compose(this.coordinateToVectorPixelTransform_, width / 2, height / 2, 1 / renderedResolution, -1 / renderedResolution, 0, -viewState.center[0], -viewState.center[1]);\n                }\n            }.bind(this));\n            image_1.load();\n        }\n        if (this.image_) {\n            this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.
 slice();\n        }\n        return !!this.image_;\n    };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.preRender = function () { };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.postRender = function () { };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    CanvasVectorImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        if (this.vectorRenderer_) {\
 n            return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, declutteredFeatures);\n        }\n        else {\n            return _super.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback, declutteredFeatures);\n        }\n    };\n    return CanvasVectorImageLayerRenderer;\n}(CanvasImageLayerRenderer));\nexport default CanvasVectorImageLayerRenderer;\n//# sourceMappingURL=VectorImageLayer.js.map","/**\n * @module ol/layer/VectorTileRenderType\n */\n/**\n * @enum {string}\n * Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but\n *    point symbols and texts are always rotated with the view and pixels are\n *    scaled during zoom animations.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels\n *    are scaled during zoom animations. Point symbols and texts are accurately\n *    rendered as vectors and ca
 n stay upright on rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved\n *    performance on vector tile layers with only a few rendered features (e.g.\n *    for highlighting a subset of features of another layer with the same\n *    source).\n * @api\n */\nexport default {\n    IMAGE: 'image',\n    HYBRID: 'hybrid',\n    VECTOR: 'vector',\n};\n//# sourceMappingURL=VectorTileRenderType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototyp
 e = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup, { replayDeclutter, } from '../../render/canvas/ExecutorGroup.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ReplayType from '../../render/canvas/BuilderType.js';\nimport TileState from '../../TileState.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport ViewHint from '../../ViewHint.js';\nimport { apply as applyTransform, create as createTransform, multiply, reset as resetTransform, scale, scale as scaleTransform, translate as translateTransform, } from '../../transform.js';\nimport { buffer, containsCoordinate, containsExtent, equals, getIntersection, getTopLeft, intersects, } from '../../extent.js';\nimport { clear } from '../../obj.js';\nimport { createHitDetectionImageData, hit
 Detect, } from '../../render/canvas/hitdetect.js';\nimport { getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { getUid } from '../../util.js';\nimport { listen, unlistenByKey } from '../../events.js';\nimport { toSize } from '../../size.js';\nimport { wrapX } from '../../coordinate.js';\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nvar IMAGE_REPLAYS = {\n    'image': [\n        ReplayType.POLYGON,\n        ReplayType.CIRCLE,\n        ReplayType.LINE_STRING,\n        ReplayType.IMAGE,\n        ReplayType.TEXT,\n    ],\n    'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING],\n    'vector': [],\n};\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nvar VECTOR_REPLAYS = {\n    'image': [ReplayType.DEFAULT],\n    'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n    'vector': [\n        ReplayType.POLYGON,\n       
  ReplayType.CIRCLE,\n        ReplayType.LINE_STRING,\n        ReplayType.IMAGE,\n        ReplayType.TEXT,\n        ReplayType.DEFAULT,\n    ],\n};\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nvar CanvasVectorTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorTileLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n     */\n    function CanvasVectorTileLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /** @private */\n        _this.boundHandleStyleImageChange_ = _this.handleStyleImageChange_.bind(_this);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.dirty_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedLayerRevision_;\n        /**\n         * @private\n         * @type {import(\"../../transform\").Transform}\n      
    */\n        _this.renderedPixelToCoordinateTransform_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         * @private\n         * @type {!Object<string, import(\"../../VectorRenderTile.js\").default>}\n         */\n        _this.renderTileImageQueue_ = {};\n        /**\n         * @type {Object<string, import(\"../../events.js\").EventsKey>}\n         */\n        _this.tileListenerKeys_ = {};\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tmpTransform_ = createTransform();\n        return _this;\n    }\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection\").default} projection Projection.\n     * @param {boolean} queue Queue tile for rendering.\n     * @return {boolean|undefined} Tile needs to be r
 endered.\n     */\n    CanvasVectorTileLayerRenderer.prototype.prepareTile = function (tile, pixelRatio, projection, queue) {\n        var render;\n        var tileUid = getUid(tile);\n        var state = tile.getState();\n        if (((state === TileState.LOADED && tile.hifi) ||\n            state === TileState.ERROR) &&\n            tileUid in this.tileListenerKeys_) {\n            unlistenByKey(this.tileListenerKeys_[tileUid]);\n            delete this.tileListenerKeys_[tileUid];\n        }\n        if (state === TileState.LOADED || state === TileState.ERROR) {\n            this.updateExecutorGroup_(tile, pixelRatio, projection);\n            if (this.tileImageNeedsRender_(tile, pixelRatio, projection)) {\n                render = true;\n                if (queue) {\n                    this.renderTileImageQueue_[tileUid] = tile;\n                }\n            }\n        }\n        return render;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {numbe
 r} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasVectorTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var layer = this.getLayer();\n        var tile = layer.getSource().getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() < TileState.LOADED) {\n            tile.wantedResolution = resolution;\n            var tileUid = getUid(tile);\n            if (!(tileUid in this.tileListenerKeys_)) {\n                var listenerKey = listen(tile, EventType.CHANGE, this.prepareTile.bind(this, tile, pixelRatio, projection, true));\n                this.tileListenerKeys_[tileUi
 d] = listenerKey;\n            }\n        }\n        else {\n            var viewHints = frameState.viewHints;\n            var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n            if (hifi || !tile.wantedResolution) {\n                tile.wantedResolution = resolution;\n            }\n            var render = this.prepareTile(tile, pixelRatio, projection, false);\n            if (render && layer.getRenderMode() !== VectorTileRenderType.VECTOR) {\n                this.renderTileImage_(tile, frameState);\n            }\n        }\n        return _super.prototype.getTile.call(this, z, x, y, frameState);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasVectorTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n        var layer = this.getLayer();\n        return (_super.prototype.isDrawableTile.call(this, tile) &&\n            (layer.
 getRenderMode() === VectorTileRenderType.VECTOR\n                ? getUid(layer) in tile.executorGroups\n                : tile.hasContext(layer)));\n    };\n    /**\n     * @inheritDoc\n     */\n    CanvasVectorTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage(this.getLayer());\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layerRevision = this.getLayer().getRevision();\n        if (this.renderedLayerRevision_ != layerRevision) {\n            this.renderedTiles.length = 0;\n        }\n        this.renderedLayerRevision_ = layerRevision;\n        return _super.prototype.prepareFrame.call(this, frameState);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").d
 efault} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.updateExecutorGroup_ = function (tile, pixelRatio, projection) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var revision = layer.getRevision();\n        var renderOrder = layer.getRenderOrder() || null;\n        var resolution = tile.wantedResolution;\n        var builderState = tile.getReplayState(layer);\n        if (!builderState.dirty &&\n            builderState.renderedResolution === resolution &&\n            builderState.renderedRevision == revision &&\n            builderState.renderedRenderOrder == renderOrder &&\n            builderState.renderedZ === tile.sourceZ) {\n            return;\n        }\n        var source = layer.getSource();\n        var sourceTileGrid = source.getTileGrid(
 );\n        var tileGrid = source.getTileGridForProjection(projection);\n        var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n        var sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n        var layerUid = getUid(layer);\n        delete tile.hitDetectionImageData[layerUid];\n        tile.executorGroups[layerUid] = [];\n        var _loop_1 = function (t, tt) {\n            var sourceTile = sourceTiles[t];\n            if (sourceTile.getState() != TileState.LOADED) {\n                return \"continue\";\n            }\n            var sourceTileCoord = sourceTile.tileCoord;\n            var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n            var sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n            var bufferedExtent = equals(sourceTileExtent, sharedExtent)\n                ? null\n                : buffer(sharedExtent, layer.getRenderBuffer() * resolution, this_1.tmpExtent);\n       
      builderState.dirty = false;\n            var builderGroup = new CanvasBuilderGroup(0, sharedExtent, resolution, pixelRatio, layer.getDeclutter());\n            var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n            /**\n             * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n             * @this {CanvasVectorTileLayerRenderer}\n             */\n            var render = function (feature) {\n                var styles;\n                var styleFunction = feature.getStyleFunction() || layer.getStyleFunction();\n                if (styleFunction) {\n                    styles = styleFunction(feature, resolution);\n                }\n                if (styles) {\n                    var dirty = this.renderFeature(feature, squaredTolerance, styles, builderGroup);\n                    this.dirty_ = this.dirty_ || dirty;\n                    builderState.dirty = builderState.dirty || dirty;\n                }\n            };
 \n            var features = sourceTile.getFeatures();\n            if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n                features.sort(renderOrder);\n            }\n            for (var i = 0, ii = features.length; i < ii; ++i) {\n                var feature = features[i];\n                if (!bufferedExtent ||\n                    intersects(bufferedExtent, feature.getGeometry().getExtent())) {\n                    render.call(this_1, feature);\n                }\n            }\n            var executorGroupInstructions = builderGroup.finish();\n            // no need to clip when the render tile is covered by a single source tile\n            var replayExtent = layer.getRenderMode() !== VectorTileRenderType.VECTOR &&\n                layer.getDeclutter() &&\n                sourceTiles.length === 1\n                ? null\n                : sharedExtent;\n            var renderingReplayGroup = new CanvasExecutorGroup(replayExtent, resolution, pi
 xelRatio, source.getOverlaps(), executorGroupInstructions, layer.getRenderBuffer());\n            tile.executorGroups[layerUid].push(renderingReplayGroup);\n        };\n        var this_1 = this;\n        for (var t = 0, tt = sourceTiles.length; t < tt; ++t) {\n            _loop_1(t, tt);\n        }\n        builderState.renderedRevision = revision;\n        builderState.renderedZ = tile.sourceZ;\n        builderState.renderedRenderOrder = renderOrder;\n        builderState.renderedResolution = resolution;\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered 
 features.\n     * @return {T|void} Callback result.\n     * @template T\n     */\n    CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, declutteredFeatures) {\n        var resolution = frameState.viewState.resolution;\n        var rotation = frameState.viewState.rotation;\n        hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n        var layer = this.getLayer();\n        var declutter = layer.getDeclutter();\n        var source = layer.getSource();\n        var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n        /** @type {!Object<string, boolean>} */\n        var features = {};\n        var renderedTiles = /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this\n            .renderedTiles);\n        var found;\n        var i, ii;\n        var _loop_2 = function () {\n            var tile = renderedTiles[i];\n            var tileExtent = ti
 leGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var tileContainsCoordinate = containsCoordinate(tileExtent, coordinate);\n            if (!declutter) {\n                // When not decluttering, we only need to consider the tile that contains the given\n                // coordinate, because each feature will be rendered for each tile that contains it.\n                if (!tileContainsCoordinate) {\n                    return \"continue\";\n                }\n            }\n            var executorGroups = tile.executorGroups[getUid(layer)];\n            for (var t = 0, tt = executorGroups.length; t < tt; ++t) {\n                var executorGroup = executorGroups[t];\n                found =\n                    found ||\n                        executorGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, \n                        /**\n                         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n          
                * @return {?} Callback result.\n                         */\n                        function (feature) {\n                            if (tileContainsCoordinate ||\n                                (declutteredFeatures &&\n                                    declutteredFeatures.indexOf(feature) !== -1)) {\n                                var key = feature.getId();\n                                if (key === undefined) {\n                                    key = getUid(feature);\n                                }\n                                if (!(key in features)) {\n                                    features[key] = true;\n                                    return callback(feature, layer);\n                                }\n                            }\n                        }, layer.getDeclutter() ? declutteredFeatures : null);\n            }\n        };\n        for (i = 0, ii = renderedTiles.length; i < ii; ++i) {\n            _loop_2();\n        }\n  
       return found;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorTileLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(function (resolve, reject) {\n            var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n            var layerUid = getUid(layer);\n            var source = layer.getSource();\n            var projection = this.renderedProjection;\n            var projectionExtent = projection.getExtent();\n            var resolution = this.renderedResolution;\n            var tileGrid = source.getTileGridForProjection(projection);\n            var coordinate = applyTransform(this.renderedPixelToCoordinateTransform_, pixel.slice());\n            var tileCoord = tileGrid.getTileCoor
 dForCoordAndResolution(coordinate, resolution);\n            var tile;\n            for (var i = 0, ii = this.renderedTiles.length; i < ii; ++i) {\n                if (tileCoord.toString() === this.renderedTiles[i].tileCoord.toString()) {\n                    tile = this.renderedTiles[i];\n                    if (tile.getState() === TileState.LOADED && tile.hifi) {\n                        var extent_1 = tileGrid.getTileCoordExtent(tile.tileCoord);\n                        if (source.getWrapX() &&\n                            projection.canWrapX() &&\n                            !containsExtent(projectionExtent, extent_1)) {\n                            wrapX(coordinate, projection);\n                        }\n                        break;\n                    }\n                    tile = undefined;\n                }\n            }\n            if (!tile || tile.loadingSourceTiles > 0) {\n                resolve([]);\n                return;\n            }\n            var exten
 t = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var corner = getTopLeft(extent);\n            var tilePixel = [\n                (coordinate[0] - corner[0]) / resolution,\n                (corner[1] - coordinate[1]) / resolution,\n            ];\n            var features = tile\n                .getSourceTiles()\n                .reduce(function (accumulator, sourceTile) {\n                return accumulator.concat(sourceTile.getFeatures());\n            }, []);\n            var hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n            if (!hitDetectionImageData && !this.animatingOrInteracting_) {\n                var tileSize = toSize(tileGrid.getTileSize(tileGrid.getZForResolution(resolution)));\n                var size = [tileSize[0] / 2, tileSize[1] / 2];\n                var rotation = this.renderedRotation_;\n                var transforms = [\n                    this.getRenderTransform(tileGrid.getTileCoordCenter(tile.wrappedTileCoord),
  resolution, 0, 0.5, size[0], size[1], 0),\n                ];\n                hitDetectionImageData = createHitDetectionImageData(tileSize, transforms, features, layer.getStyleFunction(), tileGrid.getTileCoordExtent(tile.wrappedTileCoord), tile.getReplayState(layer).renderedResolution, rotation);\n                tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n            }\n            resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n        }.bind(this));\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorTileLayerRenderer.prototype.handleFontsChanged = function () {\n        clear(this.renderTileImageQueue_);\n        var layer = this.getLayer();\n        if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.
 js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var viewHints = frameState.viewHints;\n        var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        this.renderQueuedTileImages_(hifi, frameState);\n        _super.prototype.renderFrame.call(this, frameState, target);\n        this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.slice();\n        this.renderedRotation_ = frameState.viewState.rotation;\n  
       var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var renderMode = layer.getRenderMode();\n        if (renderMode === VectorTileRenderType.IMAGE) {\n            return this.container;\n        }\n        var source = layer.getSource();\n        // Unqueue tiles from the image queue when we don't need any more\n        var usedTiles = frameState.usedTiles[getUid(source)];\n        for (var tileUid in this.renderTileImageQueue_) {\n            if (!usedTiles || !(tileUid in usedTiles)) {\n                delete this.renderTileImageQueue_[tileUid];\n            }\n        }\n        var context = this.context;\n        var declutterReplays = layer.getDeclutter() ? {} : null;\n        var replayTypes = VECTOR_REPLAYS[renderMode];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var rotatio
 n = viewState.rotation;\n        var size = frameState.size;\n        var width = Math.round(size[0] * pixelRatio);\n        var height = Math.round(size[1] * pixelRatio);\n        var tiles = this.renderedTiles;\n        var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n        var clips = [];\n        var clipZs = [];\n        for (var i = tiles.length - 1; i >= 0; --i) {\n            var tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (tiles[i]);\n            var tileCoord = tile.tileCoord;\n            var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var worldOffset = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] -\n                tileExtent[0];\n            var transform = multiply(scale(this.inversePixelTransform.slice(), 1 / pixelRatio, 1 / pixelRatio), this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, worldOffset));\n            var executorGroups 
 = tile.executorGroups[getUid(layer)];\n            var clipped = false;\n            for (var t = 0, tt = executorGroups.length; t < tt; ++t) {\n                var executorGroup = executorGroups[t];\n                if (!executorGroup.hasExecutors(replayTypes)) {\n                    // sourceTile has no instructions of the types we want to render\n                    continue;\n                }\n                var currentZ = tile.tileCoord[0];\n                var currentClip = void 0;\n                if (!declutterReplays && !clipped) {\n                    currentClip = executorGroup.getClipCoords(transform);\n                    context.save();\n                    // Create a clip mask for regions in this low resolution tile that are\n                    // already filled by a higher resolution tile\n                    for (var j = 0, jj = clips.length; j < jj; ++j) {\n                        var clip = clips[j];\n                        if (currentZ < clipZs[j]) {\n      
                       context.beginPath();\n                            // counter-clockwise (outer ring) for current tile\n                            context.moveTo(currentClip[0], currentClip[1]);\n                            context.lineTo(currentClip[2], currentClip[3]);\n                            context.lineTo(currentClip[4], currentClip[5]);\n                            context.lineTo(currentClip[6], currentClip[7]);\n                            // clockwise (inner ring) for higher resolution tile\n                            context.moveTo(clip[6], clip[7]);\n                            context.lineTo(clip[4], clip[5]);\n                            context.lineTo(clip[2], clip[3]);\n                            context.lineTo(clip[0], clip[1]);\n                            context.clip();\n                        }\n                    }\n                }\n                executorGroup.execute(context, 1, transform, rotation, hifi, replayTypes, declutterReplays);\n       
          if (!declutterReplays && !clipped) {\n                    context.restore();\n                    clips.push(currentClip);\n                    clipZs.push(currentZ);\n                    clipped = true;\n                }\n            }\n        }\n        if (declutterReplays) {\n            var layerState = frameState.layerStatesArray[frameState.layerIndex];\n            replayDeclutter(declutterReplays, context, rotation, layerState.opacity, hifi, frameState.declutterItems);\n        }\n        return this.container;\n    };\n    /**\n     * @param {boolean} hifi We have time to render a high fidelity map image.\n     * @param {import('../../PluggableMap.js').FrameState} frameState Frame state.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderQueuedTileImages_ = function (hifi, frameState) {\n        // When we don't have time to render hifi, only render tiles until we have used up\n        // half of the frame budget of 16 ms\n        for (var uid in this.re
 nderTileImageQueue_) {\n            if (!hifi && Date.now() - frameState.time > 8) {\n                frameState.animate = true;\n                break;\n            }\n            var tile = this.renderTileImageQueue_[uid];\n            delete this.renderTileImageQueue_[uid];\n            this.renderTileImage_(tile, frameState);\n        }\n    };\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} executorGroup Replay group.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styles, executorGroup) {\n        if (!styles) {\n            return false;\n        }\n      
   var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(executorGroup, feature, styles[i], squaredTolerance, this.boundHandleStyleImageChange_) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(executorGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_);\n        }\n        return loading;\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @return {boolean} A new tile image was rendered.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.tileImageNeedsRender_ = function (tile, pixelRatio, projection) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.get
 Layer());\n        var replayState = tile.getReplayState(layer);\n        var revision = layer.getRevision();\n        var sourceZ = tile.sourceZ;\n        var resolution = tile.wantedResolution;\n        return (replayState.renderedTileResolution !== resolution ||\n            replayState.renderedTileRevision !== revision ||\n            replayState.renderedTileZ !== sourceZ);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function (tile, frameState) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var replayState = tile.getReplayState(layer);\n        var revision = layer.getRevision();\n        var executorGroups = tile.executorGroups[getUid(layer)];\n        replayState.renderedTileRevision = revision;\n
         replayState.renderedTileZ = tile.sourceZ;\n        var tileCoord = tile.wrappedTileCoord;\n        var z = tileCoord[0];\n        var source = layer.getSource();\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var tileGrid = source.getTileGridForProjection(projection);\n        var tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n        var renderPixelRatio = (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n        var resolution = tileGrid.getResolution(z);\n        var context = tile.getContext(layer);\n        // Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles\n        pixelRatio = Math.max(pixelRatio, renderPixelRatio / pixelRatio);\n        var size = source.getTilePixelSize(z, pixelRatio, projection);\n        context.canvas.width = size[0];\n        context.canvas.height = size[1];\n        var renderSca
 le = pixelRatio / renderPixelRatio;\n        if (renderScale !== 1) {\n            var canvasTransform = resetTransform(this.tmpTransform_);\n            scaleTransform(canvasTransform, renderScale, renderScale);\n            context.setTransform.apply(context, canvasTransform);\n        }\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n        var pixelScale = renderPixelRatio / resolution;\n        var transform = resetTransform(this.tmpTransform_);\n        scaleTransform(transform, pixelScale, -pixelScale);\n        translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n        for (var i = 0, ii = executorGroups.length; i < ii; ++i) {\n            var executorGroup = executorGroups[i];\n            executorGroup.execute(context, renderScale, transform, 0, true, IMAGE_REPLAYS[layer.getRenderMode()]);\n        }\n        replayState.renderedTileResolution = tile.wantedResolution;\n    };\n    return CanvasVectorTileLayerRenderer;\n}(Can
 vasTileLayerRenderer));\nexport default CanvasVectorTileLayerRenderer;\n//# sourceMappingURL=VectorTileLayer.js.map","/**\n * @module ol/geom/flat/interpolate\n */\nimport { binarySearch } from '../../array.js';\nimport { lerp } from '../../math.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_dimension Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest, opt_dimension) {\n    var o, t;\n    var n = (end - offset) / stride;\n    if (n === 1) {\n        o = offset;\n    }\n    else if (n === 2) {\n        o = offset;\n        t = fraction;\n    }\n    else if (n !== 0) {\n        var x1 = flatCoordinates[offset];\n        var y1 = 
 flatCoordinates[offset + 1];\n        var length_1 = 0;\n        var cumulativeLengths = [0];\n        for (var i = offset + stride; i < end; i += stride) {\n            var x2 = flatCoordinates[i];\n            var y2 = flatCoordinates[i + 1];\n            length_1 += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n            cumulativeLengths.push(length_1);\n            x1 = x2;\n            y1 = y2;\n        }\n        var target = fraction * length_1;\n        var index = binarySearch(cumulativeLengths, target);\n        if (index < 0) {\n            t =\n                (target - cumulativeLengths[-index - 2]) /\n                    (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n            o = offset + (-index - 2) * stride;\n        }\n        else {\n            o = offset + index * stride;\n        }\n    }\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var dest = opt_dest ? opt_dest : new Array(dimension);\n    for (var i =
  0; i < dimension; ++i) {\n        dest[i] =\n            o === undefined\n                ? NaN\n                : t === undefined\n                    ? flatCoordinates[o + i]\n                    : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {\n    if (end == offset) {\n        return null;\n    }\n    var coordinate;\n    if (m < flatCoordinates[offset + stride - 1]) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(offset, offset + stride);\n            coordinate[stride - 1] = m;\n            return coo
 rdinate;\n        }\n        else {\n            return null;\n        }\n    }\n    else if (flatCoordinates[end - 1] < m) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(end - stride, end);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    // FIXME use O(1) search\n    if (m == flatCoordinates[offset + stride - 1]) {\n        return flatCoordinates.slice(offset, offset + stride);\n    }\n    var lo = offset / stride;\n    var hi = end / stride;\n    while (lo < hi) {\n        var mid = (lo + hi) >> 1;\n        if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n            hi = mid;\n        }\n        else {\n            lo = mid + 1;\n        }\n    }\n    var m0 = flatCoordinates[lo * stride - 1];\n    if (m == m0) {\n        return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n    }\n    var m1 = flatCoordinates[(lo + 1) * st
 ride - 1];\n    var t = (m - m0) / (m1 - m0);\n    coordinate = [];\n    for (var i = 0; i < stride - 1; ++i) {\n        coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i], flatCoordinates[lo * stride + i], t));\n    }\n    coordinate.push(m);\n    return coordinate;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringsCoordinateAtM(flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {\n    if (interpolate) {\n        return lineStringCoordinateAtM(flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);\n    }\n    var coordinate;\n    if (m < flatCoordinates[stride - 1]) {\n        if (extrapolate) {\n  
           coordinate = flatCoordinates.slice(0, stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    if (flatCoordinates[flatCoordinates.length - 1] < m) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        if (offset == end) {\n            continue;\n        }\n        if (m < flatCoordinates[offset + stride - 1]) {\n            return null;\n        }\n        else if (m <= flatCoordinates[end - 1]) {\n            return lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, false);\n        }\n        offset = end;\n    }\n    return null;\n}\n//# sourceMappingURL=interpolate.js
 .map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/LineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { dou
 glasPeucker } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { forEach as forEachSegment } from './flat/segments.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { interpolatePoint, lineStringCoordinateAtM } from './flat/interpolate.js';\nimport { intersectsLineString } from './flat/intersectsextent.js';\nimport { lineStringLength } from './flat/length.js';\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nvar LineString = /** @class */ (function (_super) {\n    __extends(LineString, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function LineString(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n     
     * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.flatMidpoint_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatMidpointRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed coordinate to the coordinates of the linestring.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   
   * @api\n     */\n    LineString.prototype.appendCoordinate = function (coordinate) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = coordinate.slice();\n        }\n        else {\n            extend(this.flatCoordinates, coordinate);\n        }\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!LineString} Clone.\n     * @api\n     */\n    LineString.prototype.clone = function () {\n        return new LineString(this.flatCoordinates.slice(), this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    LineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getEx
 tent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Iterate over each segment, calling the provided callback.\n     * If the callback returns a truthy value the function returns that\n     * value immediately. Otherwise the function returns `false`.\n     *\n     * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n     *     called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n     * @ret
 urn {T|boolean} Value.\n     * @template T,S\n     * @api\n     */\n    LineString.prototype.forEachSegment = function (callback) {\n        return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);\n    };\n    /**\n     * Returns the coordinate at `m` using linear interpolation, or `null` if no\n     * such coordinate exists.\n     *\n     * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n     * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n     * M will return the first coordinate and Ms greater than the last M will\n     * return the last coordinate.\n     *\n     * @param {number} m M.\n     * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    LineString.prototype.getCoordinateAtM = function (m, opt_extrapolate) {\n        if (this.layout != GeometryLayout.XYM &&\n       
      this.layout != GeometryLayout.XYZM) {\n            return null;\n        }\n        var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n        return lineStringCoordinateAtM(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, m, extrapolate);\n    };\n    /**\n     * Return the coordinates of the linestring.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    LineString.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the coordinate at the provided fraction along the linestring.\n     * The `fraction` is a number between 0 and 1, where 0 is the start of the\n     * linestring and 1 is the end.\n     * @param {number} fraction Fraction.\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_dest Optional coordinate whose values will\n     *     be modified
 . If not provided, a new coordinate will be returned.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n     * @api\n     */\n    LineString.prototype.getCoordinateAt = function (fraction, opt_dest) {\n        return interpolatePoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, fraction, opt_dest, this.stride);\n    };\n    /**\n     * Return the length of the linestring on projected plane.\n     * @return {number} Length (on projected plane).\n     * @api\n     */\n    LineString.prototype.getLength = function () {\n        return lineStringLength(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * @return {Array<number>} Flat midpoint.\n     */\n    LineString.prototype.getFlatMidpoint = function () {\n        if (this.flatMidpointRevision_ != this.getRevision()) {\n            this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n            this.flatMidpoi
 ntRevision_ = this.getRevision();\n        }\n        return this.flatMidpoint_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} Simplified LineString.\n     * @protected\n     */\n    LineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    LineString.prototype.getType = function () {\n        return GeometryType.LINE_STRING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} exte
 nt Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    LineString.prototype.intersectsExtent = function (extent) {\n        return intersectsLineString(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the linestring.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    LineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return LineString;\n}(SimpleGeometry));\nexport default LineString;\n//# sourceMappingUR
 L=LineString.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Vector\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting 
 `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {BaseVectorLayer<import(\"../source/Vector.js\").default>}\n * @api\n */\nvar VectorLayer = /** @class */ (function (_super) {\n    __extends(VectorLayer, _super);\n    /**\n     * @param {import(\"./BaseVector.js\").Options=} opt_options Options.\n     */\n    function VectorLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    VectorLayer.prototype.createRenderer = function () {\n        return new CanvasVectorLayerRenderer(this);\n    };\n    return VectorLayer;\n}(BaseVectorLayer));\nexport default VectorLayer;\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/geom/flat/geodesic\n */\nimport { get as getProjection, getTransform } from '../../proj.js';\nimport { squaredSegmentDistance, toD
 egrees, toRadians } from '../../math.js';\n/**\n * @param {function(number): import(\"../../coordinate.js\").Coordinate} interpolate Interpolate function.\n * @param {import(\"../../proj.js\").TransformFunction} transform Transform from longitude/latitude to\n *     projected coordinates.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nfunction line(interpolate, transform, squaredTolerance) {\n    // FIXME reduce garbage generation\n    // FIXME optimize stack operations\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    var geoA = interpolate(0);\n    var geoB = interpolate(1);\n    var a = transform(geoA);\n    var b = transform(geoB);\n    /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n    var geoStack = [geoB, geoA];\n    /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n    var stack = [b, a];\n    /** @type {Array<number>} */\n    var fractionStack = [1, 0];\n    /
 ** @type {!Object<string, boolean>} */\n    var fractions = {};\n    var maxIterations = 1e5;\n    var geoM, m, fracA, fracB, fracM, key;\n    while (--maxIterations > 0 && fractionStack.length > 0) {\n        // Pop the a coordinate off the stack\n        fracA = fractionStack.pop();\n        geoA = geoStack.pop();\n        a = stack.pop();\n        // Add the a coordinate if it has not been added yet\n        key = fracA.toString();\n        if (!(key in fractions)) {\n            flatCoordinates.push(a[0], a[1]);\n            fractions[key] = true;\n        }\n        // Pop the b coordinate off the stack\n        fracB = fractionStack.pop();\n        geoB = geoStack.pop();\n        b = stack.pop();\n        // Find the m point between the a and b coordinates\n        fracM = (fracA + fracB) / 2;\n        geoM = interpolate(fracM);\n        m = transform(geoM);\n        if (squaredSegmentDistance(m[0], m[1], a[0], a[1], b[0], b[1]) <\n            squaredTolerance) {\n            
 // If the m point is sufficiently close to the straight line, then we\n            // discard it.  Just use the b coordinate and move on to the next line\n            // segment.\n            flatCoordinates.push(b[0], b[1]);\n            key = fracB.toString();\n            fractions[key] = true;\n        }\n        else {\n            // Otherwise, we need to subdivide the current line segment.  Split it\n            // into two and push the two line segments onto the stack.\n            fractionStack.push(fracB, fracM, fracM, fracA);\n            stack.push(b, m, m, a);\n            geoStack.push(geoB, geoM, geoM, geoA);\n        }\n    }\n    return flatCoordinates;\n}\n/**\n * Generate a great-circle arcs between two lat/lon points.\n * @param {number} lon1 Longitude 1 in degrees.\n * @param {number} lat1 Latitude 1 in degrees.\n * @param {number} lon2 Longitude 2 in degrees.\n * @param {number} lat2 Latitude 2 in degrees.\n * @param {import(\"../../proj/Projection.js\").defaul
 t} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolerance) {\n    var geoProjection = getProjection('EPSG:4326');\n    var cosLat1 = Math.cos(toRadians(lat1));\n    var sinLat1 = Math.sin(toRadians(lat1));\n    var cosLat2 = Math.cos(toRadians(lat2));\n    var sinLat2 = Math.sin(toRadians(lat2));\n    var cosDeltaLon = Math.cos(toRadians(lon2 - lon1));\n    var sinDeltaLon = Math.sin(toRadians(lon2 - lon1));\n    var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        if (1 <= d) {\n            return [lon2, lat2];\n        }\n        var D = frac * Math.acos(d);\n        var cosD = Math.cos(D);\n        var sinD = Math.sin(D);\n        var y =
  sinDeltaLon * cosLat2;\n        var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;\n        var theta = Math.atan2(y, x);\n        var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));\n        var lon = toRadians(lon1) +\n            Math.atan2(Math.sin(theta) * sinD * cosLat1, cosD - sinLat1 * Math.sin(lat));\n        return [toDegrees(lon), toDegrees(lat)];\n    }, getTransform(geoProjection, projection), squaredTolerance);\n}\n/**\n * Generate a meridian (line at constant longitude).\n * @param {number} lon Longitude.\n * @param {number} lat1 Latitude 1.\n * @param {number} lat2 Latitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function meridian(lon, lat1, lat2, projection, squaredTolerance) {\n    var epsg4326Projection = getProjection('EPSG:4326');\n    return line(\n    /**\n     * @param {nu
 mber} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        return [lon, lat1 + (lat2 - lat1) * frac];\n    }, getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n/**\n * Generate a parallel (line at constant latitude).\n * @param {number} lat Latitude.\n * @param {number} lon1 Longitude 1.\n * @param {number} lon2 Longitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function parallel(lat, lon1, lon2, projection, squaredTolerance) {\n    var epsg4326Projection = getProjection('EPSG:4326');\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        return [lon1 + (lon2 - lon1) * frac, lat];\n    }, getTransform(epsg4326Pr
 ojection, projection), squaredTolerance);\n}\n//# sourceMappingURL=geodesic.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Graticule\n */\nimport Collection from '../Collection.js';\nimport EventType from '../render/EventType.js';\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js'
 ;\nimport Point from '../geom/Point.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport VectorLayer from './Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { applyTransform, approximatelyEquals, containsCoordinate, containsExtent, equals, getCenter, getHeight, getIntersection, getWidth, intersects, isEmpty, wrapX as wrapExtentX, } from '../extent.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\nimport { degreesToStringHDMS } from '../coordinate.js';\nimport { equivalent as equivalentProjection, get as getProjection, getTransform, } from '../proj.js';\nimport { getVectorContext } from '../render.js';\nimport { meridian, parallel } from '../geom/flat/geodesic.js';\n/**\n * @type {Stroke}\n * @private\n * @const\n */\nvar DEFAULT_STROKE_STYLE = new Stroke({\n    color: 'rgba(0,0,0,0.2)',\n});\n/**\n * @type {Array<number>}\n * @private\n */\nvar INTERVALS
  = [\n    90,\n    45,\n    30,\n    20,\n    10,\n    5,\n    2,\n    1,\n    0.5,\n    0.2,\n    0.1,\n    0.05,\n    0.01,\n    0.005,\n    0.002,\n    0.001,\n];\n/**\n * @typedef {Object} GraticuleLabelDataType\n * @property {Point} geom\n * @property {string} text\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @p
 roperty {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [maxLines=100] The maximum number of meridians and\n * parallels from the center of the map. The default value of 100 means that at\n * most 200 meridians and 200 parallels will be displayed. The default value is\n * appropriate for conformal projections like Spherical Mercator. If you\n * increase the value, more lines will be drawn and the drawing performance will\n * decrease.\n * @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The\n * stroke style to use for drawing the graticule. If not provided, a not 
 fully\n * opaque black will be used.\n * @property {number} [targetSize=100] The target size of the graticule cells,\n * in pixels.\n * @property {boolean} [showLabels=false] Render a label with the respective\n * latitude/longitude for each graticule line.\n * @property {function(number):string} [lonLabelFormatter] Label formatter for\n * longitudes. This function is called with the longitude as argument, and\n * should return a formatted string representing the longitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {function(number):string} [latLabelFormatter] Label formatter for\n * latitudes. This function is called with the latitude as argument, and\n * should return a formatted string representing the latitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {number} [lonLabelPosition=0] Longitude label position in fractions\n * (0..1) of view extent. 0 means at the bottom of th
 e viewport, 1 means at the\n * top.\n * @property {number} [latLabelPosition=1] Latitude label position in fractions\n * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the\n * right.\n * @property {Text} [lonLabelStyle] Longitude label text\n * style. If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textBaseline: 'bottom',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: new Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textBaseline` configuration will not work well for\n * `lonLabelPosition` configurations that position labels close to the top of\n * the viewport.\n * @property {Text} [latLabelStyle] Latitude label text style.\n * If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textAlign: 'end',\n *   fill: new Fill(
 {\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textAlign` configuration will not work well for\n * `latLabelPosition` configurations that position labels close to the left of\n * the viewport.\n * @property {Array<number>} [intervals=[90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001]]\n * Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:\n * ```js\n * [30, 10]\n * ```\n * @property {boolean} [wrapX=true] Whether to repeat the graticule horizontally.\n */\n/**\n * @classdesc\n * Layer that renders a grid for a coordinate system (currently only EPSG:4326 is supported).\n * Note that the view projection must define both extent and worldExtent.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nvar Graticule = /** @class */ (function (_super) {\n    __extends(Gr
 aticule, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Graticule(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n            renderBuffer: 0,\n        }, options);\n        delete baseOptions.maxLines;\n        delete baseOptions.strokeStyle;\n        delete baseOptions.targetSize;\n        delete baseOptions.showLabels;\n        delete baseOptions.lonLabelFormatter;\n        delete baseOptions.latLabelFormatter;\n        delete baseOptions.lonLabelPosition;\n        delete baseOptions.latLabelPosition;\n        delete baseOptions.lonLabelStyle;\n        delete baseOptions.latLabelStyle;\n        delete baseOptions.intervals;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n     
    _this.projection_ = null;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLat_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLon_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minLat_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minLon_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxX_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxY_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minX_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minY_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.targetSize_
  =\n            options.targetSize !== undefined ? options.targetSize : 100;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;\n        /**\n         * @type {Array<LineString>}\n         * @private\n         */\n        _this.meridians_ = [];\n        /**\n         * @type {Array<LineString>}\n         * @private\n         */\n        _this.parallels_ = [];\n        /**\n         * @type {Stroke}\n         * @private\n         */\n        _this.strokeStyle_ =\n            options.strokeStyle !== undefined\n                ? options.strokeStyle\n                : DEFAULT_STROKE_STYLE;\n        /**\n         * @type {import(\"../proj.js\").TransformFunction|undefined}\n         * @private\n         */\n        _this.fromLonLatTransform_ = undefined;\n        /**\n         * @type {import(\"../proj.js\").TransformFunction|undefined}\n         * @private\n         */\n        _th
 is.toLonLatTransform_ = undefined;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.projectionCenterLonLat_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.bottomLeft_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.bottomRight_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.topLeft_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.topRight_ = null;\n        /**\n         * @type {Array<GraticuleLabelDataType>}\n         * @private\n         */\n        _this.meridiansLabels_ = null;\n        /**\n         * @type {Array<GraticuleLabelDataType>}\n         * @private\n         */\n        _
 this.parallelsLabels_ = null;\n        if (options.showLabels) {\n            /**\n             * @type {null|function(number):string}\n             * @private\n             */\n            _this.lonLabelFormatter_ =\n                options.lonLabelFormatter == undefined\n                    ? degreesToStringHDMS.bind(_this, 'EW')\n                    : options.lonLabelFormatter;\n            /**\n             * @type {function(number):string}\n             * @private\n             */\n            _this.latLabelFormatter_ =\n                options.latLabelFormatter == undefined\n                    ? degreesToStringHDMS.bind(_this, 'NS')\n                    : options.latLabelFormatter;\n            /**\n             * Longitude label position in fractions (0..1) of view extent. 0 means\n             * bottom, 1 means top.\n             * @type {number}\n             * @private\n             */\n            _this.lonLabelPosition_ =\n                options.lonLabelPosition == und
 efined ? 0 : options.lonLabelPosition;\n            /**\n             * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1\n             * means right.\n             * @type {number}\n             * @private\n             */\n            _this.latLabelPosition_ =\n                options.latLabelPosition == undefined ? 1 : options.latLabelPosition;\n            /**\n             * @type {Style}\n             * @private\n             */\n            _this.lonLabelStyleBase_ = new Style({\n                text: options.lonLabelStyle !== undefined\n                    ? options.lonLabelStyle.clone()\n                    : new Text({\n                        font: '12px Calibri,sans-serif',\n                        textBaseline: 'bottom',\n                        fill: new Fill({\n                            color: 'rgba(0,0,0,1)',\n                        }),\n                        stroke: new Stroke({\n                            color: 'rgba(255,255,255,1)'
 ,\n                            width: 3,\n                        }),\n                    }),\n            });\n            /**\n             * @private\n             * @param {import(\"../Feature\").default} feature Feature\n             * @return {Style} style\n             */\n            _this.lonLabelStyle_ = function (feature) {\n                var label = feature.get('graticule_label');\n                this.lonLabelStyleBase_.getText().setText(label);\n                return this.lonLabelStyleBase_;\n            }.bind(_this);\n            /**\n             * @type {Style}\n             * @private\n             */\n            _this.latLabelStyleBase_ = new Style({\n                text: options.latLabelStyle !== undefined\n                    ? options.latLabelStyle.clone()\n                    : new Text({\n                        font: '12px Calibri,sans-serif',\n                        textAlign: 'right',\n                        fill: new Fill({\n                     
        color: 'rgba(0,0,0,1)',\n                        }),\n                        stroke: new Stroke({\n                            color: 'rgba(255,255,255,1)',\n                            width: 3,\n                        }),\n                    }),\n            });\n            /**\n             * @private\n             * @param {import(\"../Feature\").default} feature Feature\n             * @return {Style} style\n             */\n            _this.latLabelStyle_ = function (feature) {\n                var label = feature.get('graticule_label');\n                this.latLabelStyleBase_.getText().setText(label);\n                return this.latLabelStyleBase_;\n            }.bind(_this);\n            _this.meridiansLabels_ = [];\n            _this.parallelsLabels_ = [];\n            _this.addEventListener(EventType.POSTRENDER, _this.drawLabels_.bind(_this));\n        }\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.intervals_
  =\n            options.intervals !== undefined ? options.intervals : INTERVALS;\n        // use a source with a custom loader for lines & text\n        _this.setSource(new VectorSource({\n            loader: _this.loaderFunction.bind(_this),\n            strategy: _this.strategyFunction.bind(_this),\n            features: new Collection(),\n            overlaps: false,\n            useSpatialIndex: false,\n            wrapX: options.wrapX,\n        }));\n        /**\n         * feature pool to use when updating graticule\n         * @type {Array<Feature>}\n         * @private\n         */\n        _this.featurePool_ = [];\n        /**\n         * @type {Style}\n         * @private\n         */\n        _this.lineStyle_ = new Style({\n            stroke: _this.strokeStyle_,\n        });\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         * @private\n         */\n        _this.loadedExtent_ = null;\n        /**\n         * @type {?import(\"../extent.js\").Exte
 nt}\n         */\n        _this.renderedExtent_ = null;\n        _this.setRenderOrder(null);\n        return _this;\n    }\n    /**\n     * Strategy function for loading features based on the view's extent and\n     * resolution.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"../extent.js\").Extent>} Extents.\n     */\n    Graticule.prototype.strategyFunction = function (extent, resolution) {\n        // extents may be passed in different worlds, to avoid endless loop we use only one\n        var realWorldExtent = extent.slice();\n        if (this.projection_ && this.getSource().getWrapX()) {\n            wrapExtentX(realWorldExtent, this.projection_);\n        }\n        if (this.loadedExtent_) {\n            if (approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)) {\n                // make sure result is exactly equal to previous extent\n                realWorldExtent
  = this.loadedExtent_.slice();\n            }\n            else {\n                // we should not keep track of loaded extents\n                this.getSource().removeLoadedExtent(this.loadedExtent_);\n            }\n        }\n        return [realWorldExtent];\n    };\n    /**\n     * Update geometries in the source based on current view\n     * @param {import(\"../extent\").Extent} extent Extent\n     * @param {number} resolution Resolution\n     * @param {import(\"../proj/Projection.js\").default} projection Projection\n     */\n    Graticule.prototype.loaderFunction = function (extent, resolution, projection) {\n        this.loadedExtent_ = extent;\n        var source = this.getSource();\n        // only consider the intersection between our own extent & the requested one\n        var layerExtent = this.getExtent() || [\n            -Infinity,\n            -Infinity,\n            Infinity,\n            Infinity,\n        ];\n        var renderExtent = getIntersection(layerExte
 nt, extent);\n        if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent)) {\n            return;\n        }\n        this.renderedExtent_ = renderExtent;\n        // bail out if nothing to render\n        if (isEmpty(renderExtent)) {\n            return;\n        }\n        // update projection info\n        var center = getCenter(renderExtent);\n        var squaredTolerance = (resolution * resolution) / 4;\n        var updateProjectionInfo = !this.projection_ || !equivalentProjection(this.projection_, projection);\n        if (updateProjectionInfo) {\n            this.updateProjectionInfo_(projection);\n        }\n        this.createGraticule_(renderExtent, center, resolution, squaredTolerance);\n        // first make sure we have enough features in the pool\n        var featureCount = this.meridians_.length + this.parallels_.length;\n        if (this.meridiansLabels_) {\n            featureCount += this.meridians_.length;\n        }\n        if (this.parallelsL
 abels_) {\n            featureCount += this.parallels_.length;\n        }\n        var feature;\n        while (featureCount > this.featurePool_.length) {\n            feature = new Feature();\n            this.featurePool_.push(feature);\n        }\n        var featuresColl = source.getFeaturesCollection();\n        featuresColl.clear();\n        var poolIndex = 0;\n        // add features for the lines & labels\n        var i, l;\n        for (i = 0, l = this.meridians_.length; i < l; ++i) {\n            feature = this.featurePool_[poolIndex++];\n            feature.setGeometry(this.meridians_[i]);\n            feature.setStyle(this.lineStyle_);\n            featuresColl.push(feature);\n        }\n        for (i = 0, l = this.parallels_.length; i < l; ++i) {\n            feature = this.featurePool_[poolIndex++];\n            feature.setGeometry(this.parallels_[i]);\n            feature.setStyle(this.lineStyle_);\n            featuresColl.push(feature);\n        }\n    };\n    /**\
 n     * @param {number} lon Longitude.\n     * @param {number} minLat Minimal latitude.\n     * @param {number} maxLat Maximal latitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {number} Index.\n     * @private\n     */\n    Graticule.prototype.addMeridian_ = function (lon, minLat, maxLat, squaredTolerance, extent, index) {\n        var lineString = this.getMeridian_(lon, minLat, maxLat, squaredTolerance, index);\n        if (intersects(lineString.getExtent(), extent)) {\n            if (this.meridiansLabels_) {\n                var text = this.lonLabelFormatter_(lon);\n                if (index in this.meridiansLabels_) {\n                    this.meridiansLabels_[index].text = text;\n                }\n                else {\n                    this.meridiansLabels_[index] = {\n                        geom: new Point([]),\n                       
  text: text,\n                    };\n                }\n            }\n            this.meridians_[index++] = lineString;\n        }\n        return index;\n    };\n    /**\n     * @param {number} lat Latitude.\n     * @param {number} minLon Minimal longitude.\n     * @param {number} maxLon Maximal longitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {number} Index.\n     * @private\n     */\n    Graticule.prototype.addParallel_ = function (lat, minLon, maxLon, squaredTolerance, extent, index) {\n        var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance, index);\n        if (intersects(lineString.getExtent(), extent)) {\n            if (this.parallelsLabels_) {\n                var text = this.latLabelFormatter_(lat);\n                if (index in this.parallelsLabels_) {\n                    this.parallelsLabels_[index].text 
 = text;\n                }\n                else {\n                    this.parallelsLabels_[index] = {\n                        geom: new Point([]),\n                        text: text,\n                    };\n                }\n            }\n            this.parallels_[index++] = lineString;\n        }\n        return index;\n    };\n    /**\n     * @param {import(\"../render/Event.js\").default} event Render event.\n     * @private\n     */\n    Graticule.prototype.drawLabels_ = function (event) {\n        var rotation = event.frameState.viewState.rotation;\n        var extent = event.frameState.extent;\n        var rotationCenter = getCenter(extent);\n        var rotationExtent = extent;\n        if (rotation) {\n            var width = getWidth(extent);\n            var height = getHeight(extent);\n            var cr = Math.abs(Math.cos(rotation));\n            var sr = Math.abs(Math.sin(rotation));\n            var unrotatedWidth = (sr * height - cr * width) / (sr * sr - cr
  * cr);\n            var unrotatedHeight = (sr * width - cr * height) / (sr * sr - cr * cr);\n            rotationExtent = [\n                rotationCenter[0] - unrotatedWidth / 2,\n                rotationCenter[1] - unrotatedHeight / 2,\n                rotationCenter[0] + unrotatedWidth / 2,\n                rotationCenter[1] + unrotatedHeight / 2,\n            ];\n        }\n        var startWorld = 0;\n        var endWorld = 0;\n        var labelsAtStart = this.latLabelPosition_ < 0.5;\n        var projectionExtent = this.projection_.getExtent();\n        var worldWidth = getWidth(projectionExtent);\n        if (this.getSource().getWrapX() &&\n            this.projection_.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            startWorld = Math.floor((extent[0] - projectionExtent[0]) / worldWidth);\n            endWorld = Math.ceil((extent[2] - projectionExtent[2]) / worldWidth);\n            var inverted = Math.abs(rotation) > Math.PI / 2;\n      
       labelsAtStart = labelsAtStart !== inverted;\n        }\n        var vectorContext = getVectorContext(event);\n        for (var world = startWorld; world <= endWorld; ++world) {\n            var poolIndex = this.meridians_.length + this.parallels_.length;\n            var feature = void 0, index = void 0, l = void 0, textPoint = void 0;\n            if (this.meridiansLabels_) {\n                for (index = 0, l = this.meridiansLabels_.length; index < l; ++index) {\n                    var lineString = this.meridians_[index];\n                    if (!rotation && world === 0) {\n                        textPoint = this.getMeridianPoint_(lineString, extent, index);\n                    }\n                    else {\n                        var clone = lineString.clone();\n                        clone.translate(world * worldWidth, 0);\n                        clone.rotate(-rotation, rotationCenter);\n                        textPoint = this.getMeridianPoint_(clone, rotationExten
 t, index);\n                        textPoint.rotate(rotation, rotationCenter);\n                    }\n                    feature = this.featurePool_[poolIndex++];\n                    feature.setGeometry(textPoint);\n                    feature.set('graticule_label', this.meridiansLabels_[index].text);\n                    vectorContext.drawFeature(feature, this.lonLabelStyle_(feature));\n                }\n            }\n            if (this.parallelsLabels_) {\n                if ((world === startWorld && labelsAtStart) ||\n                    (world === endWorld && !labelsAtStart)) {\n                    for (index = 0, l = this.parallels_.length; index < l; ++index) {\n                        var lineString = this.parallels_[index];\n                        if (!rotation && world === 0) {\n                            textPoint = this.getParallelPoint_(lineString, extent, index);\n                        }\n                        else {\n                            var clone 
 = lineString.clone();\n                            clone.translate(world * worldWidth, 0);\n                            clone.rotate(-rotation, rotationCenter);\n                            textPoint = this.getParallelPoint_(clone, rotationExtent, index);\n                            textPoint.rotate(rotation, rotationCenter);\n                        }\n                        feature = this.featurePool_[poolIndex++];\n                        feature.setGeometry(textPoint);\n                        feature.set('graticule_label', this.parallelsLabels_[index].text);\n                        vectorContext.drawFeature(feature, this.latLabelStyle_(feature));\n                    }\n                }\n            }\n        }\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} squaredTolerance Squared tolerance.\n     
 * @private\n     */\n    Graticule.prototype.createGraticule_ = function (extent, center, resolution, squaredTolerance) {\n        var interval = this.getInterval_(resolution);\n        if (interval == -1) {\n            this.meridians_.length = 0;\n            this.parallels_.length = 0;\n            if (this.meridiansLabels_) {\n                this.meridiansLabels_.length = 0;\n            }\n            if (this.parallelsLabels_) {\n                this.parallelsLabels_.length = 0;\n            }\n            return;\n        }\n        var wrapX = false;\n        var projectionExtent = this.projection_.getExtent();\n        var worldWidth = getWidth(projectionExtent);\n        if (this.getSource().getWrapX() &&\n            this.projection_.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            if (getWidth(extent) >= worldWidth) {\n                extent[0] = projectionExtent[0];\n                extent[2] = projectionExtent[2];\n            }\n  
           else {\n                wrapX = true;\n            }\n        }\n        // Constrain the center to fit into the extent available to the graticule\n        var validCenterP = [\n            clamp(center[0], this.minX_, this.maxX_),\n            clamp(center[1], this.minY_, this.maxY_),\n        ];\n        // Transform the center to lon lat\n        // Some projections may have a void area at the poles\n        // so replace any NaN latitudes with the min or max value closest to a pole\n        var centerLonLat = this.toLonLatTransform_(validCenterP);\n        if (isNaN(centerLonLat[1])) {\n            centerLonLat[1] =\n                Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n                    ? this.maxLat_\n                    : this.minLat_;\n        }\n        var centerLon = clamp(centerLonLat[0], this.minLon_, this.maxLon_);\n        var centerLat = clamp(centerLonLat[1], this.minLat_, this.maxLat_);\n        var maxLines = this.maxLines_;\n        var cn
 t, idx, lat, lon;\n        // Limit the extent to fit into the extent available to the graticule\n        var validExtentP = extent;\n        if (!wrapX) {\n            validExtentP = [\n                clamp(extent[0], this.minX_, this.maxX_),\n                clamp(extent[1], this.minY_, this.maxY_),\n                clamp(extent[2], this.minX_, this.maxX_),\n                clamp(extent[3], this.minY_, this.maxY_),\n            ];\n        }\n        // Transform the extent to get the lon lat ranges for the edges of the extent\n        var validExtent = applyTransform(validExtentP, this.toLonLatTransform_, undefined, 8);\n        var maxLat = validExtent[3];\n        var maxLon = validExtent[2];\n        var minLat = validExtent[1];\n        var minLon = validExtent[0];\n        if (!wrapX) {\n            // Check if extremities of the world extent lie inside the extent\n            // (for example the pole in a polar projection)\n            // and extend the extent as appropria
 te\n            if (containsCoordinate(validExtentP, this.bottomLeft_)) {\n                minLon = this.minLon_;\n                minLat = this.minLat_;\n            }\n            if (containsCoordinate(validExtentP, this.bottomRight_)) {\n                maxLon = this.maxLon_;\n                minLat = this.minLat_;\n            }\n            if (containsCoordinate(validExtentP, this.topLeft_)) {\n                minLon = this.minLon_;\n                maxLat = this.maxLat_;\n            }\n            if (containsCoordinate(validExtentP, this.topRight_)) {\n                maxLon = this.maxLon_;\n                maxLat = this.maxLat_;\n            }\n            // The transformed center may also extend the lon lat ranges used for rendering\n            maxLat = clamp(maxLat, centerLat, this.maxLat_);\n            maxLon = clamp(maxLon, centerLon, this.maxLon_);\n            minLat = clamp(minLat, this.minLat_, centerLat);\n            minLon = clamp(minLon, this.minLon_, cente
 rLon);\n        }\n        // Create meridians\n        centerLon = Math.floor(centerLon / interval) * interval;\n        lon = clamp(centerLon, this.minLon_, this.maxLon_);\n        idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);\n        cnt = 0;\n        if (wrapX) {\n            while ((lon -= interval) >= minLon && cnt++ < maxLines) {\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        else {\n            while (lon != this.minLon_ && cnt++ < maxLines) {\n                lon = Math.max(lon - interval, this.minLon_);\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        lon = clamp(centerLon, this.minLon_, this.maxLon_);\n        cnt = 0;\n        if (wrapX) {\n            while ((lon += interval) <= maxLon && cnt++ < maxLines) {\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredToler
 ance, extent, idx);\n            }\n        }\n        else {\n            while (lon != this.maxLon_ && cnt++ < maxLines) {\n                lon = Math.min(lon + interval, this.maxLon_);\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        this.meridians_.length = idx;\n        if (this.meridiansLabels_) {\n            this.meridiansLabels_.length = idx;\n        }\n        // Create parallels\n        centerLat = Math.floor(centerLat / interval) * interval;\n        lat = clamp(centerLat, this.minLat_, this.maxLat_);\n        idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0);\n        cnt = 0;\n        while (lat != this.minLat_ && cnt++ < maxLines) {\n            lat = Math.max(lat - interval, this.minLat_);\n            idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n        }\n        lat = clamp(centerLat, this.minLat_, this.maxLat_);\n        cnt =
  0;\n        while (lat != this.maxLat_ && cnt++ < maxLines) {\n            lat = Math.min(lat + interval, this.maxLat_);\n            idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n        }\n        this.parallels_.length = idx;\n        if (this.parallelsLabels_) {\n            this.parallelsLabels_.length = idx;\n        }\n    };\n    /**\n     * @param {number} resolution Resolution.\n     * @return {number} The interval in degrees.\n     * @private\n     */\n    Graticule.prototype.getInterval_ = function (resolution) {\n        var centerLon = this.projectionCenterLonLat_[0];\n        var centerLat = this.projectionCenterLonLat_[1];\n        var interval = -1;\n        var target = Math.pow(this.targetSize_ * resolution, 2);\n        /** @type {Array<number>} **/\n        var p1 = [];\n        /** @type {Array<number>} **/\n        var p2 = [];\n        for (var i = 0, ii = this.intervals_.length; i < ii; ++i) {\n            var delta = clamp(t
 his.intervals_[i] / 2, 0, 90);\n            // Don't attempt to transform latitudes beyond the poles!\n            var clampedLat = clamp(centerLat, -90 + delta, 90 - delta);\n            p1[0] = centerLon - delta;\n            p1[1] = clampedLat - delta;\n            p2[0] = centerLon + delta;\n            p2[1] = clampedLat + delta;\n            this.fromLonLatTransform_(p1, p1);\n            this.fromLonLatTransform_(p2, p2);\n            var dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);\n            if (dist <= target) {\n                break;\n            }\n            interval = this.intervals_[i];\n        }\n        return interval;\n    };\n    /**\n     * @param {number} lon Longitude.\n     * @param {number} minLat Minimal latitude.\n     * @param {number} maxLat Maximal latitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} The meridian line string.\n     * @param {number} index Index.\n     * @private\n    
  */\n    Graticule.prototype.getMeridian_ = function (lon, minLat, maxLat, squaredTolerance, index) {\n        var flatCoordinates = meridian(lon, minLat, maxLat, this.projection_, squaredTolerance);\n        var lineString = this.meridians_[index];\n        if (!lineString) {\n            lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n            this.meridians_[index] = lineString;\n        }\n        else {\n            lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n            lineString.changed();\n        }\n        return lineString;\n    };\n    /**\n     * @param {LineString} lineString Meridian\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {Point} Meridian point.\n     * @private\n     */\n    Graticule.prototype.getMeridianPoint_ = function (lineString, extent, index) {\n        var flatCoordinates = lineString.getFlatCoordinates();\n        var bottom = 1;\n    
     var top = flatCoordinates.length - 1;\n        if (flatCoordinates[bottom] > flatCoordinates[top]) {\n            bottom = top;\n            top = 1;\n        }\n        var clampedBottom = Math.max(extent[1], flatCoordinates[bottom]);\n        var clampedTop = Math.min(extent[3], flatCoordinates[top]);\n        var lat = clamp(extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_, clampedBottom, clampedTop);\n        var coordinate0 = flatCoordinates[bottom - 1] +\n            ((flatCoordinates[top - 1] - flatCoordinates[bottom - 1]) *\n                (lat - flatCoordinates[bottom])) /\n                (flatCoordinates[top] - flatCoordinates[bottom]);\n        var coordinate = [coordinate0, lat];\n        var point = this.meridiansLabels_[index].geom;\n        point.setCoordinates(coordinate);\n        return point;\n    };\n    /**\n     * Get the list of meridians.  Meridians are lines of equal longitude.\n     * @return {Array<LineString>} The meridians.\n   
   * @api\n     */\n    Graticule.prototype.getMeridians = function () {\n        return this.meridians_;\n    };\n    /**\n     * @param {number} lat Latitude.\n     * @param {number} minLon Minimal longitude.\n     * @param {number} maxLon Maximal longitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} The parallel line string.\n     * @param {number} index Index.\n     * @private\n     */\n    Graticule.prototype.getParallel_ = function (lat, minLon, maxLon, squaredTolerance, index) {\n        var flatCoordinates = parallel(lat, minLon, maxLon, this.projection_, squaredTolerance);\n        var lineString = this.parallels_[index];\n        if (!lineString) {\n            lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n        }\n        else {\n            lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n            lineString.changed();\n        }\n        return lineString;\n    };\n    /**\n     * @
 param {LineString} lineString Parallels.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {Point} Parallel point.\n     * @private\n     */\n    Graticule.prototype.getParallelPoint_ = function (lineString, extent, index) {\n        var flatCoordinates = lineString.getFlatCoordinates();\n        var left = 0;\n        var right = flatCoordinates.length - 2;\n        if (flatCoordinates[left] > flatCoordinates[right]) {\n            left = right;\n            right = 0;\n        }\n        var clampedLeft = Math.max(extent[0], flatCoordinates[left]);\n        var clampedRight = Math.min(extent[2], flatCoordinates[right]);\n        var lon = clamp(extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_, clampedLeft, clampedRight);\n        var coordinate1 = flatCoordinates[left + 1] +\n            ((flatCoordinates[right + 1] - flatCoordinates[left + 1]) *\n                (lon - flatCoordinates[left])) /
 \n                (flatCoordinates[right] - flatCoordinates[left]);\n        var coordinate = [lon, coordinate1];\n        var point = this.parallelsLabels_[index].geom;\n        point.setCoordinates(coordinate);\n        return point;\n    };\n    /**\n     * Get the list of parallels.  Parallels are lines of equal latitude.\n     * @return {Array<LineString>} The parallels.\n     * @api\n     */\n    Graticule.prototype.getParallels = function () {\n        return this.parallels_;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @private\n     */\n    Graticule.prototype.updateProjectionInfo_ = function (projection) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var worldExtent = projection.getWorldExtent();\n        this.maxLat_ = worldExtent[3];\n        this.maxLon_ = worldExtent[2];\n        this.minLat_ = worldExtent[1];\n        this.minLon_ = worldExtent[0];\n        // If the world extent c
 rosses the dateline define a custom transform to\n        // return longitudes which wrap the dateline\n        var toLonLatTransform = getTransform(projection, epsg4326Projection);\n        if (this.minLon_ < this.maxLon_) {\n            this.toLonLatTransform_ = toLonLatTransform;\n        }\n        else {\n            var split_1 = this.minLon_ + this.maxLon_ / 2;\n            this.maxLon_ += 360;\n            this.toLonLatTransform_ = function (coordinates, opt_output, opt_dimension) {\n                var dimension = opt_dimension || 2;\n                var lonLatCoordinates = toLonLatTransform(coordinates, opt_output, dimension);\n                for (var i = 0, l = lonLatCoordinates.length; i < l; i += dimension) {\n                    if (lonLatCoordinates[i] < split_1) {\n                        lonLatCoordinates[i] += 360;\n                    }\n                }\n                return lonLatCoordinates;\n            };\n        }\n        // Transform the extent to get
  the limits of the view projection extent\n        // which should be available to the graticule\n        this.fromLonLatTransform_ = getTransform(epsg4326Projection, projection);\n        var worldExtentP = applyTransform([this.minLon_, this.minLat_, this.maxLon_, this.maxLat_], this.fromLonLatTransform_, undefined, 8);\n        this.minX_ = worldExtentP[0];\n        this.maxX_ = worldExtentP[2];\n        this.minY_ = worldExtentP[1];\n        this.maxY_ = worldExtentP[3];\n        // Determine the view projection coordinates of the extremities of the world extent\n        // as these may lie inside a view extent (for example the pole in a polar projection)\n        this.bottomLeft_ = this.fromLonLatTransform_([this.minLon_, this.minLat_]);\n        this.bottomRight_ = this.fromLonLatTransform_([this.maxLon_, this.minLat_]);\n        this.topLeft_ = this.fromLonLatTransform_([this.minLon_, this.maxLat_]);\n        this.topRight_ = this.fromLonLatTransform_([this.maxLon_, this.maxLa
 t_]);\n        // Transform the projection center to lon lat\n        // Some projections may have a void area at the poles\n        // so replace any NaN latitudes with the min or max value closest to a pole\n        this.projectionCenterLonLat_ = this.toLonLatTransform_(getCenter(projection.getExtent()));\n        if (isNaN(this.projectionCenterLonLat_[1])) {\n            this.projectionCenterLonLat_[1] =\n                Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n                    ? this.maxLat_\n                    : this.minLat_;\n        }\n        this.projection_ = projection;\n    };\n    return Graticule;\n}(VectorLayer));\nexport default Graticule;\n//# sourceMappingURL=Graticule.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for
  (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Heatmap\n */\nimport VectorLayer from './Vector.js';\nimport WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getChangeEventType } from '../Object.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not 
 be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\
 n * @property {number} [radius=8] Radius size in pixels.\n * @property {number} [blur=15] Blur size in pixels.\n * @property {string|function(import(\"../Feature.js\").default):number} [weight='weight'] The feature\n * attribute to use for the weight or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    BLUR: 'blur',\n    GRADIENT: 'gradient',\n    RADIUS: 'radius',\n};\n/**\n * @const\n * @type {Array<string>}\n */\nvar DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title
 ` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nvar Heatmap = /** @class */ (function (_super) {\n    __extends(Heatmap, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Heatmap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.gradient;\n        delete baseOptions.radius;\n        delete baseOptions.blur;\n        delete baseOptions.weight;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.gradient_ = null;\n        _this.addEventListener(getChangeEventType(Property.GRADIENT), _this.handleGradientChanged_);\n        _this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n        _this.setBlur(options.blur !== undefined ? options.b
 lur : 15);\n        _this.setRadius(options.radius !== undefined ? options.radius : 8);\n        var weight = options.weight ? options.weight : 'weight';\n        if (typeof weight === 'string') {\n            _this.weightFunction_ = function (feature) {\n                return feature.get(weight);\n            };\n        }\n        else {\n            _this.weightFunction_ = weight;\n        }\n        // For performance reasons, don't sort the features before rendering.\n        // The render order is not relevant for a heatmap representation.\n        _this.setRenderOrder(null);\n        return _this;\n    }\n    /**\n     * Return the blur size in pixels.\n     * @return {number} Blur size in pixels.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getBlur = function () {\n        return /** @type {number} */ (this.get(Property.BLUR));\n    };\n    /**\n     * Return the gradient colors as array of strings.\n     * @return {Array<string>} Colors.\n     * @api\n 
     * @observable\n     */\n    Heatmap.prototype.getGradient = function () {\n        return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n    };\n    /**\n     * Return the size of the radius in pixels.\n     * @return {number} Radius size in pixel.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getRadius = function () {\n        return /** @type {number} */ (this.get(Property.RADIUS));\n    };\n    /**\n     * @private\n     */\n    Heatmap.prototype.handleGradientChanged_ = function () {\n        this.gradient_ = createGradient(this.getGradient());\n    };\n    /**\n     * Set the blur size in pixels.\n     * @param {number} blur Blur size in pixels.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setBlur = function (blur) {\n        this.set(Property.BLUR, blur);\n    };\n    /**\n     * Set the gradient colors as array of strings.\n     * @param {Array<string>} colors Gradient.\n     * @api\n     * @observable\n     */\n    Hea
 tmap.prototype.setGradient = function (colors) {\n        this.set(Property.GRADIENT, colors);\n    };\n    /**\n     * Set the size of the radius in pixels.\n     * @param {number} radius Radius size in pixel.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setRadius = function (radius) {\n        this.set(Property.RADIUS, radius);\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {WebGLPointsLayerRenderer} A layer renderer.\n     */\n    Heatmap.prototype.createRenderer = function () {\n        return new WebGLPointsLayerRenderer(this, {\n            attributes: [\n                {\n                    name: 'weight',\n                    callback: function (feature) {\n                        var weight = this.weightFunction_(feature);\n                        return weight !== undefined ? clamp(weight, 0, 1) : 1;\n                    }.bind(this),\n                },\n            ],\n            vertexShader: \"\\n        precision medi
 ump float;\\n        uniform mat4 u_projectionMatrix;\\n        uniform mat4 u_offsetScaleMatrix;\\n        uniform float u_size;\\n        attribute vec2 a_position;\\n        attribute float a_index;\\n        attribute float a_weight;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n\\n        void main(void) {\\n          mat4 offsetMatrix = u_offsetScaleMatrix;\\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\\n          v_texCoord = vec2(u, v);\\n          v_weight = a_weight;\\n        }\",\n            fragmentShader: \"\\n 
        precision mediump float;\\n        uniform float u_blurSlope;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n\\n        void main(void) {\\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\\n        }\",\n            hitVertexShader: \"\\n        precision mediump float;\\n        uniform mat4 u_projectionMatrix;\\n        uniform mat4 u_offsetScaleMatrix;\\n        uniform float u_size;\\n        attribute vec2 a_position;\\n        attribute float a_index;\\n        attribute float a_weight;\\n        attribute vec4 a_hitColor;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n        varying vec4 v_hitColor;\\n\\n        void main(void) {\\n    
       mat4 offsetMatrix = u_offsetScaleMatrix;\\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\\n          v_texCoord = vec2(u, v);\\n          v_hitColor = a_hitColor;\\n          v_weight = a_weight;\\n        }\",\n            hitFragmentShader: \"\\n        precision mediump float;\\n        uniform float u_blurSlope;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n        varying vec4 v_hitColor;\\n\\n        void main(void) {\\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\\n          float sqRadius = texCoord
 .x * texCoord.x + texCoord.y * texCoord.y;\\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\\n          if (alpha < 0.05) {\\n            discard;\\n          }\\n\\n          gl_FragColor = v_hitColor;\\n        }\",\n            uniforms: {\n                u_size: function () {\n                    return (this.get(Property.RADIUS) + this.get(Property.BLUR)) * 2;\n                }.bind(this),\n                u_blurSlope: function () {\n                    return (this.get(Property.RADIUS) / Math.max(1, this.get(Property.BLUR)));\n                }.bind(this),\n            },\n            postProcesses: [\n                {\n                    fragmentShader: \"\\n            precision mediump float;\\n\\n            uniform sampler2D u_image;\\n            uniform sampler2D u_gradientTexture;\\n\\n            varying vec2 v_texCoord;\\n\\n            void main() {\\n              vec4 color = text
 ure2D(u_image, v_texCoord);\\n              gl_FragColor.a = color.a;\\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\\n              gl_FragColor.rgb *= gl_FragColor.a;\\n            }\",\n                    uniforms: {\n                        u_gradientTexture: function () {\n                            return this.gradient_;\n                        }.bind(this),\n                    },\n                },\n            ],\n        });\n    };\n    return Heatmap;\n}(VectorLayer));\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {HTMLCanvasElement} canvas with gradient texture.\n */\nfunction createGradient(colors) {\n    var width = 1;\n    var height = 256;\n    var context = createCanvasContext2D(width, height);\n    var gradient = context.createLinearGradient(0, 0, width, height);\n    var step = 1 / (colors.length - 1);\n    for (var i = 0, ii = colors.length; i < ii; ++i) {\n        gradient.addColorStop(i * st
 ep, colors[i]);\n    }\n    context.fillStyle = gradient;\n    context.fillRect(0, 0, width, height);\n    return context.canvas;\n}\nexport default Heatmap;\n//# sourceMappingURL=Heatmap.js.map","/**\n * @module ol/format/Feature\n */\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { assign } from '../obj.js';\nimport { equivalent as equivalentProjection, get as getProjection, transformExtent, } from '../proj.js';\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile b
 eing read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to
  be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation.  This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings.  By default, coordinates are serialized\n * as they are provided at construction.  If `true`, the right-hand rule will\n * be applied.  If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings).  Note that not all\n * formats support this.  The GeoJSON format does use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also 
 be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats.  See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nvar FeatureFormat = /** @class */ (function () {\n    function FeatureFormat() {\n        /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        this.dataProjection = null;\n        /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        this.defaultFeatureProjection = null;\n    }\n    /*
 *\n     * Adds the data projection to the read options.\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Options.\n     * @return {ReadOptions|undefined} Options.\n     * @protected\n     */\n    FeatureFormat.prototype.getReadOptions = function (source, opt_options) {\n        var options;\n        if (opt_options) {\n            var dataProjection = opt_options.dataProjection\n                ? getProjection(opt_options.dataProjection)\n                : this.readProjection(source);\n            if (opt_options.extent &&\n                dataProjection &&\n                dataProjection.getUnits() === Units.TILE_PIXELS) {\n                dataProjection = getProjection(dataProjection);\n                dataProjection.setWorldExtent(opt_options.extent);\n            }\n            options = {\n                dataProjection: dataProjection,\n                featureProjection: opt_options.featureProjection,\n            };\n   
      }\n        return this.adaptOptions(options);\n    };\n    /**\n     * Sets the `dataProjection` on the options, if no `dataProjection`\n     * is set.\n     * @param {WriteOptions|ReadOptions|undefined} options\n     *     Options.\n     * @protected\n     * @return {WriteOptions|ReadOptions|undefined}\n     *     Updated options.\n     */\n    FeatureFormat.prototype.adaptOptions = function (options) {\n        return assign({\n            dataProjection: this.dataProjection,\n            featureProjection: this.defaultFeatureProjection,\n        }, options);\n    };\n    /**\n     * @abstract\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    FeatureFormat.prototype.getType = function () {\n        return abstract();\n    };\n    /**\n     * Read a single feature from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Read options.\n     * @return {import(\"../F
 eature.js\").FeatureLike} Feature.\n     */\n    FeatureFormat.prototype.readFeature = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read all features from a source.\n     *\n     * @abstract\n     * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     */\n    FeatureFormat.prototype.readFeatures = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a single geometry from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    FeatureFormat.prototype.readGeometry = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection from a sourc
 e.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    FeatureFormat.prototype.readProjection = function (source) {\n        return abstract();\n    };\n    /**\n     * Encode a feature in this format.\n     *\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     */\n    FeatureFormat.prototype.writeFeature = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features in this format.\n     *\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     */\n    FeatureFormat.prototype.writeFeatures = function (features, opt_options) {\n        return abst
 ract();\n    };\n    /**\n     * Write a single geometry in this format.\n     *\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     */\n    FeatureFormat.prototype.writeGeometry = function (geometry, opt_options) {\n        return abstract();\n    };\n    return FeatureFormat;\n}());\nexport default FeatureFormat;\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {(WriteOptions|ReadOptions)=} opt_options Options.\n * @return {import(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, opt_options) {\n    var featureProjection = opt_options\n        ? getProjection(opt_options.featureProjection)\n        : null;\n    var dataProjection = opt_options\n        ? getProjec
 tion(opt_options.dataProjection)\n        : null;\n    var transformed;\n    if (featureProjection &&\n        dataProjection &&\n        !equivalentProjection(featureProjection, dataProjection)) {\n        transformed = (write ? geometry.clone() : geometry).transform(write ? featureProjection : dataProjection, write ? dataProjection : featureProjection);\n    }\n    else {\n        transformed = geometry;\n    }\n    if (write &&\n        opt_options &&\n        /** @type {WriteOptions} */ (opt_options).decimals !== undefined) {\n        var power_1 = Math.pow(10, \n        /** @type {WriteOptions} */ (opt_options).decimals);\n        // if decimals option on write, round each coordinate appropriately\n        /**\n         * @param {Array<number>} coordinates Coordinates.\n         * @return {Array<number>} Transformed coordinates.\n         */\n        var transform = function (coordinates) {\n            for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n                co
 ordinates[i] = Math.round(coordinates[i] * power_1) / power_1;\n            }\n            return coordinates;\n        };\n        if (transformed === geometry) {\n            transformed = geometry.clone();\n        }\n        transformed.applyTransform(transform);\n    }\n    return transformed;\n}\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, opt_options) {\n    var featureProjection = opt_options\n        ? getProjection(opt_options.featureProjection)\n        : null;\n    var dataProjection = opt_options\n        ? getProjection(opt_options.dataProjection)\n        : null;\n    if (featureProjection &&\n        dataProjection &&\n        !equivalentProjection(featureProjection, dataProjection)) {\n        return transformExtent(extent, dataProjection, featureProjection);\n    }\n    els
 e {\n        return extent;\n    }\n}\n//# sourceMappingURL=Feature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiLineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\
 nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { douglasPeuckerArray } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { interpolatePoint, lineStringsCoordinateAtM, } from './flat/interpolate.js';\nimport { intersectsLineStringArray } from './flat/intersectsextent.js';\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nvar MultiLineString = /** @class */ (function (_super) {\n    __extends(MultiLineString, _super);\n    /**\n     * @param {Array<Array<import(\"../coordinate.js\").Coordinate>|LineString>|Array<number>} coordinates\n     *     Coordinates or LineString geometries. (For internal use, flat coordinates in\n     *     combination with `opt_layout` and `opt_ends` are also accepted.)\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @param {Array<number>=
 } opt_ends Flat coordinate ends for internal use.\n     */\n    function MultiLineString(coordinates, opt_layout, opt_ends) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.ends_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (Array.isArray(coordinates[0])) {\n            _this.setCoordinates(\n            /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n        }\n        else if (opt_layout !== undefined && opt_ends) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.ends_ = opt_ends;\n        }\n        else {\n            var layout = _this.getLayout();\n            var li
 neStrings = /** @type {Array<LineString>} */ (coordinates);\n            var flatCoordinates = [];\n            var ends = [];\n            for (var i = 0, ii = lineStrings.length; i < ii; ++i) {\n                var lineString = lineStrings[i];\n                if (i === 0) {\n                    layout = lineString.getLayout();\n                }\n                extend(flatCoordinates, lineString.getFlatCoordinates());\n                ends.push(flatCoordinates.length);\n            }\n            _this.setFlatCoordinates(layout, flatCoordinates);\n            _this.ends_ = ends;\n        }\n        return _this;\n    }\n    /**\n     * Append the passed linestring to the multilinestring.\n     * @param {LineString} lineString LineString.\n     * @api\n     */\n    MultiLineString.prototype.appendLineString = function (lineString) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = lineString.getFlatCoordinates().slice();\n        }\n        else {\n      
       extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n        }\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiLineString} Clone.\n     * @api\n     */\n    MultiLineString.prototype.clone = function () {\n        return new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiLineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDe
 ltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Returns the coordinate at `m` using linear interpolation, or `null` if no\n     * such coordinate exists.\n     *\n     * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n     * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n     * M will return the first coordinate and Ms greater than the last M will\n     * return the last coordinate.\n     *\n     * `opt_interpolate` controls interpolation between consecutive LineStrings\n     * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n     * will be linearly interp
 olated between the last coordinate of one LineString\n     * and the first coordinate of the next LineString.  If `opt_interpolate` is\n     * `false` then the function will return `null` for Ms falling between\n     * LineStrings.\n     *\n     * @param {number} m M.\n     * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n     * @param {boolean=} opt_interpolate Interpolate. Default is `false`.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    MultiLineString.prototype.getCoordinateAtM = function (m, opt_extrapolate, opt_interpolate) {\n        if ((this.layout != GeometryLayout.XYM &&\n            this.layout != GeometryLayout.XYZM) ||\n            this.flatCoordinates.length === 0) {\n            return null;\n        }\n        var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n        var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n        return lineStringsCo
 ordinateAtM(this.flatCoordinates, 0, this.ends_, this.stride, m, extrapolate, interpolate);\n    };\n    /**\n     * Return the coordinates of the multilinestring.\n     * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n     * @api\n     */\n    MultiLineString.prototype.getCoordinates = function () {\n        return inflateCoordinatesArray(this.flatCoordinates, 0, this.ends_, this.stride);\n    };\n    /**\n     * @return {Array<number>} Ends.\n     */\n    MultiLineString.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    /**\n     * Return the linestring at the specified index.\n     * @param {number} index Index.\n     * @return {LineString} LineString.\n     * @api\n     */\n    MultiLineString.prototype.getLineString = function (index) {\n        if (index < 0 || this.ends_.length <= index) {\n            return null;\n        }\n        return new LineString(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1
 ], this.ends_[index]), this.layout);\n    };\n    /**\n     * Return the linestrings of this multilinestring.\n     * @return {Array<LineString>} LineStrings.\n     * @api\n     */\n    MultiLineString.prototype.getLineStrings = function () {\n        var flatCoordinates = this.flatCoordinates;\n        var ends = this.ends_;\n        var layout = this.layout;\n        /** @type {Array<LineString>} */\n        var lineStrings = [];\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var lineString = new LineString(flatCoordinates.slice(offset, end), layout);\n            lineStrings.push(lineString);\n            offset = end;\n        }\n        return lineStrings;\n    };\n    /**\n     * @return {Array<number>} Flat midpoints.\n     */\n    MultiLineString.prototype.getFlatMidpoints = function () {\n        var midpoints = [];\n        var flatCoordinates = this.flatCoordinates;\n        var offset = 0;\n
         var ends = this.ends_;\n        var stride = this.stride;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var midpoint = interpolatePoint(flatCoordinates, offset, end, stride, 0.5);\n            extend(midpoints, midpoint);\n            offset = end;\n        }\n        return midpoints;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {MultiLineString} Simplified MultiLineString.\n     * @protected\n     */\n    MultiLineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEnds = [];\n        simplifiedFlatCoordinates.length = douglasPeuckerArray(this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n    };\n    /**\n     * Get
  the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiLineString.prototype.getType = function () {\n        return GeometryType.MULTI_LINE_STRING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiLineString.prototype.intersectsExtent = function (extent) {\n        return intersectsLineStringArray(this.flatCoordinates, 0, this.ends_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the multilinestring.\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n     * @param {GeometryLayout=} opt_layout Layout.\n     * @api\n     */\n    MultiLineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, c
 oordinates, 2);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n        this.changed();\n    };\n    return MultiLineString;\n}(SimpleGeometry));\nexport default MultiLineString;\n//# sourceMappingURL=MultiLineString.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.crea
 te(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiPoint\n */\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { closestSquaredDistanceXY, containsXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nvar MultiPoint = /** @class */ (function (_super) {\n    __extends(MultiPoint, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function MultiPoint(coor
 dinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        if (opt_layout && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed point to this multipoint.\n     * @param {Point} point Point.\n     * @api\n     */\n    MultiPoint.prototype.appendPoint = function (point) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = point.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, point.getFlatCoordinates());\n        }\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiPoint} Clone.\n     * @api\n     */\n    M
 ultiPoint.prototype.clone = function () {\n        var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);\n        return multiPoint;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiPoint.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        var flatCoordinates = this.flatCoordinates;\n        var stride = this.stride;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var squaredDistance = squaredDx(x, y, flatCoordinates[i], flatCoordinates[i + 1]);\n            if (squaredDistance < minSquaredDistance) {\n  
               minSquaredDistance = squaredDistance;\n                for (var j = 0; j < stride; ++j) {\n                    closestPoint[j] = flatCoordinates[i + j];\n                }\n                closestPoint.length = stride;\n            }\n        }\n        return minSquaredDistance;\n    };\n    /**\n     * Return the coordinates of the multipoint.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    MultiPoint.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the point at the specified index.\n     * @param {number} index Index.\n     * @return {Point} Point.\n     * @api\n     */\n    MultiPoint.prototype.getPoint = function (index) {\n        var n = !this.flatCoordinates\n            ? 0\n            : this.flatCoordinates.length / this.stride;\n        if (index < 0 || n <= index) {\n        
     return null;\n        }\n        return new Point(this.flatCoordinates.slice(index * this.stride, (index + 1) * this.stride), this.layout);\n    };\n    /**\n     * Return the points of this multipoint.\n     * @return {Array<Point>} Points.\n     * @api\n     */\n    MultiPoint.prototype.getPoints = function () {\n        var flatCoordinates = this.flatCoordinates;\n        var layout = this.layout;\n        var stride = this.stride;\n        /** @type {Array<Point>} */\n        var points = [];\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var point = new Point(flatCoordinates.slice(i, i + stride), layout);\n            points.push(point);\n        }\n        return points;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiPoint.prototype.getType = function () {\n        return GeometryType.MULTI_POINT;\n    };\n    /**\n     
 * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiPoint.prototype.intersectsExtent = function (extent) {\n        var flatCoordinates = this.flatCoordinates;\n        var stride = this.stride;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var x = flatCoordinates[i];\n            var y = flatCoordinates[i + 1];\n            if (containsXY(extent, x, y)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * Set the coordinates of the multipoint.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    MultiPoint.prototype.setCoordinates = function (coordinates, opt_layout) {\n      
   this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return MultiPoint;\n}(SimpleGeometry));\nexport default MultiPoint;\n//# sourceMappingURL=MultiPoint.js.map","/**\n * @module ol/geom/flat/center\n */\nimport { createEmpty, createOrUpdateFromFlatCoordinates } from '../../extent.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n    var flatCenters = [];\n    var extent = createEmpty();\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        extent = createOrUpdateF
 romFlatCoordinates(flatCoordinates, offset, ends[0], stride);\n        flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n        offset = ends[ends.length - 1];\n    }\n    return flatCenters;\n}\n//# sourceMappingURL=center.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiPolygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js
 ';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta, } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateMultiCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointsOfMultiArray } from './flat/interiorpoint.js';\nimport { inflateMultiCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingMultiArray } from './flat/intersectsextent.js';\nimport { linearRingssAreOriented, orientLinearRingsArray, } from './flat/orient.js';\nimport { linearRingss as linearRingssArea } from './flat/area.js';\nimport { linearRingss as linearRingssCenter } from './flat/center.js';\nimport { linearRingssContainsXY } from './flat/contains.js';\nimport { quantizeMultiArray } from './flat/simplify.js';\n/**\n * @classdesc\n * Multi-polygon g
 eometry.\n *\n * @api\n */\nvar MultiPolygon = /** @class */ (function (_super) {\n    __extends(MultiPolygon, _super);\n    /**\n     * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @param {Array<Array<number>>=} opt_endss Array of ends for internal use with flat coordinates.\n     */\n    function MultiPolygon(coordinates, opt_layout, opt_endss) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<Array<number>>}\n         * @private\n         */\n        _this.endss_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatInteriorPointsRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n     
    _this.flatInteriorPoints_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.orientedRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.orientedFlatCoordinates_ = null;\n        if (!opt_endss && !Array.isArray(coordinates[0])) {\n            var layout = _this.getLayout();\n            var polygons = /** @type {Array<Polygon>} */ (coordinates);\n            var flatCoordinates = [];\n            var endss = [];\n            for (var i = 0, ii = polygons.length; i < ii; ++i) {\n                var polygon = polygons[i];\n                if (i === 0) {\n                    layout = polygon.getLayout();\n                }\n                var offset = flatCoordin
 ates.length;\n                var ends = polygon.getEnds();\n                for (var j = 0, jj = ends.length; j < jj; ++j) {\n                    ends[j] += offset;\n                }\n                extend(flatCoordinates, polygon.getFlatCoordinates());\n                endss.push(ends);\n            }\n            opt_layout = layout;\n            coordinates = flatCoordinates;\n            opt_endss = endss;\n        }\n        if (opt_layout !== undefined && opt_endss) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.endss_ = opt_endss;\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed polygon to this multipolygon.\n     * @param {Polygon} polygon Polygon.\n     * @api\n     */\n    MultiPolygon.
 prototype.appendPolygon = function (polygon) {\n        /** @type {Array<number>} */\n        var ends;\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = polygon.getFlatCoordinates().slice();\n            ends = polygon.getEnds().slice();\n            this.endss_.push();\n        }\n        else {\n            var offset = this.flatCoordinates.length;\n            extend(this.flatCoordinates, polygon.getFlatCoordinates());\n            ends = polygon.getEnds().slice();\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                ends[i] += offset;\n            }\n        }\n        this.endss_.push(ends);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiPolygon} Clone.\n     * @api\n     */\n    MultiPolygon.prototype.clone = function () {\n        var len = this.endss_.length;\n        var newEndss = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            newEndss[i
 ] = this.endss_[i].slice();\n        }\n        return new MultiPolygon(this.flatCoordinates.slice(), this.layout, newEndss);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiPolygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates, 0, this.endss_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(), 0, this.endss_, 
 this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    MultiPolygon.prototype.containsXY = function (x, y) {\n        return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);\n    };\n    /**\n     * Return the area of the multipolygon on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    MultiPolygon.prototype.getArea = function () {\n        return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);\n    };\n    /**\n     * Get the coordinate array for this geometry.  This array has the structure\n     * of a GeoJSON coordinate array for multi-polygons.\n     *\n     * @param {boolean=} opt_right Orient coordinates according to the right-hand\n     *     rule (counter-clockwise for exterior and clockwise for inter
 ior rings).\n     *     If `false`, coordinates will be oriented according to the left-hand rule\n     *     (clockwise for exterior and counter-clockwise for interior rings).\n     *     By default, coordinate orientation will depend on how the geometry was\n     *     constructed.\n     * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n     * @api\n     */\n    MultiPolygon.prototype.getCoordinates = function (opt_right) {\n        var flatCoordinates;\n        if (opt_right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            orientLinearRingsArray(flatCoordinates, 0, this.endss_, this.stride, opt_right);\n        }\n        else {\n            flatCoordinates = this.flatCoordinates;\n        }\n        return inflateMultiCoordinatesArray(flatCoordinates, 0, this.endss_, this.stride);\n    };\n    /**\n     * @return {Array<Array<number>>} Endss.\n     */\n    MultiPolygon.prototype.getEndss =
  function () {\n        return this.endss_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    MultiPolygon.prototype.getFlatInteriorPoints = function () {\n        if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n            var flatCenters = linearRingssCenter(this.flatCoordinates, 0, this.endss_, this.stride);\n            this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, flatCenters);\n            this.flatInteriorPointsRevision_ = this.getRevision();\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.\n     * @return {MultiPoint} Interior points as XYM coordinates, where M is\n     * the length of the horizontal intersection that the point belongs to.\n     * @api\n     */\n    MultiPolygon.prototype.getInteriorPoints = function () {\n        return new MultiPo
 int(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);\n    };\n    /**\n     * @return {Array<number>} Oriented flat coordinates.\n     */\n    MultiPolygon.prototype.getOrientedFlatCoordinates = function () {\n        if (this.orientedRevision_ != this.getRevision()) {\n            var flatCoordinates = this.flatCoordinates;\n            if (linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {\n                this.orientedFlatCoordinates_ = flatCoordinates;\n            }\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = orientLinearRingsArray(this.orientedFlatCoordinates_, 0, this.endss_, this.stride);\n            }\n            this.orientedRevision_ = this.getRevision();\n        }\n        return this.orientedFlatCoordinates_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {MultiPolygon} Simplified Multi
 Polygon.\n     * @protected\n     */\n    MultiPolygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEndss = [];\n        simplifiedFlatCoordinates.length = quantizeMultiArray(this.flatCoordinates, 0, this.endss_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEndss);\n        return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);\n    };\n    /**\n     * Return the polygon at the specified index.\n     * @param {number} index Index.\n     * @return {Polygon} Polygon.\n     * @api\n     */\n    MultiPolygon.prototype.getPolygon = function (index) {\n        if (index < 0 || this.endss_.length <= index) {\n            return null;\n        }\n        var offset;\n        if (index === 0) {\n            offset = 0;\n        }\n        else {\n            var prevEnds = this.endss_[index - 1];\n            offset = prevEnds[pr
 evEnds.length - 1];\n        }\n        var ends = this.endss_[index].slice();\n        var end = ends[ends.length - 1];\n        if (offset !== 0) {\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                ends[i] -= offset;\n            }\n        }\n        return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);\n    };\n    /**\n     * Return the polygons of this multipolygon.\n     * @return {Array<Polygon>} Polygons.\n     * @api\n     */\n    MultiPolygon.prototype.getPolygons = function () {\n        var layout = this.layout;\n        var flatCoordinates = this.flatCoordinates;\n        var endss = this.endss_;\n        var polygons = [];\n        var offset = 0;\n        for (var i = 0, ii = endss.length; i < ii; ++i) {\n            var ends = endss[i].slice();\n            var end = ends[ends.length - 1];\n            if (offset !== 0) {\n                for (var j = 0, jj = ends.length; j < jj; ++j) {\n                    ends
 [j] -= offset;\n                }\n            }\n            var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);\n            polygons.push(polygon);\n            offset = end;\n        }\n        return polygons;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiPolygon.prototype.getType = function () {\n        return GeometryType.MULTI_POLYGON;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiPolygon.prototype.intersectsExtent = function (extent) {\n        return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the multipolygon.\n     * @param {!Ar
 ray<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    MultiPolygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 3);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var endss = deflateMultiCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.endss_);\n        if (endss.length === 0) {\n            this.flatCoordinates.length = 0;\n        }\n        else {\n            var lastEnds = endss[endss.length - 1];\n            this.flatCoordinates.length =\n                lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n        }\n        this.changed();\n    };\n    return MultiPolygon;\n}(SimpleGeometry));\nexport default MultiPolygon;\n//# sourceMappingURL=MultiPolygon.js.map","/**\n * @module ol/render/Fea
 ture\n */\nimport GeometryType from '../geom/GeometryType.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createOrUpdateFromCoordinate, createOrUpdateFromFlatCoordinates, getCenter, getHeight, } from '../extent.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray, getInteriorPointsOfMultiArray, } from '../geom/flat/interiorpoint.js';\nimport { get as getProjection } from '../proj.js';\nimport { interpolatePoint } from '../geom/flat/interpolate.js';\nimport { linearRingss as linearRingssCenter } from '../geom/flat/center.js';\nimport { transform2D } from '../geom/flat/transform.js';\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limit
 ed to getting the type and extent of the geometry.\n */\nvar RenderFeature = /** @class */ (function () {\n    /**\n     * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n     * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n     *     to be right-handed for polygons.\n     * @param {Array<number>|Array<Array<number>>} ends Ends or Endss.\n     * @param {Object<string, *>} properties Properties.\n     * @param {number|string|undefined} id Feature id.\n     */\n    function RenderFeature(type, flatCoordinates, ends, properties, id) {\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent|undefined}\n         */\n        this.extent_;\n        /**\n         * @private\n         * @type {number|string|undefined}\n         */\n        this.id_ = id;\n        /**\n         * @private\n         * @type {import(\"../geom/GeometryType.js\").default}\n         */\n        this.type_ = type;\n        /**\n   
       * @private\n         * @type {Array<number>}\n         */\n        this.flatCoordinates_ = flatCoordinates;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatInteriorPoints_ = null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatMidpoints_ = null;\n        /**\n         * @private\n         * @type {Array<number>|Array<Array<number>>}\n         */\n        this.ends_ = ends;\n        /**\n         * @private\n         * @type {Object<string, *>}\n         */\n        this.properties_ = properties;\n    }\n    /**\n     * Get a feature property by its key.\n     * @param {string} key Key\n     * @return {*} Value for the requested key.\n     * @api\n     */\n    RenderFeature.prototype.get = function (key) {\n        return this.properties_[key];\n    };\n    /**\n     * Get the extent of this feature's geometry.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * 
 @api\n     */\n    RenderFeature.prototype.getExtent = function () {\n        if (!this.extent_) {\n            this.extent_ =\n                this.type_ === GeometryType.POINT\n                    ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n                    : createOrUpdateFromFlatCoordinates(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);\n        }\n        return this.extent_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    RenderFeature.prototype.getFlatInteriorPoint = function () {\n        if (!this.flatInteriorPoints_) {\n            var flatCenter = getCenter(this.getExtent());\n            this.flatInteriorPoints_ = getInteriorPointOfArray(this.flatCoordinates_, 0, \n            /** @type {Array<number>} */ (this.ends_), 2, flatCenter, 0);\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    RenderFeature.prototype.getFlatInte
 riorPoints = function () {\n        if (!this.flatInteriorPoints_) {\n            var flatCenters = linearRingssCenter(this.flatCoordinates_, 0, \n            /** @type {Array<Array<number>>} */ (this.ends_), 2);\n            this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.flatCoordinates_, 0, \n            /** @type {Array<Array<number>>} */ (this.ends_), 2, flatCenters);\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * @return {Array<number>} Flat midpoint.\n     */\n    RenderFeature.prototype.getFlatMidpoint = function () {\n        if (!this.flatMidpoints_) {\n            this.flatMidpoints_ = interpolatePoint(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, 0.5);\n        }\n        return this.flatMidpoints_;\n    };\n    /**\n     * @return {Array<number>} Flat midpoints.\n     */\n    RenderFeature.prototype.getFlatMidpoints = function () {\n        if (!this.flatMidpoints_) {\n            this.flatMidpoints_ = [];\n     
        var flatCoordinates = this.flatCoordinates_;\n            var offset = 0;\n            var ends = /** @type {Array<number>} */ (this.ends_);\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                var end = ends[i];\n                var midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n                extend(this.flatMidpoints_, midpoint);\n                offset = end;\n            }\n        }\n        return this.flatMidpoints_;\n    };\n    /**\n     * Get the feature identifier.  This is a stable identifier for the feature and\n     * is set when reading data from a remote source.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    RenderFeature.prototype.getId = function () {\n        return this.id_;\n    };\n    /**\n     * @return {Array<number>} Flat coordinates.\n     */\n    RenderFeature.prototype.getOrientedFlatCoordinates = function () {\n        return this.flatCoordinates_;\n    };\n    /**\n     *
  For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n     * determining the geometry type in style function (see {@link #getType}).\n     * @return {RenderFeature} Feature.\n     * @api\n     */\n    RenderFeature.prototype.getGeometry = function () {\n        return this;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {RenderFeature} Simplified geometry.\n     */\n    RenderFeature.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        return this;\n    };\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {RenderFeature} Simplified geometry.\n     */\n    RenderFeature.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {\n        return thi
 s;\n    };\n    /**\n     * Get the feature properties.\n     * @return {Object<string, *>} Feature properties.\n     * @api\n     */\n    RenderFeature.prototype.getProperties = function () {\n        return this.properties_;\n    };\n    /**\n     * @return {number} Stride.\n     */\n    RenderFeature.prototype.getStride = function () {\n        return 2;\n    };\n    /**\n     * @return {undefined}\n     */\n    RenderFeature.prototype.getStyleFunction = function () {\n        return undefined;\n    };\n    /**\n     * Get the type of this feature's geometry.\n     * @return {import(\"../geom/GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    RenderFeature.prototype.getType = function () {\n        return this.type_;\n    };\n    /**\n     * Transform geometry coordinates from tile pixel space to projected.\n     * The SRS of the source and destination are expected to be the same.\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} source The current
  projection\n     * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.\n     */\n    RenderFeature.prototype.transform = function (source, destination) {\n        source = getProjection(source);\n        var pixelExtent = source.getExtent();\n        var projectedExtent = source.getWorldExtent();\n        var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n        composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n        transform2D(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, tmpTransform, this.flatCoordinates_);\n    };\n    /**\n     * @return {Array<number>|Array<Array<number>>} Ends or endss.\n     */\n    RenderFeature.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    return RenderFeature;\n}());\nRenderFeature.prototype.getEndss = RenderFeature.prototype.getEnds;\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.get
 FlatCoordinates =\n    RenderFeature.prototype.getOrientedFlatCoordinates;\nexport default RenderFeature;\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/format/MVT\n */\n//FIXME Implement projection handling\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport FeatureFormat, { transformGeometryWithOptions } from './Feature.js';\nimport FormatType from './FormatType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\ni
 mport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport PBF from 'pbf';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Projection from '../proj/Projection.js';\nimport RenderFeature from '../render/Feature.js';\nimport Units from '../proj/Units.js';\nimport { assert } from '../asserts.js';\nimport { get } from '../proj.js';\nimport { linearRingIsClockwise } from '../geom/flat/orient.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../Feature.js\").FeatureClass} [featureClass] Class for features returned by\n * {@link module:ol/format/MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry\n * support at the cost of decreased rendering performance. The default is\n * {@link module:
 ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.\n * @property {string} [geometryName='geometry'] Geometry name to use when creating features.\n * @property {string} [layerName='layer'] Name of the feature attribute that holds the layer name.\n * @property {Array<string>} [layers] Layers to read features from. If not provided, features will be read from all\n * @property {string} [idProperty] Optional property that will be assigned as the feature id and removed from the properties.\n * layers.\n */\n/**\n * @classdesc\n * Feature format for reading data in the Mapbox MVT format.\n *\n * @param {Options=} opt_options Options.\n * @api\n */\nvar MVT = /** @class */ (function (_super) {\n    __extends(MVT, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function MVT(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {Proje
 ction}\n         */\n        _this.dataProjection = new Projection({\n            code: '',\n            units: Units.TILE_PIXELS,\n        });\n        /**\n         * @private\n         * @type {import(\"../Feature.js\").FeatureClass}\n         */\n        _this.featureClass_ = options.featureClass\n            ? options.featureClass\n            : RenderFeature;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.layerName_ = options.layerName ? options.layerName : 'layer';\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.idProperty_ = options.idProperty;\n        return _this;\n    }\n    /**\n     * Read the raw geometry fro
 m the pbf offset stored in a raw feature's geometry\n     * property.\n     * @param {PBF} pbf PBF.\n     * @param {Object} feature Raw feature.\n     * @param {Array<number>} flatCoordinates Array to store flat coordinates in.\n     * @param {Array<number>} ends Array to store ends in.\n     * @private\n     */\n    MVT.prototype.readRawGeometry_ = function (pbf, feature, flatCoordinates, ends) {\n        pbf.pos = feature.geometry;\n        var end = pbf.readVarint() + pbf.pos;\n        var cmd = 1;\n        var length = 0;\n        var x = 0;\n        var y = 0;\n        var coordsLen = 0;\n        var currentEnd = 0;\n        while (pbf.pos < end) {\n            if (!length) {\n                var cmdLen = pbf.readVarint();\n                cmd = cmdLen & 0x7;\n                length = cmdLen >> 3;\n            }\n            length--;\n            if (cmd === 1 || cmd === 2) {\n                x += pbf.readSVarint();\n                y += pbf.readSVarint();\n                if 
 (cmd === 1) {\n                    // moveTo\n                    if (coordsLen > currentEnd) {\n                        ends.push(coordsLen);\n                        currentEnd = coordsLen;\n                    }\n                }\n                flatCoordinates.push(x, y);\n                coordsLen += 2;\n            }\n            else if (cmd === 7) {\n                if (coordsLen > currentEnd) {\n                    // close polygon\n                    flatCoordinates.push(flatCoordinates[currentEnd], flatCoordinates[currentEnd + 1]);\n                    coordsLen += 2;\n                }\n            }\n            else {\n                assert(false, 59); // Invalid command found in the PBF\n            }\n        }\n        if (coordsLen > currentEnd) {\n            ends.push(coordsLen);\n            currentEnd = coordsLen;\n        }\n    };\n    /**\n     * @private\n     * @param {PBF} pbf PBF\n     * @param {Object} rawFeature Raw Mapbox feature.\n     * @param {
 import(\"./Feature.js\").ReadOptions} options Read options.\n     * @return {import(\"../Feature.js\").FeatureLike} Feature.\n     */\n    MVT.prototype.createFeature_ = function (pbf, rawFeature, options) {\n        var type = rawFeature.type;\n        if (type === 0) {\n            return null;\n        }\n        var feature;\n        var values = rawFeature.properties;\n        var id;\n        if (!this.idProperty_) {\n            id = rawFeature.id;\n        }\n        else {\n            id = values[this.idProperty_];\n            delete values[this.idProperty_];\n        }\n        values[this.layerName_] = rawFeature.layer.name;\n        var flatCoordinates = [];\n        var ends = [];\n        this.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);\n        var geometryType = getGeometryType(type, ends.length);\n        if (this.featureClass_ === RenderFeature) {\n            feature = new this.featureClass_(geometryType, flatCoordinates, ends, values, id);\n      
       feature.transform(options.dataProjection, options.featureProjection);\n        }\n        else {\n            var geom = void 0;\n            if (geometryType == GeometryType.POLYGON) {\n                var endss = [];\n                var offset = 0;\n                var prevEndIndex = 0;\n                for (var i = 0, ii = ends.length; i < ii; ++i) {\n                    var end = ends[i];\n                    // classifies an array of rings into polygons with outer rings and holes\n                    if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n                        endss.push(ends.slice(prevEndIndex, i + 1));\n                    }\n                    else {\n                        if (endss.length === 0) {\n                            continue;\n                        }\n                        endss[endss.length - 1].push(ends[prevEndIndex]);\n                    }\n                    prevEndIndex = i + 1;\n                    offset = end;\n 
                }\n                if (endss.length > 1) {\n                    geom = new MultiPolygon(flatCoordinates, GeometryLayout.XY, endss);\n                }\n                else {\n                    geom = new Polygon(flatCoordinates, GeometryLayout.XY, ends);\n                }\n            }\n            else {\n                geom =\n                    geometryType === GeometryType.POINT\n                        ? new Point(flatCoordinates, GeometryLayout.XY)\n                        : geometryType === GeometryType.LINE_STRING\n                            ? new LineString(flatCoordinates, GeometryLayout.XY)\n                            : geometryType === GeometryType.POLYGON\n                                ? new Polygon(flatCoordinates, GeometryLayout.XY, ends)\n                                : geometryType === GeometryType.MULTI_POINT\n                                    ? new MultiPoint(flatCoordinates, GeometryLayout.XY)\n                                    : g
 eometryType === GeometryType.MULTI_LINE_STRING\n                                        ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends)\n                                        : null;\n            }\n            var ctor = /** @type {typeof import(\"../Feature.js\").default} */ (this\n                .featureClass_);\n            feature = new ctor();\n            if (this.geometryName_) {\n                feature.setGeometryName(this.geometryName_);\n            }\n            var geometry = transformGeometryWithOptions(geom, false, options);\n            feature.setGeometry(geometry);\n            feature.setId(id);\n            feature.setProperties(values, true);\n        }\n        return feature;\n    };\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    MVT.prototype.getType = function () {\n        return FormatType.ARRAY_BUFFER;\n    };\n    /**\n     * Read all features.\n     *\n     * @param {ArrayBuffer} source Source.\
 n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    MVT.prototype.readFeatures = function (source, opt_options) {\n        var layers = this.layers_;\n        var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (this.adaptOptions(opt_options));\n        var dataProjection = get(options.dataProjection);\n        dataProjection.setWorldExtent(options.extent);\n        options.dataProjection = dataProjection;\n        var pbf = new PBF(/** @type {ArrayBuffer} */ (source));\n        var pbfLayers = pbf.readFields(layersPBFReader, {});\n        var features = [];\n        for (var name_1 in pbfLayers) {\n            if (layers && layers.indexOf(name_1) == -1) {\n                continue;\n            }\n            var pbfLayer = pbfLayers[name_1];\n            var extent = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;\n            d
 ataProjection.setExtent(extent);\n            for (var i = 0, ii = pbfLayer.length; i < ii; ++i) {\n                var rawFeature = readRawFeature(pbf, pbfLayer, i);\n                features.push(this.createFeature_(pbf, rawFeature, options));\n            }\n        }\n        return features;\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    MVT.prototype.readProjection = function (source) {\n        return this.dataProjection;\n    };\n    /**\n     * Sets the layers that features will be read from.\n     * @param {Array<string>} layers Layers.\n     * @api\n     */\n    MVT.prototype.setLayers = function (layers) {\n        this.layers_ = layers;\n    };\n    return MVT;\n}(FeatureFormat));\n/**\n * Reader callback for parsing layers.\n * @param {number} tag The tag.\n * @param {Object} layers The 
 layers object.\n * @param {PBF} pbf The PBF.\n */\nfunction layersPBFReader(tag, layers, pbf) {\n    if (tag === 3) {\n        var layer = {\n            keys: [],\n            values: [],\n            features: [],\n        };\n        var end = pbf.readVarint() + pbf.pos;\n        pbf.readFields(layerPBFReader, layer, end);\n        layer.length = layer.features.length;\n        if (layer.length) {\n            layers[layer.name] = layer;\n        }\n    }\n}\n/**\n * Reader callback for parsing layer.\n * @param {number} tag The tag.\n * @param {Object} layer The layer object.\n * @param {PBF} pbf The PBF.\n */\nfunction layerPBFReader(tag, layer, pbf) {\n    if (tag === 15) {\n        layer.version = pbf.readVarint();\n    }\n    else if (tag === 1) {\n        layer.name = pbf.readString();\n    }\n    else if (tag === 5) {\n        layer.extent = pbf.readVarint();\n    }\n    else if (tag === 2) {\n        layer.features.push(pbf.pos);\n    }\n    else if (tag === 3) {\n       
  layer.keys.push(pbf.readString());\n    }\n    else if (tag === 4) {\n        var value = null;\n        var end = pbf.readVarint() + pbf.pos;\n        while (pbf.pos < end) {\n            tag = pbf.readVarint() >> 3;\n            value =\n                tag === 1\n                    ? pbf.readString()\n                    : tag === 2\n                        ? pbf.readFloat()\n                        : tag === 3\n                            ? pbf.readDouble()\n                            : tag === 4\n                                ? pbf.readVarint64()\n                                : tag === 5\n                                    ? pbf.readVarint()\n                                    : tag === 6\n                                        ? pbf.readSVarint()\n                                        : tag === 7\n                                            ? pbf.readBoolean()\n                                            : null;\n        }\n        layer.values.push(value);\n    }
 \n}\n/**\n * Reader callback for parsing feature.\n * @param {number} tag The tag.\n * @param {Object} feature The feature object.\n * @param {PBF} pbf The PBF.\n */\nfunction featurePBFReader(tag, feature, pbf) {\n    if (tag == 1) {\n        feature.id = pbf.readVarint();\n    }\n    else if (tag == 2) {\n        var end = pbf.readVarint() + pbf.pos;\n        while (pbf.pos < end) {\n            var key = feature.layer.keys[pbf.readVarint()];\n            var value = feature.layer.values[pbf.readVarint()];\n            feature.properties[key] = value;\n        }\n    }\n    else if (tag == 3) {\n        feature.type = pbf.readVarint();\n    }\n    else if (tag == 4) {\n        feature.geometry = pbf.pos;\n    }\n}\n/**\n * Read a raw feature from the pbf offset stored at index `i` in the raw layer.\n * @param {PBF} pbf PBF.\n * @param {Object} layer Raw layer.\n * @param {number} i Index of the feature in the raw layer's `features` array.\n * @return {Object} Raw feature.\n */\nfu
 nction readRawFeature(pbf, layer, i) {\n    pbf.pos = layer.features[i];\n    var end = pbf.readVarint() + pbf.pos;\n    var feature = {\n        layer: layer,\n        type: 0,\n        properties: {},\n    };\n    pbf.readFields(featurePBFReader, feature, end);\n    return feature;\n}\n/**\n * @param {number} type The raw feature's geometry type\n * @param {number} numEnds Number of ends of the flat coordinates of the\n * geometry.\n * @return {import(\"../geom/GeometryType.js\").default} The geometry type.\n */\nfunction getGeometryType(type, numEnds) {\n    /** @type {import(\"../geom/GeometryType.js\").default} */\n    var geometryType;\n    if (type === 1) {\n        geometryType =\n            numEnds === 1 ? GeometryType.POINT : GeometryType.MULTI_POINT;\n    }\n    else if (type === 2) {\n        geometryType =\n            numEnds === 1 ? GeometryType.LINE_STRING : GeometryType.MULTI_LINE_STRING;\n    }\n    else if (type === 3) {\n        geometryType = GeometryType.POLYG
 ON;\n        // MultiPolygon not relevant for rendering - winding order determines\n        // outer rings of polygons.\n    }\n    return geometryType;\n}\nexport default MVT;\n//# sourceMappingURL=MVT.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/VectorTile\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport TileP
 roperty from './TileProperty.js';\nimport VectorTileRenderType from './VectorTileRenderType.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * v
 isible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at lea
 st the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n *    are always rotated with the view and pixels are scaled during zoom animations. When `declutter`\n *    is set to `true`, the decluttering is done per tile resulting in labels and point symbols getting\n *    cut off at tile boundaries.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n *    another layer with the same source).
 \n * @property {import(\"../source/VectorTile.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default sty
 le which will be used if this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting
  `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @param {Options=} opt_options Options.\n * @extends {BaseVectorLayer<import(\"../source/VectorTile.js\").default>}\n * @api\n */\nvar VectorTileLayer = /** @class */ (function (_super) {\n    __extends(VectorTileLayer, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function VectorTileLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = /** @type {Object} */ (assign({}, options));\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesOnError;\n        _this = _super.call(this, /** @type {import(\"./BaseVector.js\").Options} */ (baseOptions)) || this;\n        var renderMode = options.renderMode || VectorTileRenderType.HYBRID;\n        assert(renderMode == undefined ||\n            renderMode == VectorTileRenderType.IMAGE ||\n            renderM
 ode == VectorTileRenderType.HYBRID ||\n            renderMode == VectorTileRenderType.VECTOR, 28); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`.\n        /**\n         * @private\n         * @type {import(\"./VectorTileRenderType.js\").default}\n         */\n        _this.renderMode_ = renderMode;\n        _this.setPreload(options.preload ? options.preload : 0);\n        _this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined\n            ? options.useInterimTilesOnError\n            : true);\n        return _this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    VectorTileLayer.prototype.createRenderer = function () {\n        return new CanvasVectorTileLayerRenderer(this);\n    };\n    /**\n     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n     * that resolves with an array of fea
 tures. The array will either contain the topmost feature\n     * when a hit was detected, or it will be empty.\n     *\n     * The hit detection algorithm used for this method is optimized for performance, but is less\n     * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n     * is not considered, and icons are only represented by their bounding box instead of the exact\n     * image.\n     *\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n     * @api\n     */\n    VectorTileLayer.prototype.getFeatures = function (pixel) {\n        return _super.prototype.getFeatures.call(this, pixel);\n    };\n    /**\n     * @return {import(\"./VectorTileRenderType.js\").default} The render mode.\n     */\n    VectorTileLayer.prototype.getRenderMode = function () {\n        return this.renderMode_;\n    };\n    /**\n 
     * Return the level as number to which we will preload tiles up to.\n     * @return {number} The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.getPreload = function () {\n        return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n    };\n    /**\n     * Whether we use interim tiles on error.\n     * @return {boolean} Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.getUseInterimTilesOnError = function () {\n        return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n    };\n    /**\n     * Set the level as number to which we will preload tiles up to.\n     * @param {number} preload The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.setPreload = function (preload) {\n        this.set(TileProperty.PRELOAD, preload);\n    };\n    /**\n     * Set whether we use interim tiles on
  error.\n     * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n        this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    };\n    return VectorTileLayer;\n}(BaseVectorLayer));\nexport default VectorTileLayer;\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  IDLE: 0,\n  LOADING: 1,\n  LOADED: 2,\n  ERROR: 3,\n  EMPTY: 4,\n};\n","/**\n * @module ol/util\n */\n\n/**\n * @return {?} Any return.\n */\nexport function abstract() {\n  return /** @type {?} */ ((function () {\n    throw new Error('Unimplemented abstract method.');\n  })());\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nlet uidCounter_ = 0;\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with 
 the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n  return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport const VERSION = 'latest';\n","/**\n * @module ol/size\n */\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, opt_size) {\n  if (opt_size === undefined) {\n    opt_size = [0, 0];\n  }\n  opt_size[0] = size[0] + 2 * num;\n  opt_size[1] = si
 ze[1] + 2 * num;\n  return opt_size;\n}\n\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n  return size[0] > 0 && size[1] > 0;\n}\n\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, opt_size) {\n  if (opt_size === undefined) {\n    opt_size = [0, 0];\n  }\n  opt_size[0] = (size[0] * ratio + 0.5) | 0;\n  opt_size[1] = (size[1] * ratio + 0.5) | 0;\n  return opt_size;\n}\n\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} Size.\n *
  @api\n */\nexport function toSize(size, opt_size) {\n  if (Array.isArray(size)) {\n    return size;\n  } else {\n    if (opt_size === undefined) {\n      opt_size = [size, size];\n    } else {\n      opt_size[0] = size;\n      opt_size[1] = size;\n    }\n    return opt_size;\n  }\n}\n","/**\n * @module ol/style/Image\n */\nimport {abstract} from '../util.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity\n * @property {boolean} rotateWithView\n * @property {number} rotation\n * @property {number|import(\"../size.js\").Size} scale\n * @property {Array<number>} displacement\n */\n\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nclass ImageStyle {\n  /**\n   * @param {Options} options Options.\n   *
 /\n  constructor(options) {\n    /**\n     * @private\n     * @type {number}\n     */\n    this.opacity_ = options.opacity;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.rotateWithView_ = options.rotateWithView;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.rotation_ = options.rotation;\n\n    /**\n     * @private\n     * @type {number|import(\"../size.js\").Size}\n     */\n    this.scale_ = options.scale;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.scaleArray_ = toSize(options.scale);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.displacement_ = options.displacement;\n  }\n\n  /**\n   * Clones the style.\n   * @return {ImageStyle} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new ImageStyle({\n      opacity: this.getOpacity(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      rotation: this
 .getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      displacement: this.getDisplacement().slice(),\n    });\n  }\n\n  /**\n   * Get the symbolizer opacity.\n   * @return {number} Opacity.\n   * @api\n   */\n  getOpacity() {\n    return this.opacity_;\n  }\n\n  /**\n   * Determine whether the symbolizer rotates with the map.\n   * @return {boolean} Rotate with map.\n   * @api\n   */\n  getRotateWithView() {\n    return this.rotateWithView_;\n  }\n\n  /**\n   * Get the symoblizer rotation.\n   * @return {number} Rotation.\n   * @api\n   */\n  getRotation() {\n    return this.rotation_;\n  }\n\n  /**\n   * Get the symbolizer scale.\n   * @return {number|import(\"../size.js\").Size} Scale.\n   * @api\n   */\n  getScale() {\n    return this.scale_;\n  }\n\n  /**\n   * Get the symbolizer scale array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */\n  getScaleArray() {\n    return this.scaleArray_;\n  }\n\n  /**\n   * Get the displacement of the shape\n  
  * @return {Array<number>} Shape's center displacement\n   * @api\n   */\n  getDisplacement() {\n    return this.displacement_;\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @abstract\n   * @return {Array<number>} Anchor.\n   */\n  getAnchor() {\n    return abstract();\n  }\n\n  /**\n   * Get the image element for the symbolizer.\n   * @abstract\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n   */\n  getImage(pixelRatio) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n   */\n  getHitDetectionImage(pixelRatio) {\n    return abstract();\n  }\n\n  /*\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * */\n  getPixelRatio(pixelRatio) {\n    return 1;\n  }\n\n  /
 **\n   * @abstract\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  getImageSize() {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n   */\n  getHitDetectionImageSize() {\n    return abstract();\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @abstract\n   * @return {Array<number>} Origin.\n   */\n  getOrigin() {\n    return abstract();\n  }\n\n  /**\n   * Get the size of the symbolizer (in pixels).\n   * @abstract\n   * @return {import(\"../size.js\").Size} Size.\n   */\n  getSize() {\n    return abstract();\n  }\n\n  /**\n   * Set the opacity.\n   *\n   * @param {number} opacity Opacity.\n   * @api\n   */\n  setOpacity(opacity) {\n    this.opacity_ = opacity;\n  }\n\n  /**\n   * Set whether to rotate the style with the view.
 \n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */\n  setRotateWithView(rotateWithView) {\n    this.rotateWithView_ = rotateWithView;\n  }\n\n  /**\n   * Set the rotation.\n   *\n   * @param {number} rotation Rotation.\n   * @api\n   */\n  setRotation(rotation) {\n    this.rotation_ = rotation;\n  }\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size} scale Scale.\n   * @api\n   */\n  setScale(scale) {\n    this.scale_ = scale;\n    this.scaleArray_ = toSize(scale);\n  }\n\n  /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  listenImageChange(listener) {\n    abstract();\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @abstract\n   */\n  load() {\n    abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  unlistenImageChange(listener) {\n    abstract(
 );\n  }\n}\n\nexport default ImageStyle;\n","/**\n * @module ol/AssertionError\n */\nimport {VERSION} from './util.js';\n\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nclass AssertionError extends Error {\n  /**\n   * @param {number} code Error code.\n   */\n  constructor(code) {\n    const path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n    const message =\n      'Assertion failed. See https://openlayers.org/en/' +\n      path +\n      '/doc/errors/#' +\n      code +\n      ' for details.';\n\n    super(message);\n\n    /**\n     * Error code. The meaning of the code can be found on\n     * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n     * the version found in the OpenLayers script's header comment if a version\n     * other than the latest is used).\n     * @typ
 e {number}\n     * @api\n     */\n    this.code = code;\n\n    /**\n     * @type {string}\n     */\n    this.name = 'AssertionError';\n\n    // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n    this.message = message;\n  }\n}\n\nexport default AssertionError;\n","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n  if (!assertion) {\n    throw new AssertionError(errorCode);\n  }\n}\n","/**\n * @module ol/math\n */\n\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clam
 p(value, min, max) {\n  return Math.min(Math.max(value, min), max);\n}\n\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport const cosh = (function () {\n  // Wrapped in a iife, to save the overhead of checking for the native\n  // implementation on every invocation.\n  let cosh;\n  if ('cosh' in Math) {\n    // The environment supports the native Math.cosh function, use it…\n    cosh = Math.cosh;\n  } else {\n    // … else, use the reference implementation of MDN:\n    cosh = function (x) {\n      const y = /** @type {Math} */ (Math).exp(x);\n      return (y + 1 / y) / 2;\n    };\n  }\n  return cosh;\n})();\n\n/**\n * Return the base 2 logarithm of a given number. The method will use the\n
  * native `Math.log2` function if it is available, otherwise the base 2\n * logarithm will be calculated via the reference implementation of the\n * Mozilla developer network.\n *\n * @param {number} x X.\n * @return {number} Base 2 logarithm of x.\n */\nexport const log2 = (function () {\n  // Wrapped in a iife, to save the overhead of checking for the native\n  // implementation on every invocation.\n  let log2;\n  if ('log2' in Math) {\n    // The environment supports the native Math.log2 function, use it…\n    log2 = Math.log2;\n  } else {\n    // … else, use the reference implementation of MDN:\n    log2 = function (x) {\n      return Math.log(x) * Math.LOG2E;\n    };\n  }\n  return log2;\n})();\n\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.
 \n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  if (dx !== 0 || dy !== 0) {\n    const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      x1 = x2;\n      y1 = y2;\n    } else if (t > 0) {\n      x1 += dx * t;\n      y1 += dy * t;\n    }\n  }\n  return squaredDistance(x, y, x1, y1);\n}\n\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  return dx * dx + dy * dy;\n}\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     i
 n row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n  const n = mat.length;\n\n  for (let i = 0; i < n; i++) {\n    // Find max in the i-th column (ignoring i - 1 first rows)\n    let maxRow = i;\n    let maxEl = Math.abs(mat[i][i]);\n    for (let r = i + 1; r < n; r++) {\n      const absValue = Math.abs(mat[r][i]);\n      if (absValue > maxEl) {\n        maxEl = absValue;\n        maxRow = r;\n      }\n    }\n\n    if (maxEl === 0) {\n      return null; // matrix is singular\n    }\n\n    // Swap max row with i-th (current) row\n    const tmp = mat[maxRow];\n    mat[maxRow] = mat[i];\n    mat[i] = tmp;\n\n    // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n    for (let j = i + 1; j < n; j++) {\n      const coef = -mat[j][i] / mat[i][i];\n      for (let k = i; k < n + 1; k++) {\n        if (i == k) {\n          mat[j][k] = 0;\n        } else {\n          mat[j][k] += coef * mat[i][k];\n   
      }\n      }\n    }\n  }\n\n  // Solve Ax=b for upper triangular matrix A (mat)\n  const x = new Array(n);\n  for (let l = n - 1; l >= 0; l--) {\n    x[l] = mat[l][n] / mat[l][l];\n    for (let m = l - 1; m >= 0; m--) {\n      mat[m][n] -= mat[m][l] * x[l];\n    }\n  }\n  return x;\n}\n\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n  return (angleInRadians * 180) / Math.PI;\n}\n\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n  return (angleInDegrees * Math.PI) / 180;\n}\n\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n  const r = a % b;\n  return r * b < 
 0 ? r + b : r;\n}\n\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n  return a + x * (b - a);\n}\n","/**\n * @module ol/color\n */\nimport {assert} from './asserts.js';\nimport {clamp} from './math.js';\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nconst HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n\n/**\n * Regular expression for matching potential named color style st
 rings.\n * @const\n * @type {RegExp}\n * @private\n */\nconst NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n  if (typeof color === 'string') {\n    return color;\n  } else {\n    return toString(color);\n  }\n}\n\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n  const el = document.createElement('div');\n  el.style.color = color;\n  if (el.style.color !== '') {\n    document.body.appendChild(el);\n    const rgb = getComputedStyle(el).color;\n    document.body.removeChild(el);\n    return rgb;\n  } else {\n    return '';\n  }\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport const fromString = (function () {\n  // We maintain a small cache of parsed strings.  To provide cheap LRU-
 like\n  // semantics, whenever the cache grows too large we simply delete an\n  // arbitrary 25% of the entries.\n\n  /**\n   * @const\n   * @type {number}\n   */\n  const MAX_CACHE_SIZE = 1024;\n\n  /**\n   * @type {Object<string, Color>}\n   */\n  const cache = {};\n\n  /**\n   * @type {number}\n   */\n  let cacheSize = 0;\n\n  return (\n    /**\n     * @param {string} s String.\n     * @return {Color} Color.\n     */\n    function (s) {\n      let color;\n      if (cache.hasOwnProperty(s)) {\n        color = cache[s];\n      } else {\n        if (cacheSize >= MAX_CACHE_SIZE) {\n          let i = 0;\n          for (const key in cache) {\n            if ((i++ & 3) === 0) {\n              delete cache[key];\n              --cacheSize;\n            }\n          }\n        }\n        color = fromStringInternal_(s);\n        cache[s] = color;\n        ++cacheSize;\n      }\n      return color;\n    }\n  );\n})();\n\n/**\n * Return the color as an array. This function maintains a cache 
 of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n  if (Array.isArray(color)) {\n    return color;\n  } else {\n    return fromString(color);\n  }\n}\n\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n  let r, g, b, a, color;\n\n  if (NAMED_COLOR_RE_.exec(s)) {\n    s = fromNamed(s);\n  }\n\n  if (HEX_COLOR_RE_.exec(s)) {\n    // hex\n    const n = s.length - 1; // number of hex digits\n    let d; // number of digits per channel\n    if (n <= 4) {\n      d = 1;\n    } else {\n      d = 2;\n    }\n    const hasAlpha = n === 4 || n === 8;\n    r = parseInt(s.substr(1 + 0 * d, d), 16);\n    g = parseInt(s.substr(1 + 1 * d, d), 16);\n    b = parseInt(s.substr(1 + 2 * d, d), 16);\n    if (hasAlpha) {\n      a = parseInt(s.substr(1 + 3 * d, d), 16);\n    } else {\n      a = 255;\n    }\n 
    if (d == 1) {\n      r = (r << 4) + r;\n      g = (g << 4) + g;\n      b = (b << 4) + b;\n      if (hasAlpha) {\n        a = (a << 4) + a;\n      }\n    }\n    color = [r, g, b, a / 255];\n  } else if (s.indexOf('rgba(') == 0) {\n    // rgba()\n    color = s.slice(5, -1).split(',').map(Number);\n    normalize(color);\n  } else if (s.indexOf('rgb(') == 0) {\n    // rgb()\n    color = s.slice(4, -1).split(',').map(Number);\n    color.push(1);\n    normalize(color);\n  } else {\n    assert(false, 14); // Invalid color\n  }\n  return color;\n}\n\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n  color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n  color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n  color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n  color[3] = clamp(color[3], 0, 1);\n  return color;\n}\n\n/**\n * @param {Color} color Color.\n *
  @return {string} String.\n */\nexport function toString(color) {\n  let r = color[0];\n  if (r != (r | 0)) {\n    r = (r + 0.5) | 0;\n  }\n  let g = color[1];\n  if (g != (g | 0)) {\n    g = (g + 0.5) | 0;\n  }\n  let b = color[2];\n  if (b != (b | 0)) {\n    b = (b + 0.5) | 0;\n  }\n  const a = color[3] === undefined ? 1 : color[3];\n  return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n  if (NAMED_COLOR_RE_.test(s)) {\n    s = fromNamed(s);\n  }\n  return (\n    HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0\n  );\n}\n","/**\n * @module ol/colorlike\n */\nimport {toString} from './color.js';\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style 
 is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n  if (Array.isArray(color)) {\n    return toString(color);\n  } else {\n    return color;\n  }\n}\n","/**\n * @module ol/has\n */\n\nconst ua =\n  typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n    ? navigator.userAgent.toLowerCase()\n    : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport const FIREFOX = ua.indexOf('firefox') !== -1;\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport
  const SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.indexOf('macintosh') !== -1;\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport const DEVICE_PIXEL_RATIO =\n  typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n  typeof WorkerGlobalScope !== 'undefined' &&\n  typeof OffscreenCanvas !== 'undefined' &&\n  self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.
 prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n  typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n  let passive = false;\n  try {\n    const options = Object.defineProperty({}, 'passive', {\n      get: function () {\n        passive = true;\n      },\n    });\n\n    window.addEventListener('_', null, options);\n    window.removeEventListener('_', null, options);\n  } catch (error) {\n    // passive not supported\n  }\n  return passive;\n})();\n","import {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\n/**\n * @module ol/dom\n */\n\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number=} opt_width Canvas width.\n * @param {number=} opt_height Canvas height.\n * @param {Array<HTMLCanvasElement>=} opt_canvasPool Canvas pool to take existing canvas from.\n * @return {CanvasRend
 eringContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height, opt_canvasPool) {\n  const canvas =\n    opt_canvasPool && opt_canvasPool.length\n      ? opt_canvasPool.shift()\n      : WORKER_OFFSCREEN_CANVAS\n      ? new OffscreenCanvas(opt_width || 300, opt_height || 300)\n      : document.createElement('canvas');\n  if (opt_width) {\n    canvas.width = opt_width;\n  }\n  if (opt_height) {\n    canvas.height = opt_height;\n  }\n  //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n  return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\n\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n  let width = element.offsetWidth;\n  const style = getComputedStyle(element);\n  width += parseInt(style.
 marginLeft, 10) + parseInt(style.marginRight, 10);\n\n  return width;\n}\n\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n  let height = element.offsetHeight;\n  const style = getComputedStyle(element);\n  height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n  return height;\n}\n\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n  const parent = oldNode.parentNode;\n  if (parent) {\n    parent.replaceChild(newNode, oldNode);\n  }\n}\n\n/**\n * @param {Node} node The node to remove.\n * @returns {Node} The node that was removed or null.\n */\nexport function removeNode(node) {\n  return node && node.parentNode ? node.pa
 rentNode.removeChild(node) : null;\n}\n\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n  while (node.lastChild) {\n    node.removeChild(node.lastChild);\n  }\n}\n\n/**\n * Transform the children of a parent node so they match the\n * provided list of children.  This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n  const oldChildren = node.childNodes;\n\n  for (let i = 0; true; ++i) {\n    const oldChild = oldChildren[i];\n    const newChild = children[i];\n\n    // check if our work is done\n    if (!oldChild && !newChild) {\n      break;\n    }\n\n    // check if children match\n    if (oldChild === newChild) {\n      co
 ntinue;\n    }\n\n    // check if a new child needs to be added\n    if (!oldChild) {\n      node.appendChild(newChild);\n      continue;\n    }\n\n    // check if an old child needs to be removed\n    if (!newChild) {\n      node.removeChild(oldChild);\n      --i;\n      continue;\n    }\n\n    // reorder\n    node.insertBefore(newChild, oldChild);\n  }\n}\n","/**\n * @module ol/events/Event\n */\n\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nclass BaseEvent {\n  /**\n   * @param {string} type Type.\n   */\n  constructor(type) {\n    /**\n     * @type {boolean}\n     */\n    this.propagati
 onStopped;\n\n    /**\n     * The event type.\n     * @type {string}\n     * @api\n     */\n    this.type = type;\n\n    /**\n     * The event target.\n     * @type {Object}\n     * @api\n     */\n    this.target = null;\n  }\n\n  /**\n   * Stop event propagation.\n   * @api\n   */\n  preventDefault() {\n    this.propagationStopped = true;\n  }\n\n  /**\n   * Stop event propagation.\n   * @api\n   */\n  stopPropagation() {\n    this.propagationStopped = true;\n  }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n  evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n  evt.preventDefault();\n}\n\nexport default BaseEvent;\n","/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a property is changed.\n   * @event module:ol/Object.ObjectEvent#propertychange\n   * @api\n   
 */\n  PROPERTYCHANGE: 'propertychange',\n};\n","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n  constructor() {\n    /**\n     * The object has already been disposed.\n     * @type {boolean}\n     * @protected\n     */\n    this.disposed = false;\n  }\n\n  /**\n   * Clean up.\n   */\n  dispose() {\n    if (!this.disposed) {\n      this.disposed = true;\n      this.disposeInternal();\n    }\n  }\n\n  /**\n   * Extension point for disposable objects.\n   * @protected\n   */\n  disposeInternal() {}\n}\n\nexport default Disposable;\n","/**\n * @module ol/array\n */\n\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function=} opt_comparator Comp
 arator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, opt_comparator) {\n  let mid, cmp;\n  const comparator = opt_comparator || numberSafeCompareFunction;\n  let low = 0;\n  let high = haystack.length;\n  let found = false;\n\n  while (low < high) {\n    /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n     * to double (which gives the wrong results). */\n    mid = low + ((high - low) >> 1);\n    cmp = +comparator(haystack[mid], needle);\n\n    if (cmp < 0.0) {\n      /* Too low. */\n      low = mid + 1;\n    } else {\n      /* Key found or too high */\n      high = mid;\n      found = !cmp;\n    }\n  }\n\n  /* Key not found. */\n  return found ? low : ~low;\n}\n\n/**\n * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or
  a positive number as the first\n *     argument is less than, equal to, or greater than the second.\n */\nexport function numberSafeCompareFunction(a, b) {\n  return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * Whether the array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nexport function includes(arr, obj) {\n  return arr.indexOf(obj) >= 0;\n}\n\n/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n *    means return the largest nearest, < 0 means return the\n *    smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n  const n = arr.length;\n  if (arr[0] <= target) {\n    return 0;\n  } else if (target <= arr[n - 1]) {\n    return n - 1;\n  } else {\n    let i;\n    if (directio
 n > 0) {\n      for (i = 1; i < n; ++i) {\n        if (arr[i] < target) {\n          return i - 1;\n        }\n      }\n    } else if (direction < 0) {\n      for (i = 1; i < n; ++i) {\n        if (arr[i] <= target) {\n          return i;\n        }\n      }\n    } else {\n      for (i = 1; i < n; ++i) {\n        if (arr[i] == target) {\n          return i;\n        } else if (arr[i] < target) {\n          if (arr[i - 1] - target < target - arr[i]) {\n            return i - 1;\n          } else {\n            return i;\n          }\n        }\n      }\n    }\n    return n - 1;\n  }\n}\n\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n  while (begin < end) {\n    const tmp = arr[begin];\n    arr[begin] = arr[end];\n    arr[end] = tmp;\n    ++begin;\n    --end;\n  }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data T
 he elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n  const extension = Array.isArray(data) ? data : [data];\n  const length = extension.length;\n  for (let i = 0; i < length; i++) {\n    arr[arr.length] = extension[i];\n  }\n}\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n  const i = arr.indexOf(obj);\n  const found = i > -1;\n  if (found) {\n    arr.splice(i, 1);\n  }\n  return found;\n}\n\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n  const length = arr.length >>> 0;\n  let value;\n\n  for (let i = 0; i < length; i++) {\n    value = arr[i];\n    if (f
 unc(value, i, arr)) {\n      return value;\n    }\n  }\n  return null;\n}\n\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n  const len1 = arr1.length;\n  if (len1 !== arr2.length) {\n    return false;\n  }\n  for (let i = 0; i < len1; i++) {\n    if (arr1[i] !== arr2[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n  const length = arr.length;\n  const tmp = Array(arr.length);\n  let i;\n  for (i = 0; i < length; i++
 ) {\n    tmp[i] = {index: i, value: arr[i]};\n  }\n  tmp.sort(function (a, b) {\n    return compareFnc(a.value, b.value) || a.index - b.index;\n  });\n  for (i = 0; i < arr.length; i++) {\n    arr[i] = tmp[i].value;\n  }\n}\n\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findIndex(arr, func) {\n  let index;\n  const found = !arr.every(function (el, idx) {\n    index = idx;\n    return !func(el, idx, arr);\n  });\n  return found ? index : -1;\n}\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function=} opt_func Comparison function.\n * @param {boolean=} opt_strict Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, opt_func, opt_strict) {\n  const compare = opt_func || numberSafeCompareFunction;\n  return arr.every(function (currentVal, index) {\n    if (index === 0) {\n      return true;\n    }\n    co
 nst res = compare(arr[index - 1], currentVal);\n    return !(res > 0 || (opt_strict && res === 0));\n  });\n}\n","/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @returns {boolean} true.\n */\nexport function TRUE() {\n  return true;\n}\n\n/**\n * Always returns false.\n * @returns {boolean} false.\n */\nexport function FALSE() {\n  return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() {}\n\n/**\n * Wrap a function in another function that remembers the last return.  If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport funct
 ion memoizeOne(fn) {\n  let called = false;\n\n  /** @type {ReturnType} */\n  let lastResult;\n\n  /** @type {Array<any>} */\n  let lastArgs;\n\n  let lastThis;\n\n  return function () {\n    const nextArgs = Array.prototype.slice.call(arguments);\n    if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n      called = true;\n      lastThis = this;\n      lastArgs = nextArgs;\n      lastResult = fn.apply(this, arguments);\n    }\n    return lastResult;\n  };\n}\n","/**\n * @module ol/obj\n */\n\n/**\n * Polyfill for Object.assign().  Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport const assign =\n  typeof Object.assign === 'function'\n    ? Object.ass
 ign\n    : function (target, var_sources) {\n        if (target === undefined || target === null) {\n          throw new TypeError('Cannot convert undefined or null to object');\n        }\n\n        const output = Object(target);\n        for (let i = 1, ii = arguments.length; i < ii; ++i) {\n          const source = arguments[i];\n          if (source !== undefined && source !== null) {\n            for (const key in source) {\n              if (source.hasOwnProperty(key)) {\n                output[key] = source[key];\n              }\n            }\n          }\n        }\n        return output;\n      };\n\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n  for (const property in object) {\n    delete object[property];\n  }\n}\n\n/**\n * Polyfill for Object.values().  Get an array of property values from an object.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_
 Objects/Object/values\n *\n * @param {!Object<K,V>} object The object from which to get the values.\n * @return {!Array<V>} The property values.\n * @template K,V\n */\nexport const getValues =\n  typeof Object.values === 'function'\n    ? Object.values\n    : function (object) {\n        const values = [];\n        for (const property in object) {\n          values.push(object[property]);\n        }\n        return values;\n      };\n\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n  let property;\n  for (property in object) {\n    return false;\n  }\n  return !property;\n}\n","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport {VOID} from '../functions.js';\nimport {clear} from '../obj.js';\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\n/**\n * @classdesc\n *
  A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n *    `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n *    There is no event target hierarchy. When a listener calls\n *    `stopPropagation` or `preventDefault` on an event object, it means that no\n *    more listeners after this one will be called. Same as when the listener\n *    returns false.\n */\nclass Target extends Disposable {\n  /**\n   * @param {*=} opt_target Default event target for dispatched events.\n   */\n  constructor(opt_target) {\n    super();\n\n    /**\n     * @private\n     * @type {*}\n     */\n    this.eventTarget_ = opt_target;\n\n    /**\n     * @priv
 ate\n     * @type {Object<string, number>}\n     */\n    this.pendingRemovals_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, number>}\n     */\n    this.dispatching_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").Listener>>}\n     */\n    this.listeners_ = null;\n  }\n\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").Listener} listener Listener.\n   */\n  addEventListener(type, listener) {\n    if (!type || !listener) {\n      return;\n    }\n    const listeners = this.listeners_ || (this.listeners_ = {});\n    const listenersForType = listeners[type] || (listeners[type] = []);\n    if (listenersForType.indexOf(listener) === -1) {\n      listenersForType.push(listener);\n    }\n  }\n\n  /**\n   * Dispatches an event and calls all listeners listening for events\n   * of this type. The event parameter can either be a string or an\n   * Object with a `type` property.\n   *\n   * @param {
 import(\"./Event.js\").default|string} event Event object.\n   * @return {boolean|undefined} `false` if anyone called preventDefault on the\n   *     event object or if any of the listeners returned false.\n   * @api\n   */\n  dispatchEvent(event) {\n    /** @type {import(\"./Event.js\").default|Event} */\n    const evt = typeof event === 'string' ? new Event(event) : event;\n    const type = evt.type;\n    if (!evt.target) {\n      evt.target = this.eventTarget_ || this;\n    }\n    const listeners = this.listeners_ && this.listeners_[type];\n    let propagate;\n    if (listeners) {\n      const dispatching = this.dispatching_ || (this.dispatching_ = {});\n      const pendingRemovals =\n        this.pendingRemovals_ || (this.pendingRemovals_ = {});\n      if (!(type in dispatching)) {\n        dispatching[type] = 0;\n        pendingRemovals[type] = 0;\n      }\n      ++dispatching[type];\n      for (let i = 0, ii = listeners.length; i < ii; ++i) {\n        if ('handleEvent' in list
 eners[i]) {\n          propagate = /** @type {import(\"../events.js\").ListenerObject} */ (listeners[\n            i\n          ]).handleEvent(evt);\n        } else {\n          propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (listeners[\n            i\n          ]).call(this, evt);\n        }\n        if (propagate === false || evt.propagationStopped) {\n          propagate = false;\n          break;\n        }\n      }\n      --dispatching[type];\n      if (dispatching[type] === 0) {\n        let pr = pendingRemovals[type];\n        delete pendingRemovals[type];\n        while (pr--) {\n          this.removeEventListener(type, VOID);\n        }\n        delete dispatching[type];\n      }\n      return propagate;\n    }\n  }\n\n  /**\n   * Clean up.\n   */\n  disposeInternal() {\n    this.listeners_ && clear(this.listeners_);\n  }\n\n  /**\n   * Get the listeners for a specified event type. Listeners are returned in the\n   * order that they will be called in.\
 n   *\n   * @param {string} type Type.\n   * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n   */\n  getListeners(type) {\n    return (this.listeners_ && this.listeners_[type]) || undefined;\n  }\n\n  /**\n   * @param {string=} opt_type Type. If not provided,\n   *     `true` will be returned if this event target has any listeners.\n   * @return {boolean} Has listeners.\n   */\n  hasListener(opt_type) {\n    if (!this.listeners_) {\n      return false;\n    }\n    return opt_type\n      ? opt_type in this.listeners_\n      : Object.keys(this.listeners_).length > 0;\n  }\n\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").Listener} listener Listener.\n   */\n  removeEventListener(type, listener) {\n    const listeners = this.listeners_ && this.listeners_[type];\n    if (listeners) {\n      const index = listeners.indexOf(listener);\n      if (index !== -1) {\n        if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n
           // make listener a no-op, and remove later in #dispatchEvent()\n          listeners[index] = VOID;\n          ++this.pendingRemovals_[type];\n        } else {\n          listeners.splice(index, 1);\n          if (listeners.length === 0) {\n            delete this.listeners_[type];\n          }\n        }\n      }\n    }\n  }\n}\n\nexport default Target;\n","/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n  /**\n   * Generic change event. Triggered when the revision counter is increased.\n   * @event module:ol/events/Event~BaseEvent#change\n   * @api\n   */\n  CHANGE: 'change',\n\n  /**\n   * Generic error event. Triggered when an error occurs.\n   * @event module:ol/events/Event~BaseEvent#error\n   * @api\n   */\n  ERROR: 'error',\n\n  BLUR: 'blur',\n  CLEAR: 'clear',\n  CONTEXTMENU: 'contextmenu',\n  CLICK: 'click',\n  DBLCLICK: 'dblclick',\n  DRAGENTER: 'dragenter',\n  DRAGOVER: 'dragover',\n  DROP: 'drop',\n  FOCUS: 
 'focus',\n  KEYDOWN: 'keydown',\n  KEYPRESS: 'keypress',\n  LOAD: 'load',\n  RESIZE: 'resize',\n  TOUCHMOVE: 'touchmove',\n  WHEEL: 'wheel',\n};\n","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n\n/**\n * Registers an event listener on an event target. Inspired by\n * https:/
 /google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events~unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @param {boolean=} opt_once If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, opt_this, opt_once) {\n  if (opt_this && opt_this !== target) {\n    listener = listener.bind(opt_this);\n  }\n  if (opt_once) {\n    const originalListener = listener;\n    listener = function () {\n      target.removeEventListener(type, listener);\n      originalListener.apply(this, argu
 ments);\n    };\n  }\n  const eventsKey = {\n    target: target,\n    type: type,\n    listener: listener,\n  };\n  target.addEventListener(type, listener);\n  return eventsKey;\n}\n\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events~unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events~listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object 
 referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, opt_this) {\n  return listen(target, type, listener, opt_this, true);\n}\n\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events~listen} or {@link module:ol/events~listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n  if (key && key.target) {\n    key.target.removeEventListener(key.type, key.listener);\n    clear(key);\n  }\n}\n","/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport {listen, listenOnce, unlistenByKey} from './events.js';\n\n/**\n * @classdesc\n * Abst
 ract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nclass Observable extends EventTarget {\n  constructor() {\n    super();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.revision_ = 0;\n  }\n\n  /**\n   * Increases the revision counter and dispatches a 'change' event.\n   * @api\n   */\n  changed() {\n    ++this.revision_;\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * Get the version number for this object.  Each time the object is modified,\n   * its version number will be incremented.\n   * @return {number} Revision.\n   * @api\n   */\n  getRevision() {\n    return this.revision_;\n  }\n\n  /**\n   * Listen for a certain type of ev
 ent.\n   * @param {string|Array<string>} type The event type or array of event types.\n   * @param {function(?): ?} listener The listener function.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n   *     called with an array of event types as the first argument, the return\n   *     will be an array of keys.\n   * @api\n   */\n  on(type, listener) {\n    if (Array.isArray(type)) {\n      const len = type.length;\n      const keys = new Array(len);\n      for (let i = 0; i < len; ++i) {\n        keys[i] = listen(this, type[i], listener);\n      }\n      return keys;\n    } else {\n      return listen(this, /** @type {string} */ (type), listener);\n    }\n  }\n\n  /**\n   * Listen once for a certain type of event.\n   * @param {string|Array<string>} type The event type or array of event types.\n   * @param {function(?): ?} listener The listener function.\n   * @return {import(\"./events.js\").EventsKey|Array<
 import(\"./events.js\").EventsKey>} Unique key for the listener. If\n   *     called with an array of event types as the first argument, the return\n   *     will be an array of keys.\n   * @api\n   */\n  once(type, listener) {\n    let key;\n    if (Array.isArray(type)) {\n      const len = type.length;\n      key = new Array(len);\n      for (let i = 0; i < len; ++i) {\n        key[i] = listenOnce(this, type[i], listener);\n      }\n    } else {\n      key = listenOnce(this, /** @type {string} */ (type), listener);\n    }\n    /** @type {Object} */ (listener).ol_key = key;\n    return key;\n  }\n\n  /**\n   * Unlisten for a certain type of event.\n   * @param {string|Array<string>} type The event type or array of event types.\n   * @param {function(?): ?} listener The listener function.\n   * @api\n   */\n  un(type, listener) {\n    const key = /** @type {Object} */ (listener).ol_key;\n    if (key) {\n      unByKey(key);\n    } else if (Array.isArray(type)) {\n      for (let i = 0
 , ii = type.length; i < ii; ++i) {\n        this.removeEventListener(type[i], listener);\n      }\n    } else {\n      this.removeEventListener(type, listener);\n    }\n  }\n}\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n  if (Array.isArray(key)) {\n    for (let i = 0, ii = key.length; i < ii; ++i) {\n      unlistenByKey(key[i]);\n    }\n  } else {\n    unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n  }\n}\n\nexport default Observable;\n","/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport {assign, isEmpty} from './obj.js';\nimport {getUid} from './util.js';\n\n/**\n * @classdesc\n * Events emi
 tted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport class ObjectEvent extends Event {\n  /**\n   * @param {string} type The event type.\n   * @param {string} key The property name.\n   * @param {*} oldValue The old value for `key`.\n   */\n  constructor(type, key, oldValue) {\n    super(type);\n\n    /**\n     * The name of the property whose value is changing.\n     * @type {string}\n     * @api\n     */\n    this.key = key;\n\n    /**\n     * The old value. To get the new value use `e.target.get(e.key)` where\n     * `e` is the event object.\n     * @type {*}\n     * @api\n     */\n    this.oldValue = oldValue;\n  }\n}\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.
 \n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable
  properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nclass BaseObject extends Observable {\n  /**\n   * @param {Object<string, *>=} opt_values An object with key-value pairs.\n   */\n  constructor(opt_values) {\n    super();\n\n    // Call {@link module:ol/util~getUid} to ensure 
 that the order of objects' ids is\n    // the same as the order in which they were created.  This also helps to\n    // ensure that object properties are always added in the same order, which\n    // helps many JavaScript engines generate faster code.\n    getUid(this);\n\n    /**\n     * @private\n     * @type {Object<string, *>}\n     */\n    this.values_ = null;\n\n    if (opt_values !== undefined) {\n      this.setProperties(opt_values);\n    }\n  }\n\n  /**\n   * Gets a value.\n   * @param {string} key Key name.\n   * @return {*} Value.\n   * @api\n   */\n  get(key) {\n    let value;\n    if (this.values_ && this.values_.hasOwnProperty(key)) {\n      value = this.values_[key];\n    }\n    return value;\n  }\n\n  /**\n   * Get a list of object property names.\n   * @return {Array<string>} List of property names.\n   * @api\n   */\n  getKeys() {\n    return (this.values_ && Object.keys(this.values_)) || [];\n  }\n\n  /**\n   * Get an object of all property names and values.\n   *
  @return {Object<string, *>} Object.\n   * @api\n   */\n  getProperties() {\n    return (this.values_ && assign({}, this.values_)) || {};\n  }\n\n  /**\n   * @return {boolean} The object has properties.\n   */\n  hasProperties() {\n    return !!this.values_;\n  }\n\n  /**\n   * @param {string} key Key name.\n   * @param {*} oldValue Old value.\n   */\n  notify(key, oldValue) {\n    let eventType;\n    eventType = getChangeEventType(key);\n    this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    eventType = ObjectEventType.PROPERTYCHANGE;\n    this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n  }\n\n  /**\n   * Sets a value.\n   * @param {string} key Key name.\n   * @param {*} value Value.\n   * @param {boolean=} opt_silent Update without triggering an event.\n   * @api\n   */\n  set(key, value, opt_silent) {\n    const values = this.values_ || (this.values_ = {});\n    if (opt_silent) {\n      values[key] = value;\n    } else {\n      const oldValue = va
 lues[key];\n      values[key] = value;\n      if (oldValue !== value) {\n        this.notify(key, oldValue);\n      }\n    }\n  }\n\n  /**\n   * Sets a collection of key-value pairs.  Note that this changes any existing\n   * properties and adds new ones (it does not remove any existing properties).\n   * @param {Object<string, *>} values Values.\n   * @param {boolean=} opt_silent Update without triggering an event.\n   * @api\n   */\n  setProperties(values, opt_silent) {\n    for (const key in values) {\n      this.set(key, values[key], opt_silent);\n    }\n  }\n\n  /**\n   * Unsets a property.\n   * @param {string} key Key name.\n   * @param {boolean=} opt_silent Unset without triggering an event.\n   * @api\n   */\n  unset(key, opt_silent) {\n    if (this.values_ && key in this.values_) {\n      const oldValue = this.values_[key];\n      delete this.values_[key];\n      if (isEmpty(this.values_)) {\n        this.values_ = null;\n      }\n      if (!opt_silent) {\n        this.not
 ify(key, oldValue);\n      }\n    }\n  }\n}\n\n/**\n * @type {Object<string, string>}\n */\nconst changeEventTypeCache = {};\n\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nexport function getChangeEventType(key) {\n  return changeEventTypeCache.hasOwnProperty(key)\n    ? changeEventTypeCache[key]\n    : (changeEventTypeCache[key] = 'change:' + key);\n}\n\nexport default BaseObject;\n","/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style\n * @property {string} variant\n * @property {string} weight\n * @property {string} size\n * @property {string} lineHeight\n * @property {string} family\n * @property {Array<string>} families\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_SELECTAB
 LE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_CONTROL = 'ol-control';\n\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From http://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n  [\n    '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|l
 ighter|[1-9]00 ))?)',\n    '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n    '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n    '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n    '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n  ].join(''),\n  'i'\n);\nconst fontRegExMatchIndex = [\n  'style',\n  'variant',\n  'weight',\n  'size',\n  'lineHeight',\n  'family',\n];\n\n/**\n * Get the list of font families from a font spec.  Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters} The font parameters (or null if the input spec is invalid).\n */\nexport const getFontParameters = function (fontSpec) {\n  const match = fontSpec.match(fontRegEx);\n  if (!match) {\n    return null;\n  }\n  const style = /** @type {FontParameters} */ ({\n    lineHeight: 'normal',\n    size: '1.2em',\n    style: 'normal',\n    we
 ight: 'normal',\n    variant: 'normal',\n  });\n  for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n    const value = match[i + 1];\n    if (value !== undefined) {\n      style[fontRegExMatchIndex[i]] = value;\n    }\n  }\n  style.families = style.family.split(/,\\s?/);\n  return style;\n};\n","/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n\n/**\n * @private\n * @type {Transform}\n */\nconst tmp_ =
  new Array(6);\n\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n  return [1, 0, 0, 1, 0, 0];\n}\n\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n  return set(transform, 1, 0, 0, 1, 0, 0);\n}\n\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n  const a1 = transform1[0];\n  const b1 = transform1[1];\n  const c1 = transform1[2];\n  const d1 = transform1[3];\n  const e1 = transform1[4];\n  const f1 = transform1[5];\n  const a2 = transform2[0];\n  const b2 = transform
 2[1];\n  const c2 = transform2[2];\n  const d2 = transform2[3];\n  const e2 = transform2[4];\n  const f2 = transform2[5];\n\n  transform1[0] = a1 * a2 + c1 * b2;\n  transform1[1] = b1 * a2 + d1 * b2;\n  transform1[2] = a1 * c2 + c1 * d2;\n  transform1[3] = b1 * c2 + d1 * d2;\n  transform1[4] = a1 * e2 + c1 * f2 + e1;\n  transform1[5] = b1 * e2 + d1 * f2 + f1;\n\n  return transform1;\n}\n\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n  transform[0] = a;\n  transform[1] = b;\n  tra
 nsform[2] = c;\n  transform[3] = d;\n  transform[4] = e;\n  transform[5] = f;\n  return transform;\n}\n\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n  transform1[0] = transform2[0];\n  transform1[1] = transform2[1];\n  transform1[2] = transform2[2];\n  transform1[3] = transform2[3];\n  transform1[4] = transform2[4];\n  transform1[5] = transform2[5];\n  return transform1;\n}\n\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\
 n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n  coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n  coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n  return coordinate;\n}\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n  const cos = Math.cos(angle);\n  const sin = Math.sin(angle);\n  return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} Th
 e scaled transform.\n */\nexport function scale(transform, x, y) {\n  return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n  return set(target, x, 0, 0, y, 0, 0);\n}\n\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n  return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modif
 ied in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n  const sin = Math.sin(angle);\n  const cos = Math.cos(angle);\n  transform[0] = sx * cos;\n  transform[1] = sy * sin;\n  transform[2] = -sx * sin;\n  transform[3] = sy * cos;\n  transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n  transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n  return transform;\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `tra
 nsform` porperty of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n  return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n  return makeInverse(source, source);\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n *     the source transform.\n * @param {!Transform} source
  The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n  const det = determinant(source);\n  assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n  const a = source[0];\n  const b = source[1];\n  const c = source[2];\n  const d = source[3];\n  const e = source[4];\n  const f = source[5];\n\n  target[0] = d / det;\n  target[1] = -b / det;\n  target[2] = -c / det;\n  target[3] = a / det;\n  target[4] = (c * f - d * e) / det;\n  target[5] = -(a * f - b * e) / det;\n\n  return target;\n}\n\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n  return mat[0] * mat[3] - mat[1] * mat[2];\n}\n\n/**\n * A string version of the transform.  This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport fu
 nction toString(mat) {\n  return 'matrix(' + mat.join(', ') + ')';\n}\n","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport EventTarget from '../events/Target.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {clear} from '../obj.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getFontParameters} from '../css.js';\nimport {toString} from '../transform.js';\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n\n/**\n * @typedef Label\n * @property {number} width\n * @property {number} height\n * @property {Array<string|number>} contextInstructions\n */\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {CanvasLineCap} [currentLineCap]\n * @property {Array<number>} currentLineDash\n * @property {number} [current
 LineDashOffset]\n * @property {CanvasLineJoin} [currentLineJoin]\n * @property {number} [currentLineWidth]\n * @property {number} [currentMiterLimit]\n * @property {number} [lastStroke]\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {CanvasLineCap} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number} [lineDashOffset]\n * @property {CanvasLineJoin} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\n\n/**\n * @typedef {Object} TextState\n * @property {string} font\n * @property {string} [textAlign]\n * 
 @property {string} textBaseline\n * @property {string} [placement]\n * @property {number} [maxAngle]\n * @property {boolean} [overflow]\n * @property {import(\"../style/Fill.js\").default} [backgroundFill]\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke]\n * @property {import(\"../size.js\").Size} [scale]\n * @property {Array<number>} [padding]\n */\n\n/**\n * Container for decluttered replay instructions that need to be rendered or\n * omitted together, i.e. when styles render both an image and text, or for the\n * characters that form text along lines. The basic elements of this array are\n * `[minX, minY, maxX, maxY, count]`, where the first four entries are the\n * rendered extent of the group in pixel space. `count` is the number of styles\n * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.\n * In addition to these four elements, declutter instruction arrays (i.e. the\n * arguments to {@link module:ol/render/canvas~drawImage} 
 are appended to the array.\n * @typedef {Array<*>} DeclutterGroup\n */\n\n/**\n * Declutter groups for support of multi geometries.\n * @typedef {Array<DeclutterGroup>} DeclutterGroups\n */\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFont = '10px sans-serif';\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultFillStyle = '#000';\n\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport const defaultLineCap = 'round';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultLineDash = [];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineDashOffset = 0;\n\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport const defaultLineJoin = 'round';\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultMiterLimit = 10;\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultStrokeStyle = '#000';\n\n/**\n * @const\n * @type {string}\n */\nexport const defa
 ultTextAlign = 'center';\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultTextBaseline = 'middle';\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport const defaultPadding = [0, 0, 0, 0];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineWidth = 1;\n\n/**\n * @type {BaseObject}\n */\nexport const checkedFonts = new BaseObject();\n\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache#setSize}.\n * Deprecated - there is no label cache any more.\n * @type {?}\n * @api\n * @deprecated\n */\nexport const labelCache = new EventTarget();\nlabelCache.setSize = function () {\n  console.warn('labelCache is deprecated.'); //eslint-disable-line\n};\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet measureContext = null;\n\n/**\n * @type {string}\n */\nlet measureFont;\n\n/**\n * @type {!Object<string, number>}\n */\nexport const textHeights = {};\n\n/**\n * Clears the labe
 l cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport const registerFont = (function () {\n  const retries = 100;\n  const size = '32px ';\n  const referenceFonts = ['monospace', 'serif'];\n  const len = referenceFonts.length;\n  const text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n  let interval, referenceWidth;\n\n  /**\n   * @param {string} fontStyle Css font-style\n   * @param {string} fontWeight Css font-weight\n   * @param {*} fontFamily Css font-family\n   * @return {boolean} Font with style and weight is available\n   */\n  function isAvailable(fontStyle, fontWeight, fontFamily) {\n    let available = true;\n    for (let i = 0; i < len; ++i) {\n      const referenceFont = referenceFonts[i];\n      referenceWidth = measureTextWidth(\n        fontStyle + ' ' + fontWeight + ' ' + size + referenceFont,\n        text\n      );\n      if (fontFamily != referenceFont) {\n        const width = measureTextWidth(\n          fontStyle +\n           
  ' ' +\n            fontWeight +\n            ' ' +\n            size +\n            fontFamily +\n            ',' +\n            referenceFont,\n          text\n        );\n        // If width and referenceWidth are the same, then the fallback was used\n        // instead of the font we wanted, so the font is not available.\n        available = available && width != referenceWidth;\n      }\n    }\n    if (available) {\n      return true;\n    }\n    return false;\n  }\n\n  function check() {\n    let done = true;\n    const fonts = checkedFonts.getKeys();\n    for (let i = 0, ii = fonts.length; i < ii; ++i) {\n      const font = fonts[i];\n      if (checkedFonts.get(font) < retries) {\n        if (isAvailable.apply(this, font.split('\\n'))) {\n          clear(textHeights);\n          // Make sure that loaded fonts are picked up by Safari\n          measureContext = null;\n          measureFont = undefined;\n          checkedFonts.set(font, retries);\n        } else {\n          ch
 eckedFonts.set(font, checkedFonts.get(font) + 1, true);\n          done = false;\n        }\n      }\n    }\n    if (done) {\n      clearInterval(interval);\n      interval = undefined;\n    }\n  }\n\n  return function (fontSpec) {\n    const font = getFontParameters(fontSpec);\n    if (!font) {\n      return;\n    }\n    const families = font.families;\n    for (let i = 0, ii = families.length; i < ii; ++i) {\n      const family = families[i];\n      const key = font.style + '\\n' + font.weight + '\\n' + family;\n      if (checkedFonts.get(key) === undefined) {\n        checkedFonts.set(key, retries, true);\n        if (!isAvailable(font.style, font.weight, family)) {\n          checkedFonts.set(key, 0, true);\n          if (interval === undefined) {\n            interval = setInterval(check, 32);\n          }\n        }\n      }\n    }\n  };\n})();\n\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport const m
 easureTextHeight = (function () {\n  /**\n   * @type {HTMLDivElement}\n   */\n  let div;\n  const heights = textHeights;\n  return function (fontSpec) {\n    let height = heights[fontSpec];\n    if (height == undefined) {\n      if (WORKER_OFFSCREEN_CANVAS) {\n        const font = getFontParameters(fontSpec);\n        const metrics = measureText(fontSpec, 'Žg');\n        const lineHeight = isNaN(Number(font.lineHeight))\n          ? 1.2\n          : Number(font.lineHeight);\n        textHeights[fontSpec] =\n          lineHeight *\n          (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n      } else {\n        if (!div) {\n          div = document.createElement('div');\n          div.innerHTML = 'M';\n          div.style.margin = '0 !important';\n          div.style.padding = '0 !important';\n          div.style.position = 'absolute !important';\n          div.style.left = '-99999px !important';\n        }\n        div.style.font = fontSpec;\n        documen
 t.body.appendChild(div);\n        height = div.offsetHeight;\n        heights[fontSpec] = height;\n        document.body.removeChild(div);\n      }\n    }\n    return height;\n  };\n})();\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n  if (!measureContext) {\n    measureContext = createCanvasContext2D(1, 1);\n  }\n  if (font != measureFont) {\n    measureContext.font = font;\n    measureFont = measureContext.font;\n  }\n  return measureContext.measureText(text);\n}\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n  return measureText(font, text).width;\n}\n\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @returns {number} The
  text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n  if (text in cache) {\n    return cache[text];\n  }\n  const width = measureTextWidth(font, text);\n  cache[text] = width;\n  return width;\n}\n\n/**\n * @param {string} font Font to use for measuring.\n * @param {Array<string>} lines Lines to measure.\n * @param {Array<number>} widths Array will be populated with the widths of\n * each line.\n * @return {number} Width of the whole text.\n */\nexport function measureTextWidths(font, lines, widths) {\n  const numLines = lines.length;\n  let width = 0;\n  for (let i = 0; i < numLines; ++i) {\n    const currentWidth = measureTextWidth(font, lines[i]);\n    width = Math.max(width, currentWidth);\n    widths.push(currentWidth);\n  }\n  return width;\n}\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAt
 Offset(context, rotation, offsetX, offsetY) {\n  if (rotation !== 0) {\n    context.translate(offsetX, offsetY);\n    context.rotate(rotation);\n    context.translate(-offsetX, -offsetY);\n  }\n}\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(\n  context,\n  transform,\n  opacity,\n  labelOrImage,\n  originX,\n  originY,\n  w,\n  h,\n  x,\n  y,\n  scale\n) {\n  context.save();\n\n  if (opacity !== 1) {\n    context.globalAlpha *= opacity;\n  }\n  if (transform) {\n    context.setTransform.apply
 (context, transform);\n  }\n\n  if (/** @type {*} */ (labelOrImage).contextInstructions) {\n    // label\n    context.translate(x, y);\n    context.scale(scale[0], scale[1]);\n    executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n  } else if (scale[0] < 0 || scale[1] < 0) {\n    // flipped image\n    context.translate(x, y);\n    context.scale(scale[0], scale[1]);\n    context.drawImage(\n      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage),\n      originX,\n      originY,\n      w,\n      h,\n      0,\n      0,\n      w,\n      h\n    );\n  } else {\n    // if image not flipped translate and scale can be avoided\n    context.drawImage(\n      /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage),\n      originX,\n      originY,\n      w,\n      h,\n      x,\n      y,\n      w * scale[0],\n      h * scale[1]\n    );\n  }\n\n  context.restore();\n}\n\n/**\n * @param {Label} label Label.\n * @param {
 CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n  const contextInstructions = label.contextInstructions;\n  for (let i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n    if (Array.isArray(contextInstructions[i + 1])) {\n      context[contextInstructions[i]].apply(\n        context,\n        contextInstructions[i + 1]\n      );\n    } else {\n      context[contextInstructions[i]] = contextInstructions[i + 1];\n    }\n  }\n}\n\n/**\n * @type {HTMLCanvasElement}\n * @private\n */\nlet createTransformStringCanvas = null;\n\n/**\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @return {string} CSS transform.\n */\nexport function createTransformString(transform) {\n  if (WORKER_OFFSCREEN_CANVAS) {\n    return toString(transform);\n  } else {\n    if (!createTransformStringCanvas) {\n      createTransformStringCanvas = createCanvasContext2D(1, 1).canvas;\n    }\n    createTransformStringCanvas.style
 .transform = toString(transform);\n    return createTransformStringCanvas.style.transform;\n  }\n}\n","/**\n * @module ol/style/RegularShape\n */\n\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport {asArray} from '../color.js';\nimport {asColorLike} from '../colorlike.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {\n  defaultFillStyle,\n  defaultLineCap,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeStyle,\n} from '../render/canvas.js';\n\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] Outer radius of a star.\n * @property {number
 } [radius2] Inner radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {Array<number>} [displacement=[0,0]] Displacement of the shape\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n */\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {number} strokeWidth\n * @property {number} size\n * @property {CanvasLineCap} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {CanvasLineJoin} lineJoin\n * @property {number} miterLimit\n */\n\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provide
 d, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nclass RegularShape extends ImageStyle {\n  /**\n   * @param {Options} options Options.\n   */\n  constructor(options) {\n    /**\n     * @type {boolean}\n     */\n    const rotateWithView =\n      options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n    super({\n      opacity: 1,\n      rotateWithView: rotateWithView,\n      rotation: options.rotation !== undefined ? options.rotation : 0,\n      scale: 1,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n    });\n\n    /**\n     * @private\n     * @type {Object<number, HTMLCanvasElement>}\n     */\n    this.canvas_ = {};\n\n    /**\n     * @private\n     * @type {Object<number, HTMLCanvasElement>}\n     */\n    this.hitDetectionCanvas_ = {};\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\
 n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.points_ = options.points;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.radius_ =\n      options.radius !== undefined ? options.radius : options.radius1;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.radius2_ = options.radius2;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.angle_ = options.angle !== undefined ? options.angle : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.anchor_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size
 .js\").Size}\n     */\n    this.imageSize_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.hitDetectionImageSize_ = null;\n\n    this.render();\n  }\n\n  /**\n   * Clones the style.\n   * @return {RegularShape} The cloned style.\n   * @api\n   */\n  clone() {\n    const style = new RegularShape({\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      points: this.getPoints(),\n      radius: this.getRadius(),\n      radius2: this.getRadius2(),\n      angle: this.getAngle(),\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      displacement: this.getDisplacement().slice(),\n    });\n    style.setOpacity(this.getOpacity());\n    style.setScale(this.getScale());\n    return style;\n  }\n\n  /**\n   * Get the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return 
 {Array<number>} Anchor.\n   * @api\n   */\n  getAnchor() {\n    return this.anchor_;\n  }\n\n  /**\n   * Get the angle used in generating the shape.\n   * @return {number} Shape's rotation in radians.\n   * @api\n   */\n  getAngle() {\n    return this.angle_;\n  }\n\n  /**\n   * Get the fill style for the shape.\n   * @return {import(\"./Fill.js\").default} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement} Image element.\n   */\n  getHitDetectionImage(pixelRatio) {\n    if (!this.hitDetectionCanvas_[pixelRatio || 1]) {\n      const renderOptions = this.createRenderOptions();\n\n      this.createHitDetectionCanvas_(renderOptions, pixelRatio || 1);\n    }\n    return this.hitDetectionCanvas_[pixelRatio || 1];\n  }\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLCanvasElement} Image or Canvas element.\n   * @api\n   */\n  g
 etImage(pixelRatio) {\n    if (!this.canvas_[pixelRatio || 1]) {\n      const renderOptions = this.createRenderOptions();\n\n      const context = createCanvasContext2D(\n        renderOptions.size * pixelRatio || 1,\n        renderOptions.size * pixelRatio || 1\n      );\n\n      this.draw_(renderOptions, context, 0, 0, pixelRatio || 1);\n\n      this.canvas_[pixelRatio || 1] = context.canvas;\n    }\n    return this.canvas_[pixelRatio || 1];\n  }\n\n  /*\n   * Get the image pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * */\n  getPixelRatio(pixelRatio) {\n    return pixelRatio;\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  getImageSize() {\n    return this.imageSize_;\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n   */\n  getHitDetectionImageSize() {\n    return this.hitDetectionImageSize_;\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getIma
 geState() {\n    return ImageState.LOADED;\n  }\n\n  /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>} Origin.\n   * @api\n   */\n  getOrigin() {\n    return this.origin_;\n  }\n\n  /**\n   * Get the number of points for generating the shape.\n   * @return {number} Number of points for stars and regular polygons.\n   * @api\n   */\n  getPoints() {\n    return this.points_;\n  }\n\n  /**\n   * Get the (primary) radius for the shape.\n   * @return {number} Radius.\n   * @api\n   */\n  getRadius() {\n    return this.radius_;\n  }\n\n  /**\n   * Get the secondary radius for the shape.\n   * @return {number|undefined} Radius2.\n   * @api\n   */\n  getRadius2() {\n    return this.radius2_;\n  }\n\n  /**\n   * Get the size of the symbolizer (in pixels).\n   * @return {import(\"../size.js\").Size} Size.\n   * @api\n   */\n  getSize() {\n    return this.size_;\n  }\n\n  /**\n   * Get the stroke style for the shape.\n   * @return {import(\"./Stroke.js\").default} Strok
 e style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  listenImageChange(listener) {}\n\n  /**\n   * Load not yet loaded URI.\n   */\n  load() {}\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  unlistenImageChange(listener) {}\n\n  /**\n   * @returns {RenderOptions}  The render options\n   * @protected\n   */\n  createRenderOptions() {\n    let lineCap = defaultLineCap;\n    let lineJoin = defaultLineJoin;\n    let miterLimit = 0;\n    let lineDash = null;\n    let lineDashOffset = 0;\n    let strokeStyle;\n    let strokeWidth = 0;\n\n    if (this.stroke_) {\n      strokeStyle = this.stroke_.getColor();\n      if (strokeStyle === null) {\n        strokeStyle = defaultStrokeStyle;\n      }\n      strokeStyle = asColorLike(strokeStyle);\n      strokeWidth = this.stroke_.getWidth();\
 n      if (strokeWidth === undefined) {\n        strokeWidth = defaultLineWidth;\n      }\n      lineDash = this.stroke_.getLineDash();\n      lineDashOffset = this.stroke_.getLineDashOffset();\n      lineJoin = this.stroke_.getLineJoin();\n      if (lineJoin === undefined) {\n        lineJoin = defaultLineJoin;\n      }\n      lineCap = this.stroke_.getLineCap();\n      if (lineCap === undefined) {\n        lineCap = defaultLineCap;\n      }\n      miterLimit = this.stroke_.getMiterLimit();\n      if (miterLimit === undefined) {\n        miterLimit = defaultMiterLimit;\n      }\n    }\n\n    const size = 2 * (this.radius_ + strokeWidth) + 1;\n\n    return {\n      strokeStyle: strokeStyle,\n      strokeWidth: strokeWidth,\n      size: size,\n      lineCap: lineCap,\n      lineDash: lineDash,\n      lineDashOffset: lineDashOffset,\n      lineJoin: lineJoin,\n      miterLimit: miterLimit,\n    };\n  }\n\n  /**\n   * @protected\n   */\n  render() {\n    const renderOptions = this.crea
 teRenderOptions();\n\n    const context = createCanvasContext2D(\n      renderOptions.size,\n      renderOptions.size\n    );\n\n    this.draw_(renderOptions, context, 0, 0, 1);\n\n    this.canvas_[1] = context.canvas;\n\n    // canvas.width and height are rounded to the closest integer\n    const size = context.canvas.width;\n    const imageSize = size;\n    const displacement = this.getDisplacement();\n\n    this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];\n    this.createHitDetectionCanvas_(renderOptions, 1);\n\n    this.anchor_ = [size / 2 - displacement[0], size / 2 + displacement[1]];\n    this.size_ = [size, size];\n    this.imageSize_ = [imageSize, imageSize];\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D} context The rendering context.\n   * @param {number} x The origin for the symbol (x).\n   * @param {number} y The origin for the symbol (y).\n   * @param {number} pixelR
 atio The pixel ratio.\n   */\n  draw_(renderOptions, context, x, y, pixelRatio) {\n    let i, angle0, radiusC;\n\n    // reset transform\n    context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n\n    // then move to (x, y)\n    context.translate(x, y);\n\n    context.beginPath();\n\n    let points = this.points_;\n    if (points === Infinity) {\n      context.arc(\n        renderOptions.size / 2,\n        renderOptions.size / 2,\n        this.radius_,\n        0,\n        2 * Math.PI,\n        true\n      );\n    } else {\n      const radius2 =\n        this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n      if (radius2 !== this.radius_) {\n        points = 2 * points;\n      }\n      for (i = 0; i <= points; i++) {\n        angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n        radiusC = i % 2 === 0 ? this.radius_ : radius2;\n        context.lineTo(\n          renderOptions.size / 2 + radiusC * Math.cos(angle0),\n          renderOptions.size / 2
  + radiusC * Math.sin(angle0)\n        );\n      }\n    }\n\n    if (this.fill_) {\n      let color = this.fill_.getColor();\n      if (color === null) {\n        color = defaultFillStyle;\n      }\n      context.fillStyle = asColorLike(color);\n      context.fill();\n    }\n    if (this.stroke_) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (context.setLineDash && renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.lineCap = renderOptions.lineCap;\n      context.lineJoin = renderOptions.lineJoin;\n      context.miterLimit = renderOptions.miterLimit;\n      context.stroke();\n    }\n    context.closePath();\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {number} pixelRatio The pixel ratio.\n   */\n  createHitDetectionCanvas_(renderOptions, p
 ixelRatio) {\n    this.hitDetectionCanvas_[pixelRatio] = this.getImage(pixelRatio);\n    if (this.fill_) {\n      let color = this.fill_.getColor();\n\n      // determine if fill is transparent (or pattern or gradient)\n      let opacity = 0;\n      if (typeof color === 'string') {\n        color = asArray(color);\n      }\n      if (color === null) {\n        opacity = 1;\n      } else if (Array.isArray(color)) {\n        opacity = color.length === 4 ? color[3] : 1;\n      }\n      if (opacity === 0) {\n        // if a transparent fill style is set, create an extra hit-detection image\n        // with a default fill style\n        const context = createCanvasContext2D(\n          renderOptions.size * pixelRatio,\n          renderOptions.size * pixelRatio\n        );\n        this.hitDetectionCanvas_[pixelRatio] = context.canvas;\n\n        this.drawHitDetectionCanvas_(renderOptions, context, 0, 0, pixelRatio);\n      }\n    }\n  }\n\n  /**\n   * @private\n   * @param {RenderOptions
 } renderOptions Render options.\n   * @param {CanvasRenderingContext2D} context The context.\n   * @param {number} x The origin for the symbol (x).\n   * @param {number} y The origin for the symbol (y).\n   * @param {number} pixelRatio The pixel ratio.\n   */\n  drawHitDetectionCanvas_(renderOptions, context, x, y, pixelRatio) {\n    // reset transform\n    context.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n\n    // then move to (x, y)\n    context.translate(x, y);\n\n    context.beginPath();\n\n    let points = this.points_;\n    if (points === Infinity) {\n      context.arc(\n        renderOptions.size / 2,\n        renderOptions.size / 2,\n        this.radius_,\n        0,\n        2 * Math.PI,\n        true\n      );\n    } else {\n      const radius2 =\n        this.radius2_ !== undefined ? this.radius2_ : this.radius_;\n      if (radius2 !== this.radius_) {\n        points = 2 * points;\n      }\n      let i, radiusC, angle0;\n      for (i = 0; i <= points; i++) {\n   
      angle0 = (i * 2 * Math.PI) / points - Math.PI / 2 + this.angle_;\n        radiusC = i % 2 === 0 ? this.radius_ : radius2;\n        context.lineTo(\n          renderOptions.size / 2 + radiusC * Math.cos(angle0),\n          renderOptions.size / 2 + radiusC * Math.sin(angle0)\n        );\n      }\n    }\n\n    context.fillStyle = defaultFillStyle;\n    context.fill();\n    if (this.stroke_) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.stroke();\n    }\n    context.closePath();\n  }\n}\n\nexport default RegularShape;\n","/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circl
 e radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n */\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nclass CircleStyle extends RegularShape {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options ? opt_options : {};\n\n    super({\n      points: Infinity,\n      fill: options.fill,\n      radius: options.radius,\n      stroke: options.stroke,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n    });\n  }\n\n  /**\n   * Clones the style.\n   * @return {CircleStyle} The cloned style.\n   * @api\n   */\n  clone() {\n    const style = new CircleStyle({\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      radius: this.getRadius(),\n      displacement: this.
 getDisplacement().slice(),\n    });\n    style.setOpacity(this.getOpacity());\n    style.setScale(this.getScale());\n    return style;\n  }\n\n  /**\n   * Set the circle radius.\n   *\n   * @param {number} radius Circle radius.\n   * @api\n   */\n  setRadius(radius) {\n    this.radius_ = radius;\n    this.render();\n  }\n}\n\nexport default CircleStyle;\n","/**\n * @module ol/style/Fill\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nclass Fill {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options || {};\n\n    /**\n     * @private\n     * @
 type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n     */\n    this.color_ = options.color !== undefined ? options.color : null;\n  }\n\n  /**\n   * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.\n   * @return {Fill} The cloned style.\n   * @api\n   */\n  clone() {\n    const color = this.getColor();\n    return new Fill({\n      color: Array.isArray(color) ? color.slice() : color || undefined,\n    });\n  }\n\n  /**\n   * Get the fill color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n   * @api\n   */\n  setColor(color) {\n    this.color_ = color;\n  }\n}\n\nexport default Fill;\n","/**\n * @module ol/geom/GeometryType\n */\n\n/**\n * The geometry type. One of `'Point'`, 
 `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nexport default {\n  POINT: 'Point',\n  LINE_STRING: 'LineString',\n  LINEAR_RING: 'LinearRing',\n  POLYGON: 'Polygon',\n  MULTI_POINT: 'MultiPoint',\n  MULTI_LINE_STRING: 'MultiLineString',\n  MULTI_POLYGON: 'MultiPolygon',\n  GEOMETRY_COLLECTION: 'GeometryCollection',\n  CIRCLE: 'Circle',\n};\n","/**\n * @module ol/style/Stroke\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join st
 yle: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nclass Stroke {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options || {};\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color|import(\"..
 /colorlike.js\").ColorLike}\n     */\n    this.color_ = options.color !== undefined ? options.color : null;\n\n    /**\n     * @private\n     * @type {CanvasLineCap|undefined}\n     */\n    this.lineCap_ = options.lineCap;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lineDashOffset_ = options.lineDashOffset;\n\n    /**\n     * @private\n     * @type {CanvasLineJoin|undefined}\n     */\n    this.lineJoin_ = options.lineJoin;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.miterLimit_ = options.miterLimit;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.width_ = options.width;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Stroke} The cloned style.\n   * @api\n   */\n  clone() {\n    const color = this.getColor();\n    return new Stroke(
 {\n      color: Array.isArray(color) ? color.slice() : color || undefined,\n      lineCap: this.getLineCap(),\n      lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n      lineDashOffset: this.getLineDashOffset(),\n      lineJoin: this.getLineJoin(),\n      miterLimit: this.getMiterLimit(),\n      width: this.getWidth(),\n    });\n  }\n\n  /**\n   * Get the stroke color.\n   * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Get the line cap type for the stroke.\n   * @return {CanvasLineCap|undefined} Line cap.\n   * @api\n   */\n  getLineCap() {\n    return this.lineCap_;\n  }\n\n  /**\n   * Get the line dash style for the stroke.\n   * @return {Array<number>} Line dash.\n   * @api\n   */\n  getLineDash() {\n    return this.lineDash_;\n  }\n\n  /**\n   * Get the line dash offset for the stroke.\n   * @return {number|undefined} Line dash offset.\n
    * @api\n   */\n  getLineDashOffset() {\n    return this.lineDashOffset_;\n  }\n\n  /**\n   * Get the line join type for the stroke.\n   * @return {CanvasLineJoin|undefined} Line join.\n   * @api\n   */\n  getLineJoin() {\n    return this.lineJoin_;\n  }\n\n  /**\n   * Get the miter limit for the stroke.\n   * @return {number|undefined} Miter limit.\n   * @api\n   */\n  getMiterLimit() {\n    return this.miterLimit_;\n  }\n\n  /**\n   * Get the stroke width.\n   * @return {number|undefined} Width.\n   * @api\n   */\n  getWidth() {\n    return this.width_;\n  }\n\n  /**\n   * Set the color.\n   *\n   * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n   * @api\n   */\n  setColor(color) {\n    this.color_ = color;\n  }\n\n  /**\n   * Set the line cap.\n   *\n   * @param {CanvasLineCap|undefined} lineCap Line cap.\n   * @api\n   */\n  setLineCap(lineCap) {\n    this.lineCap_ = lineCap;\n  }\n\n  /**\n   * Set the line dash.\n   *\n   * Please
  note that Internet Explorer 10 and lower [do not support][mdn] the\n   * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n   * property will have no visual effect in these browsers.\n   *\n   * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility\n   *\n   * @param {Array<number>} lineDash Line dash.\n   * @api\n   */\n  setLineDash(lineDash) {\n    this.lineDash_ = lineDash;\n  }\n\n  /**\n   * Set the line dash offset.\n   *\n   * @param {number|undefined} lineDashOffset Line dash offset.\n   * @api\n   */\n  setLineDashOffset(lineDashOffset) {\n    this.lineDashOffset_ = lineDashOffset;\n  }\n\n  /**\n   * Set the line join.\n   *\n   * @param {CanvasLineJoin|undefined} lineJoin Line join.\n   * @api\n   */\n  setLineJoin(lineJoin) {\n    this.lineJoin_ = lineJoin;\n  }\n\n  /**\n   * Set the miter limit.\n   *\n   * @param {number|undefined} miterLimit Miter limit.\n   * @api\n   */\n  setMi
 terLimit(miterLimit) {\n    this.miterLimit_ = miterLimit;\n  }\n\n  /**\n   * Set the width.\n   *\n   * @param {number|undefined} width Width.\n   * @api\n   */\n  setWidth(width) {\n    this.width_ = width;\n  }\n}\n\nexport default Stroke;\n","/**\n * @module ol/style/Style\n */\n\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Stroke from './Stroke.js';\nimport {assert} from '../asserts.js';\n\n/**\n * A function that takes an {@link module:ol/Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link 
 StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n\n/**\n * A function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>),import(\"../render.js\").State): void}\n * RenderFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry
 ] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Fill, Stroke, Circle, Sty
 le} from 'ol/style';\n *\n *  var fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)'\n *  });\n *  var stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25\n *  });\n *  var styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5\n *      }),\n *      fill: fill,\n *      stroke: stroke\n *    })\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *  import GeometryType from 'ol/geom/GeometryType';\n *\n *  var white = [255, 255, 255, 1];\n *  var blue = [0, 153, 255, 1];\n *  var width = 3;\n *  styles[GeometryType.POLYGON] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5]\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POLYGON] =\n *      styles[GeometryType.POLYGON];\n *  styles[GeometryType.LINE_STRING] = [\n *    new Style({\n *      stroke: n
 ew Stroke({\n *        color: white,\n *        width: width + 2\n *      })\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_LINE_STRING] =\n *      styles[GeometryType.LINE_STRING];\n *  styles[GeometryType.POINT] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2\n *        })\n *      }),\n *      zIndex: Infinity\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POINT] =\n *      styles[GeometryType.POINT];\n *  styles[GeometryType.GEOMETRY_COLLECTION] =\n *      styles[GeometryType.POLYGON].concat(\n *          styles[GeometryType.LINE_STRING],\n *          styles[GeometryType.POINT]\n *      );\n * ```\n *\n * @api\n */\nclass Style {\n  /**\n   * @param {Options=} opt_optio
 ns Style options.\n   */\n  constructor(opt_options) {\n    const options = opt_options || {};\n\n    /**\n     * @private\n     * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n     */\n    this.geometry_ = null;\n\n    /**\n     * @private\n     * @type {!GeometryFunction}\n     */\n    this.geometryFunction_ = defaultGeometryFunction;\n\n    if (options.geometry !== undefined) {\n      this.setGeometry(options.geometry);\n    }\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\n\n    /**\n     * @private\n     * @type {import(\"./Image.js\").default}\n     */\n    this.image_ = options.image !== undefined ? options.image : null;\n\n    /**\n     * @private\n     * @type {RenderFunction|null}\n     */\n    this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default}\n
      */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {import(\"./Text.js\").default}\n     */\n    this.text_ = options.text !== undefined ? options.text : null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.zIndex_ = options.zIndex;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Style} The cloned style.\n   * @api\n   */\n  clone() {\n    let geometry = this.getGeometry();\n    if (geometry && typeof geometry === 'object') {\n      geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n    }\n    return new Style({\n      geometry: geometry,\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      image: this.getImage() ? this.getImage().clone() : undefined,\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      text: this.getText() ? this.getText().clone() : undefined,\n      zIndex: this.getZIndex(),
 \n    });\n  }\n\n  /**\n   * Get the custom renderer function that was configured with\n   * {@link #setRenderer} or the `renderer` constructor option.\n   * @return {RenderFunction|null} Custom renderer function.\n   * @api\n   */\n  getRenderer() {\n    return this.renderer_;\n  }\n\n  /**\n   * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n   * and `image` options of the style will be ignored.\n   * @param {RenderFunction|null} renderer Custom renderer function.\n   * @api\n   */\n  setRenderer(renderer) {\n    this.renderer_ = renderer;\n  }\n\n  /**\n   * Get the geometry to be rendered.\n   * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n   * Feature property or geometry or function that returns the geometry that will\n   * be rendered with this style.\n   * @api\n   */\n  getGeometry() {\n    return this.geometry_;\n  }\n\n  /**\n   * Get the function used to generate a geometry for rendering.\n   * @return {!Geometr
 yFunction} Function that is called with a feature\n   * and returns the geometry to render instead of the feature's geometry.\n   * @api\n   */\n  getGeometryFunction() {\n    return this.geometryFunction_;\n  }\n\n  /**\n   * Get the fill style.\n   * @return {import(\"./Fill.js\").default} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Set the fill style.\n   * @param {import(\"./Fill.js\").default} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n  }\n\n  /**\n   * Get the image style.\n   * @return {import(\"./Image.js\").default} Image style.\n   * @api\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * Set the image style.\n   * @param {import(\"./Image.js\").default} image Image style.\n   * @api\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * Get the stroke style.\n   * @return {import(\"./Stroke.js\").default} Stroke style.\n   * @api\n   */\n  getStroke() {\n 
    return this.stroke_;\n  }\n\n  /**\n   * Set the stroke style.\n   * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n  }\n\n  /**\n   * Get the text style.\n   * @return {import(\"./Text.js\").default} Text style.\n   * @api\n   */\n  getText() {\n    return this.text_;\n  }\n\n  /**\n   * Set the text style.\n   * @param {import(\"./Text.js\").default} text Text style.\n   * @api\n   */\n  setText(text) {\n    this.text_ = text;\n  }\n\n  /**\n   * Get the z-index for the style.\n   * @return {number|undefined} ZIndex.\n   * @api\n   */\n  getZIndex() {\n    return this.zIndex_;\n  }\n\n  /**\n   * Set a geometry that is rendered instead of the feature's geometry.\n   *\n   * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction} geometry\n   *     Feature property or geometry or function returning a geometry to render\n   *     for this style.\n   * @api\n   */\n  setGeometry(g
 eometry) {\n    if (typeof geometry === 'function') {\n      this.geometryFunction_ = geometry;\n    } else if (typeof geometry === 'string') {\n      this.geometryFunction_ = function (feature) {\n        return /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(\n          geometry\n        ));\n      };\n    } else if (!geometry) {\n      this.geometryFunction_ = defaultGeometryFunction;\n    } else if (geometry !== undefined) {\n      this.geometryFunction_ = function () {\n        return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n      };\n    }\n    this.geometry_ = geometry;\n  }\n\n  /**\n   * Set the z-index.\n   *\n   * @param {number|undefined} zIndex ZIndex.\n   * @api\n   */\n  setZIndex(zIndex) {\n    this.zIndex_ = zIndex;\n  }\n}\n\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleF
 unction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n  let styleFunction;\n\n  if (typeof obj === 'function') {\n    styleFunction = obj;\n  } else {\n    /**\n     * @type {Array<Style>}\n     */\n    let styles;\n    if (Array.isArray(obj)) {\n      styles = obj;\n    } else {\n      assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `Style` or an array of `Style`\n      const style = /** @type {Style} */ (obj);\n      styles = [style];\n    }\n    styleFunction = function () {\n      return styles;\n    };\n  }\n  return styleFunction;\n}\n\n/**\n * @type {Array<Style>}\n */\nlet defaultStyles = null;\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n  /
 / We don't use an immediately-invoked function\n  // and a closure so we don't get an error at script evaluation time in\n  // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n  // canvas.getContext('2d') at construction time, which will cause an.error\n  // in such browsers.)\n  if (!defaultStyles) {\n    const fill = new Fill({\n      color: 'rgba(255,255,255,0.4)',\n    });\n    const stroke = new Stroke({\n      color: '#3399CC',\n      width: 1.25,\n    });\n    defaultStyles = [\n      new Style({\n        image: new CircleStyle({\n          fill: fill,\n          stroke: stroke,\n          radius: 5,\n        }),\n        fill: fill,\n        stroke: stroke,\n      }),\n    ];\n  }\n  return defaultStyles;\n}\n\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n  /** @type {Object<import(\"../geom/GeometryType.js\").def
 ault, Array<Style>>} */\n  const styles = {};\n  const white = [255, 255, 255, 1];\n  const blue = [0, 153, 255, 1];\n  const width = 3;\n  styles[GeometryType.POLYGON] = [\n    new Style({\n      fill: new Fill({\n        color: [255, 255, 255, 0.5],\n      }),\n    }),\n  ];\n  styles[GeometryType.MULTI_POLYGON] = styles[GeometryType.POLYGON];\n\n  styles[GeometryType.LINE_STRING] = [\n    new Style({\n      stroke: new Stroke({\n        color: white,\n        width: width + 2,\n      }),\n    }),\n    new Style({\n      stroke: new Stroke({\n        color: blue,\n        width: width,\n      }),\n    }),\n  ];\n  styles[GeometryType.MULTI_LINE_STRING] = styles[GeometryType.LINE_STRING];\n\n  styles[GeometryType.CIRCLE] = styles[GeometryType.POLYGON].concat(\n    styles[GeometryType.LINE_STRING]\n  );\n\n  styles[GeometryType.POINT] = [\n    new Style({\n      image: new CircleStyle({\n        radius: width * 2,\n        fill: new Fill({\n          color: blue,\n        }),\n     
    stroke: new Stroke({\n          color: white,\n          width: width / 2,\n        }),\n      }),\n      zIndex: Infinity,\n    }),\n  ];\n  styles[GeometryType.MULTI_POINT] = styles[GeometryType.POINT];\n\n  styles[GeometryType.GEOMETRY_COLLECTION] = styles[\n    GeometryType.POLYGON\n  ].concat(styles[GeometryType.LINE_STRING], styles[GeometryType.POINT]);\n\n  return styles;\n}\n\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n  return feature.getGeometry();\n}\n\nexport default Style;\n","/**\n * @module ol/style/IconAnchorUnits\n */\n\n/**\n * Icon anchor units. One of 'fraction', 'pixels'.\n * @enum {string}\n */\nexport default {\n  /**\n   * Anchor is a fraction\n   * @api\n
    */\n  FRACTION: 'fraction',\n  /**\n   * Anchor is in pixels\n   * @api\n   */\n  PIXELS: 'pixels',\n};\n","/**\n * @module ol/style/IconOrigin\n */\n\n/**\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n * @enum {string}\n */\nexport default {\n  /**\n   * Origin is at bottom left\n   * @api\n   */\n  BOTTOM_LEFT: 'bottom-left',\n  /**\n   * Origin is at bottom right\n   * @api\n   */\n  BOTTOM_RIGHT: 'bottom-right',\n  /**\n   * Origin is at top left\n   * @api\n   */\n  TOP_LEFT: 'top-left',\n  /**\n   * Origin is at top right\n   * @api\n   */\n  TOP_RIGHT: 'top-right',\n};\n","/**\n * @module ol/style/IconImageCache\n */\nimport {asString} from '../color.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nclass IconImageCache {\n  constructor() {\n    /**\n     * @type {!Object<string, import(\"./IconImage.js\").default>}\n     * @private\n     */\n    this.cache_ = {};\n\n   
  /**\n     * @type {number}\n     * @private\n     */\n    this.cacheSize_ = 0;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.maxCacheSize_ = 32;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    this.cache_ = {};\n    this.cacheSize_ = 0;\n  }\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  canExpireCache() {\n    return this.cacheSize_ > this.maxCacheSize_;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  expire() {\n    if (this.canExpireCache()) {\n      let i = 0;\n      for (const key in this.cache_) {\n        const iconImage = this.cache_[key];\n        if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n          delete this.cache_[key];\n          --this.cacheSize_;\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {?string} crossOrigin Cross origin.\n   * @param {import(\"../color.js\").Color} color Color.\n   * @return {import(\"./IconImage.js\").default} I
 con image.\n   */\n  get(src, crossOrigin, color) {\n    const key = getKey(src, crossOrigin, color);\n    return key in this.cache_ ? this.cache_[key] : null;\n  }\n\n  /**\n   * @param {string} src Src.\n   * @param {?string} crossOrigin Cross origin.\n   * @param {import(\"../color.js\").Color} color Color.\n   * @param {import(\"./IconImage.js\").default} iconImage Icon image.\n   */\n  set(src, crossOrigin, color, iconImage) {\n    const key = getKey(src, crossOrigin, color);\n    this.cache_[key] = iconImage;\n    ++this.cacheSize_;\n  }\n\n  /**\n   * Set the cache size of the icon cache. Default is `32`. Change this value when\n   * your map uses more than 32 different icon images and you are not caching icon\n   * styles on the application level.\n   * @param {number} maxCacheSize Cache max size.\n   * @api\n   */\n  setSize(maxCacheSize) {\n    this.maxCacheSize_ = maxCacheSize;\n    this.expire();\n  }\n}\n\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigi
 n Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n  const colorString = color ? asString(color) : 'null';\n  return crossOrigin + ':' + src + ':' + colorString;\n}\n\nexport default IconImageCache;\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport const shared = new IconImageCache();\n","/**\n * @module ol/ImageBase\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport {abstract} from './util.js';\n\n/**\n * @abstract\n */\nclass ImageBase extends EventTarget {\n  /**\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {number|undefined} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"./ImageState.js\").default} state State.\n   */\n  constructor(extent, resolution, pixelRa
 tio, state) {\n    super();\n\n    /**\n     * @protected\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.extent = extent;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @protected\n     * @type {number|undefined}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @protected\n     * @type {import(\"./ImageState.js\").default}\n     */\n    this.state = state;\n  }\n\n  /**\n   * @protected\n   */\n  changed() {\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * @return {import(\"./extent.js\").Extent} Extent.\n   */\n  getExtent() {\n    return this.extent;\n  }\n\n  /**\n   * @abstract\n   * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n   */\n  getImage() {\n    return abstract();\n  }\n\n  /**\n   * @return {number} PixelRatio.\n   */\n  getPixelRatio() {\n    return this.pixelRatio_;\n  }\n\n  /**\n   * @return {number} Resolution.\n   */\n  getRe
 solution() {\n    return /** @type {number} */ (this.resolution);\n  }\n\n  /**\n   * @return {import(\"./ImageState.js\").default} State.\n   */\n  getState() {\n    return this.state;\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * @abstract\n   */\n  load() {\n    abstract();\n  }\n}\n\nexport default ImageBase;\n","/**\n * @module ol/extent/Relationship\n */\n\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n  UNKNOWN: 0,\n  INTERSECTING: 1,\n  ABOVE: 2,\n  RIGHT: 4,\n  BELOW: 8,\n  LEFT: 16,\n};\n","/**\n * @module ol/extent\n */\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\nimport {assert} from './asserts.js';\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * 
 @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n  const extent = createEmpty();\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent=} opt_extent Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n  const minX = Math.min.apply(null, xs);\n  const minY = Math.min.apply(null, ys);\n  const maxX = Math.max.apply(null, xs);\n  const maxY = Math.max.apply(null, ys);\n  return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(ex
 tent, value, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = extent[0] - value;\n    opt_extent[1] = extent[1] - value;\n    opt_extent[2] = extent[2] + value;\n    opt_extent[3] = extent[3] + value;\n    return opt_extent;\n  } else {\n    return [\n      extent[0] - value,\n      extent[1] - value,\n      extent[2] + value,\n      extent[3] + value,\n    ];\n  }\n}\n\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = extent[0];\n    opt_extent[1] = extent[1];\n    opt_extent[2] = extent[2];\n    opt_extent[3] = extent[3];\n    return opt_extent;\n  } else {\n    return extent.slice();\n  }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(e
 xtent, x, y) {\n  let dx, dy;\n  if (x < extent[0]) {\n    dx = extent[0] - x;\n  } else if (extent[2] < x) {\n    dx = x - extent[2];\n  } else {\n    dx = 0;\n  }\n  if (y < extent[1]) {\n    dy = extent[1] - y;\n  } else if (extent[3] < y) {\n    dy = y - extent[3];\n  } else {\n    dy = 0;\n  }\n  return dx * dx + dy * dy;\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n  return containsXY(extent, coordinate[0], coordinate[1]);\n}\n\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @
 return {boolean} The second extent is contained by or on the edge of the\n *     first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n  return (\n    extent1[0] <= extent2[0] &&\n    extent2[2] <= extent1[2] &&\n    extent1[1] <= extent2[1] &&\n    extent2[3] <= extent1[3]\n  );\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n  return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n *     
 import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n  const minX = extent[0];\n  const minY = extent[1];\n  const maxX = extent[2];\n  const maxY = extent[3];\n  const x = coordinate[0];\n  const y = coordinate[1];\n  let relationship = Relationship.UNKNOWN;\n  if (x < minX) {\n    relationship = relationship | Relationship.LEFT;\n  } else if (x > maxX) {\n    relationship = relationship | Relationship.RIGHT;\n  }\n  if (y < minY) {\n    relationship = relationship | Relationship.BELOW;\n  } else if (y > maxY) {\n    relationship = relationship | Relationship.ABOVE;\n  }\n  if (relationship === Relationship.UNKNOWN) {\n    relationship = Relationship.INTERSECTING;\n  }\n  return relationship;\n}\n\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n  return [Infinity, Infinity, -Infinity, -Infinity];\n}\n\n/**\n * Create a new extent or update the provi
 ded extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = minX;\n    opt_extent[1] = minY;\n    opt_extent[2] = maxX;\n    opt_extent[3] = maxY;\n    return opt_extent;\n  } else {\n    return [minX, minY, maxX, maxY];\n  }\n}\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(opt_extent) {\n  return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordi
 nate(coordinate, opt_extent) {\n  const x = coordinate[0];\n  const y = coordinate[1];\n  return createOrUpdate(x, y, x, y, opt_extent);\n}\n\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {\n  const extent = createOrUpdateEmpty(opt_extent);\n  return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  opt_extent\n) {\n  const extent = createOrUpdateEmpty(opt_extent);\n  return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {
 Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n  const extent = createOrUpdateEmpty(opt_extent);\n  return extendRings(extent, rings);\n}\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n  return (\n    extent1[0] == extent2[0] &&\n    extent1[2] == extent2[2] &&\n    extent1[1] == extent2[1] &&\n    extent1[3] == extent2[3]\n  );\n}\n\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approxi
 matelyEquals(extent1, extent2, tolerance) {\n  return (\n    Math.abs(extent1[0] - extent2[0]) < tolerance &&\n    Math.abs(extent1[2] - extent2[2]) < tolerance &&\n    Math.abs(extent1[1] - extent2[1]) < tolerance &&\n    Math.abs(extent1[3] - extent2[3]) < tolerance\n  );\n}\n\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n  if (extent2[0] < extent1[0]) {\n    extent1[0] = extent2[0];\n  }\n  if (extent2[2] > extent1[2]) {\n    extent1[2] = extent2[2];\n  }\n  if (extent2[1] < extent1[1]) {\n    extent1[1] = extent2[1];\n  }\n  if (extent2[3] > extent1[3]) {\n    extent1[3] = extent2[3];\n  }\n  return extent1;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordina
 te.\n */\nexport function extendCoordinate(extent, coordinate) {\n  if (coordinate[0] < extent[0]) {\n    extent[0] = coordinate[0];\n  }\n  if (coordinate[0] > extent[2]) {\n    extent[2] = coordinate[0];\n  }\n  if (coordinate[1] < extent[1]) {\n    extent[1] = coordinate[1];\n  }\n  if (coordinate[1] > extent[3]) {\n    extent[3] = coordinate[1];\n  }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(\n  extent,\
 n  flatCoordinates,\n  offset,\n  end,\n  stride\n) {\n  for (; offset < end; offset += stride) {\n    extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n  for (let i = 0, ii = rings.length; i < ii; ++i) {\n    extendCoordinates(extent, rings[i]);\n  }\n  return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n  extent[0] = Math.min(extent[0], x);\n  extent[1] = Math.min(extent[1], y);\n  extent[2] = Math.max(extent[2], x);\n  extent[3] = Math.max(extent[3], y);\n}\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise t
 he function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n  let val;\n  val = callback(getBottomLeft(extent));\n  if (val) {\n    return val;\n  }\n  val = callback(getBottomRight(extent));\n  if (val) {\n    return val;\n  }\n  val = callback(getTopRight(extent));\n  if (val) {\n    return val;\n  }\n  val = callback(getTopLeft(extent));\n  if (val) {\n    return val;\n  }\n  return false;\n}\n\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n  let area = 0;\n  if (!isEmpty(extent)) {\n    area = getWidth(extent) * getHeight(extent);\n  }\n  return area;\n}\n\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordin
 ate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n  return [extent[0], extent[1]];\n}\n\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n  return [extent[2], extent[1]];\n}\n\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n  return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./extent/Corner.js\").default} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n  let coordinate;\n  if (corner === Corner.BOTTOM_LEFT) {\n    coord
 inate = getBottomLeft(extent);\n  } else if (corner === Corner.BOTTOM_RIGHT) {\n    coordinate = getBottomRight(extent);\n  } else if (corner === Corner.TOP_LEFT) {\n    coordinate = getTopLeft(extent);\n  } else if (corner === Corner.TOP_RIGHT) {\n    coordinate = getTopRight(extent);\n  } else {\n    assert(false, 13); // Invalid corner\n  }\n  return coordinate;\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n  const minX = Math.min(extent1[0], extent2[0]);\n  const minY = Math.min(extent1[1], extent2[1]);\n  const maxX = Math.max(extent1[2], extent2[2]);\n  const maxY = Math.max(extent1[3], extent2[3]);\n  return (maxX - minX) * (maxY - minY);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size
 .\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(\n  center,\n  resolution,\n  rotation,\n  size,\n  opt_extent\n) {\n  const dx = (resolution * size[0]) / 2;\n  const dy = (resolution * size[1]) / 2;\n  const cosRotation = Math.cos(rotation);\n  const sinRotation = Math.sin(rotation);\n  const xCos = dx * cosRotation;\n  const xSin = dx * sinRotation;\n  const yCos = dy * cosRotation;\n  const ySin = dy * sinRotation;\n  const x = center[0];\n  const y = center[1];\n  const x0 = x - xCos + ySin;\n  const x1 = x - xCos - ySin;\n  const x2 = x + xCos - ySin;\n  const x3 = x + xCos + ySin;\n  const y0 = y - xSin - yCos;\n  const y1 = y - xSin + yCos;\n  const y2 = y + xSin + yCos;\n  const y3 = y + xSin - yCos;\n  return createOrUpdate(\n    Math.min(x0, x1, x2, x3),\n    Math.min(y0, y1, y2, y3),\n    Math.max(x0, x1, x2, x3),\n    Math.max(y0, y1, y2, y3),\n    opt_extent\n  );\n}\n\n/**\n * Get the height of 
 an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n  return extent[3] - extent[1];\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n  const intersection = getIntersection(extent1, extent2);\n  return getArea(intersection);\n}\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent=} opt_extent Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n  const intersection = opt_extent ? opt_extent : createEmpty();\n  if (intersects(extent1, extent2)) {\n    if (extent1[0] > extent2[0]) {\n      intersection[0] = extent1[0];\n    } else {\n      intersection[0] = extent2[0];\n  
   }\n    if (extent1[1] > extent2[1]) {\n      intersection[1] = extent1[1];\n    } else {\n      intersection[1] = extent2[1];\n    }\n    if (extent1[2] < extent2[2]) {\n      intersection[2] = extent1[2];\n    } else {\n      intersection[2] = extent2[2];\n    }\n    if (extent1[3] < extent2[3]) {\n      intersection[3] = extent1[3];\n    } else {\n      intersection[3] = extent2[3];\n    }\n  } else {\n    createOrUpdateEmpty(intersection);\n  }\n  return intersection;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n  return getWidth(extent) + getHeight(extent);\n}\n\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n  return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n *
  @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n  return [extent[0], extent[3]];\n}\n\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n  return [extent[2], extent[3]];\n}\n\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n  return extent[2] - extent[0];\n}\n\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n  return (\n    extent1[0] <= extent2[2] &&\n    extent1[2] >= extent2[0] &&\n    extent1[1] <= extent2[3] &&\n    extent1[3] >= extent2[1]\n  );\n}\n\n/*
 *\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n  return extent[2] < extent[0] || extent[3] < extent[1];\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = extent[0];\n    opt_extent[1] = extent[1];\n    opt_extent[2] = extent[2];\n    opt_extent[3] = extent[3];\n    return opt_extent;\n  } else {\n    return extent;\n  }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n  const deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n  const deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n  extent[0] -= deltaX;\n  extent[2] += deltaX;\n  extent[1] -= deltaY;\n  extent[3] += deltaY;\n}\n\n/**\n * Determine if the segment between
  two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n  let intersects = false;\n  const startRel = coordinateRelationship(extent, start);\n  const endRel = coordinateRelationship(extent, end);\n  if (\n    startRel === Relationship.INTERSECTING ||\n    endRel === Relationship.INTERSECTING\n  ) {\n    intersects = true;\n  } else {\n    const minX = extent[0];\n    const minY = extent[1];\n    const maxX = extent[2];\n    const maxY = extent[3];\n    const startX = start[0];\n    const startY = start[1];\n    const endX = end[0];\n    const endY = end[1];\n    const slope = (endY - startY) / (endX - startX);\n    let x, y;\n    
 if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n      // potentially intersects top\n      x = endX - (endY - maxY) / slope;\n      intersects = x >= minX && x <= maxX;\n    }\n    if (\n      !intersects &&\n      !!(endRel & Relationship.RIGHT) &&\n      !(startRel & Relationship.RIGHT)\n    ) {\n      // potentially intersects right\n      y = endY - (endX - maxX) * slope;\n      intersects = y >= minY && y <= maxY;\n    }\n    if (\n      !intersects &&\n      !!(endRel & Relationship.BELOW) &&\n      !(startRel & Relationship.BELOW)\n    ) {\n      // potentially intersects bottom\n      x = endX - (endY - minY) / slope;\n      intersects = x >= minX && x <= maxX;\n    }\n    if (\n      !intersects &&\n      !!(endRel & Relationship.LEFT) &&\n      !(startRel & Relationship.LEFT)\n    ) {\n      // potentially intersects left\n      y = endY - (endX - minX) * slope;\n      intersects = y >= minY && y <= maxY;\n    }\n  }\n  return intersects;\n}\n\n
 /**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent=} opt_extent Destination extent.\n * @param {number=} opt_stops Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent, opt_stops) {\n  let coordinates = [];\n  if (opt_stops > 1) {\n    const width = extent[2] - extent[0];\n    const height = extent[3] - extent[1];\n    for (let i = 0; i < opt_stops; ++i) {\n      coordinates.push(\n        extent[0] + (width * i) / opt_stops,\n        extent[1],\n        extent[2],\n        extent[1] + (height * i) / opt_stops,\n        extent[2] - (width * i) / opt_stops,\n        extent[3],\n        extent[0],\n        extent[3] - (height * i) / opt_stops\n 
      );\n    }\n  } else {\n    coordinates = [\n      extent[0],\n      extent[1],\n      extent[2],\n      extent[1],\n      extent[2],\n      extent[3],\n      extent[0],\n      extent[3],\n    ];\n  }\n  transformFn(coordinates, coordinates, 2);\n  const xs = [];\n  const ys = [];\n  for (let i = 0, l = coordinates.length; i < l; i += 2) {\n    xs.push(coordinates[i]);\n    ys.push(coordinates[i + 1]);\n  }\n  return _boundingExtentXYs(xs, ys, opt_extent);\n}\n\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n  const projectionExtent = projection.getExtent();\n  const center = getCenter(extent);\n  if (\n    projection.canWrapX() &&\n    (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])\n  ) {\n   
  const worldWidth = getWidth(projectionExtent);\n    const worldsAway = Math.floor(\n      (center[0] - projectionExtent[0]) / worldWidth\n    );\n    const offset = worldsAway * worldWidth;\n    extent[0] -= offset;\n    extent[2] -= offset;\n  }\n  return extent;\n}\n","/**\n * @module ol/Image\n */\nimport EventType from './events/EventType.js';\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport {IMAGE_DECODE} from './has.js';\nimport {getHeight} from './extent.js';\nimport {listenOnce, unlistenByKey} from './events.js';\n\n/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~Image#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n *     function(image, src) {\n *       image.getImage().src = src;\n *     }\n *\n * Providing a custom `imageLoadFun
 ction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\n\nclass ImageWrapper extends ImageBase {\n  /**\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {number|undefined} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {string} src Image source URI.\n   * @param {?string} crossOrigin Cross origin.\n   * @param {LoadFunction} imageLoadFunction Image load function.\n   */\n  constructor(\n    extent,\n    resolution,\n    pixelRatio,\n    src,\n    crossOrigin,\n    imageLoadFunction\n  ) {\n    super(extent, resolution, pixelRatio, ImageState.IDLE);\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLImageElement|H
 TMLVideoElement}\n     */\n    this.image_ = new Image();\n    if (crossOrigin !== null) {\n      this.image_.crossOrigin = crossOrigin;\n    }\n\n    /**\n     * @private\n     * @type {?function():void}\n     */\n    this.unlisten_ = null;\n\n    /**\n     * @protected\n     * @type {import(\"./ImageState.js\").default}\n     */\n    this.state = ImageState.IDLE;\n\n    /**\n     * @private\n     * @type {LoadFunction}\n     */\n    this.imageLoadFunction_ = imageLoadFunction;\n  }\n\n  /**\n   * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n   * @api\n   */\n  getImage() {\n    return this.image_;\n  }\n\n  /**\n   * Tracks loading or read errors.\n   *\n   * @private\n   */\n  handleImageError_() {\n    this.state = ImageState.ERROR;\n    this.unlistenImage_();\n    this.changed();\n  }\n\n  /**\n   * Tracks successful image load.\n   *\n   * @private\n   */\n  handleImageLoad_() {\n    if (this.resolution === undefined) {\n      this.resolution = getHeig
 ht(this.extent) / this.image_.height;\n    }\n    this.state = ImageState.LOADED;\n    this.unlistenImage_();\n    this.changed();\n  }\n\n  /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   * @api\n   */\n  load() {\n    if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n      this.state = ImageState.LOADING;\n      this.changed();\n      this.imageLoadFunction_(this, this.src_);\n      this.unlisten_ = listenImage(\n        this.image_,\n        this.handleImageLoad_.bind(this),\n        this.handleImageError_.bind(this)\n      );\n    }\n  }\n\n  /**\n   * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n   */\n  setImage(image) {\n    this.image_ = image;\n  }\n\n  /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */\
 n  unlistenImage_() {\n    if (this.unlisten_) {\n      this.unlisten_();\n      this.unlisten_ = null;\n    }\n  }\n}\n\n/**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n  const img = /** @type {HTMLImageElement} */ (image);\n\n  if (img.src && IMAGE_DECODE) {\n    const promise = img.decode();\n    let listening = true;\n    const unlisten = function () {\n      listening = false;\n    };\n    promise\n      .then(function () {\n        if (listening) {\n          loadHandler();\n        }\n      })\n      .catch(function (error) {\n        if (listening) {\n          // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream:\n          //        https://bugs.webkit.
 org/show_bug.cgi?id=198527\n          if (\n            error.name === 'EncodingError' &&\n            error.message === 'Invalid image type.'\n          ) {\n            loadHandler();\n          } else {\n            errorHandler();\n          }\n        }\n      });\n    return unlisten;\n  }\n\n  const listenerKeys = [\n    listenOnce(img, EventType.LOAD, loadHandler),\n    listenOnce(img, EventType.ERROR, errorHandler),\n  ];\n  return function unlisten() {\n    listenerKeys.forEach(unlistenByKey);\n  };\n}\n\nexport default ImageWrapper;\n","/**\n * @module ol/style/IconImage\n */\n\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\nimport {listenImage} from '../Image.js';\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet taintedTestContext = null;\n\nclass IconImage exten
 ds EventTarget {\n  /**\n   * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n   * @param {string|undefined} src Src.\n   * @param {import(\"../size.js\").Size} size Size.\n   * @param {?string} crossOrigin Cross origin.\n   * @param {import(\"../ImageState.js\").default} imageState Image state.\n   * @param {import(\"../color.js\").Color} color Color.\n   */\n  constructor(image, src, size, crossOrigin, imageState, color) {\n    super();\n\n    /**\n     * @private\n     * @type {Object<number, HTMLImageElement|HTMLCanvasElement>}\n     */\n    this.hitDetectionImage_ = {};\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement}\n     */\n    this.image_ = !image ? new Image() : image;\n\n    if (crossOrigin !== null) {\n      /** @type {HTMLImageElement} */ (this.image_).crossOrigin = crossOrigin;\n    }\n\n    /**\n     * @private\n     * @type {Object<number, HTMLCanvasElement>}\n     */\n    this.canvas_ = {};\n\n    /**\n     * @private\n     *
  @type {import(\"../color.js\").Color}\n     */\n    this.color_ = color;\n\n    /**\n     * @private\n     * @type {?function():void}\n     */\n    this.unlisten_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../ImageState.js\").default}\n     */\n    this.imageState_ = imageState;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_ = size;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     */\n    this.tainted_;\n  }\n\n  /**\n   * @private\n   * @return {boolean} The image canvas is tainted.\n   */\n  isTainted_() {\n    if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n      if (!taintedTestContext) {\n        taintedTestContext = createCanvasContext2D(1, 1);\n      }\n      taintedTestContext.drawImage(this.image_, 0, 0);\n      try {\n        taintedTestContext.getImageData(0, 0, 1, 1);\n        this.tainted_ = false;
 \n      } catch (e) {\n        taintedTestContext = null;\n        this.tainted_ = true;\n      }\n    }\n    return this.tainted_ === true;\n  }\n\n  /**\n   * @private\n   */\n  dispatchChangeEvent_() {\n    this.dispatchEvent(EventType.CHANGE);\n  }\n\n  /**\n   * @private\n   */\n  handleImageError_() {\n    this.imageState_ = ImageState.ERROR;\n    this.unlistenImage_();\n    this.dispatchChangeEvent_();\n  }\n\n  /**\n   * @private\n   */\n  handleImageLoad_() {\n    this.imageState_ = ImageState.LOADED;\n    if (this.size_) {\n      this.image_.width = this.size_[0];\n      this.image_.height = this.size_[1];\n    } else {\n      this.size_ = [this.image_.width, this.image_.height];\n    }\n    this.unlistenImage_();\n    this.dispatchChangeEvent_();\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n   */\n  getImage(pixelRatio) {\n    this.replaceColor_(pixelRatio);\n    return this.canvas
 _[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Image or Canvas element.\n   */\n  getPixelRatio(pixelRatio) {\n    this.replaceColor_(pixelRatio);\n    return this.canvas_[pixelRatio] ? pixelRatio : 1;\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return this.imageState_;\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n   */\n  getHitDetectionImage(pixelRatio) {\n    if (!this.hitDetectionImage_[pixelRatio]) {\n      if (this.isTainted_()) {\n        const usedPixelRatio = this.color_ ? pixelRatio : 1;\n        const width = this.size_[0];\n        const height = this.size_[1];\n        const context = createCanvasContext2D(\n          Math.ceil(width * usedPixelRatio),\n          Math.ceil(height * usedPixelRatio)\n        );\n        context.scale
 (usedPixelRatio, usedPixelRatio);\n        context.fillRect(0, 0, width, height);\n        this.hitDetectionImage_[pixelRatio] = context.canvas;\n      } else {\n        this.hitDetectionImage_[pixelRatio] = this.image_;\n      }\n    }\n    return this.hitDetectionImage_[pixelRatio];\n  }\n\n  /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  getSize() {\n    return this.size_;\n  }\n\n  /**\n   * @return {string|undefined} Image src.\n   */\n  getSrc() {\n    return this.src_;\n  }\n\n  /**\n   * Load not yet loaded URI.\n   */\n  load() {\n    if (this.imageState_ == ImageState.IDLE) {\n      this.imageState_ = ImageState.LOADING;\n      try {\n        /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n      } catch (e) {\n        this.handleImageError_();\n      }\n      this.unlisten_ = listenImage(\n        this.image_,\n        this.handleImageLoad_.bind(this),\n        this.handleImageError_.bind(th
 is)\n      );\n    }\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @private\n   */\n  replaceColor_(pixelRatio) {\n    if (!this.color_ || this.canvas_[pixelRatio]) {\n      return;\n    }\n\n    const canvas = document.createElement('canvas');\n    this.canvas_[pixelRatio] = canvas;\n\n    canvas.width = Math.ceil(this.image_.width * pixelRatio);\n    canvas.height = Math.ceil(this.image_.height * pixelRatio);\n\n    const ctx = canvas.getContext('2d');\n    ctx.scale(pixelRatio, pixelRatio);\n    ctx.drawImage(this.image_, 0, 0);\n\n    if (this.isTainted_()) {\n      // If reading from the canvas throws a SecurityError the same effect can be\n      // achieved with globalCompositeOperation.\n      // This could be used as the default, but it is not fully supported by all\n      // browsers. E. g. Internet Explorer 11 does not support the multiply\n      // operation and the resulting image shape will be completelly filled with\n      // the provided color.\n  
     // So this is only used as a fallback. It is still better than having no icon\n      // at all.\n      const c = this.color_;\n      ctx.globalCompositeOperation = 'multiply';\n      ctx.fillStyle = 'rgb(' + c[0] + ',' + c[1] + ',' + c[2] + ')';\n      ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n      ctx.globalCompositeOperation = 'destination-in';\n      ctx.drawImage(this.image_, 0, 0);\n      return;\n    }\n\n    const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n    const data = imgData.data;\n    const r = this.color_[0] / 255.0;\n    const g = this.color_[1] / 255.0;\n    const b = this.color_[2] / 255.0;\n\n    for (let i = 0, ii = data.length; i < ii; i += 4) {\n      data[i] *= r;\n      data[i + 1] *= g;\n      data[i + 2] *= b;\n    }\n    ctx.putImageData(imgData, 0, 0);\n  }\n\n  /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */\n  unlistenImage_() {\n    if (this.unlisten_) {\n    
   this.unlisten_();\n      this.unlisten_ = null;\n    }\n  }\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n  let iconImage = iconImageCache.get(src, crossOrigin, color);\n  if (!iconImage) {\n    iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n    iconImageCache.set(src, crossOrigin, color, iconImage);\n  }\n  return iconImage;\n}\n\nexport default IconImage;\n","/**\n * @module ol/style/Icon\n */\nimport EventType from '../events/EventType.js';\nimport IconAnchorUnits from './IconAnchorUnits.js';\nimport IconOrigin from './IconOrigin.js';\nimport ImageState fro
 m '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport {asArray} from '../color.js';\nimport {assert} from '../asserts.js';\nimport {get as getIconImage} from './IconImage.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./IconOrigin.js\").default} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A val
 ue of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image must already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {Array<number>} [displacement=[0,0]] Displacement the i
 con\n * @property {import(\"./IconOrigin.js\").default} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {import(\"../size.js\").Size} [size] Icon size in pixel. Can be used together with `offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not, and\n * for SVG images in Internet Explorer 11. The provided `imgSize` needs to match the actual size of the image.\n * @property {string} [src] Image source URI.\n */\n\n/**\n * @classdesc\n * Set icon style for vector featu
 res.\n * @api\n */\nclass Icon extends ImageStyle {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options || {};\n\n    /**\n     * @type {number}\n     */\n    const opacity = options.opacity !== undefined ? options.opacity : 1;\n\n    /**\n     * @type {number}\n     */\n    const rotation = options.rotation !== undefined ? options.rotation : 0;\n\n    /**\n     * @type {number|import(\"../size.js\").Size}\n     */\n    const scale = options.scale !== undefined ? options.scale : 1;\n\n    /**\n     * @type {boolean}\n     */\n    const rotateWithView =\n      options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n    super({\n      opacity: opacity,\n      rotation: rotation,\n      scale: scale,\n      displacement:\n        options.displacement !== undefined ? options.displacement : [0, 0],\n      rotateWithView: rotateWithView,\n    });\n\n    /**\n     * @private\n     * @type {Array<number>
 }\n     */\n    this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.normalizedAnchor_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./IconOrigin.js\").default}\n     */\n    this.anchorOrigin_ =\n      options.anchorOrigin !== undefined\n        ? options.anchorOrigin\n        : IconOrigin.TOP_LEFT;\n\n    /**\n     * @private\n     * @type {import(\"./IconAnchorUnits.js\").default}\n     */\n    this.anchorXUnits_ =\n      options.anchorXUnits !== undefined\n        ? options.anchorXUnits\n        : IconAnchorUnits.FRACTION;\n\n    /**\n     * @private\n     * @type {import(\"./IconAnchorUnits.js\").default}\n     */\n    this.anchorYUnits_ =\n      options.anchorYUnits !== undefined\n        ? options.anchorYUnits\n        : IconAnchorUnits.FRACTION;\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n      options.crossOrigin !== und
 efined ? options.crossOrigin : null;\n\n    /**\n     * @type {HTMLImageElement|HTMLCanvasElement}\n     */\n    const image = options.img !== undefined ? options.img : null;\n\n    /**\n     * @type {import(\"../size.js\").Size}\n     */\n    const imgSize = options.imgSize !== undefined ? options.imgSize : null;\n\n    /**\n     * @type {string|undefined}\n     */\n    let src = options.src;\n\n    assert(!(src !== undefined && image), 4); // `image` and `src` cannot be provided at the same time\n    assert(!image || (image && imgSize), 5); // `imgSize` must be set when `image` is provided\n\n    if ((src === undefined || src.length === 0) && image) {\n      src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n    }\n    assert(src !== undefined && src.length > 0, 6); // A defined and non-empty `src` or `image` must be provided\n\n    /**\n     * @type {import(\"../ImageState.js\").default}\n     */\n    const imageState =\n      options.src !== undefined ? ImageSt
 ate.IDLE : ImageState.LOADED;\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color}\n     */\n    this.color_ = options.color !== undefined ? asArray(options.color) : null;\n\n    /**\n     * @private\n     * @type {import(\"./IconImage.js\").default}\n     */\n    this.iconImage_ = getIconImage(\n      image,\n      /** @type {string} */ (src),\n      imgSize,\n      this.crossOrigin_,\n      imageState,\n      this.color_\n    );\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n    /**\n     * @private\n     * @type {import(\"./IconOrigin.js\").default}\n     */\n    this.offsetOrigin_ =\n      options.offsetOrigin !== undefined\n        ? options.offsetOrigin\n        : IconOrigin.TOP_LEFT;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    
 this.size_ = options.size !== undefined ? options.size : null;\n  }\n\n  /**\n   * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n   * @return {Icon} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new Icon({\n      anchor: this.anchor_.slice(),\n      anchorOrigin: this.anchorOrigin_,\n      anchorXUnits: this.anchorXUnits_,\n      anchorYUnits: this.anchorYUnits_,\n      crossOrigin: this.crossOrigin_,\n      color:\n        this.color_ && this.color_.slice\n          ? this.color_.slice()\n          : this.color_ || undefined,\n      src: this.getSrc(),\n      offset: this.offset_.slice(),\n      offsetOrigin: this.offsetOrigin_,\n      size: this.size_ !== null ? this.size_.slice() : undefined,\n      opacity: this.getOpacity(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n    });\n  }\n\n  /**\n   * Get 
 the anchor point in pixels. The anchor determines the center point for the\n   * symbolizer.\n   * @return {Array<number>} Anchor.\n   * @api\n   */\n  getAnchor() {\n    if (this.normalizedAnchor_) {\n      return this.normalizedAnchor_;\n    }\n    let anchor = this.anchor_;\n    const size = this.getSize();\n    if (\n      this.anchorXUnits_ == IconAnchorUnits.FRACTION ||\n      this.anchorYUnits_ == IconAnchorUnits.FRACTION\n    ) {\n      if (!size) {\n        return null;\n      }\n      anchor = this.anchor_.slice();\n      if (this.anchorXUnits_ == IconAnchorUnits.FRACTION) {\n        anchor[0] *= size[0];\n      }\n      if (this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n        anchor[1] *= size[1];\n      }\n    }\n\n    if (this.anchorOrigin_ != IconOrigin.TOP_LEFT) {\n      if (!size) {\n        return null;\n      }\n      if (anchor === this.anchor_) {\n        anchor = this.anchor_.slice();\n      }\n      if (\n        this.anchorOrigin_ == IconOrigin.TOP_RIGHT
  ||\n        this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT\n      ) {\n        anchor[0] = -anchor[0] + size[0];\n      }\n      if (\n        this.anchorOrigin_ == IconOrigin.BOTTOM_LEFT ||\n        this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT\n      ) {\n        anchor[1] = -anchor[1] + size[1];\n      }\n    }\n    this.normalizedAnchor_ = anchor;\n    return this.normalizedAnchor_;\n  }\n\n  /**\n   * Set the anchor point. The anchor determines the center point for the\n   * symbolizer.\n   *\n   * @param {Array<number>} anchor Anchor.\n   * @api\n   */\n  setAnchor(anchor) {\n    this.anchor_ = anchor;\n    this.normalizedAnchor_ = null;\n  }\n\n  /**\n   * Get the icon color.\n   * @return {import(\"../color.js\").Color} Color.\n   * @api\n   */\n  getColor() {\n    return this.color_;\n  }\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n   * @api\n   */\n  getImage(p
 ixelRatio) {\n    return this.iconImage_.getImage(pixelRatio);\n  }\n\n  /**\n   * Get the pixel ratio.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} The pixel ration of the image.\n   * @api\n   */\n  getPixelRatio(pixelRatio) {\n    return this.iconImage_.getPixelRatio(pixelRatio);\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  getImageSize() {\n    return this.iconImage_.getSize();\n  }\n\n  /**\n   * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n   */\n  getHitDetectionImageSize() {\n    return this.getImageSize();\n  }\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  getImageState() {\n    return this.iconImage_.getImageState();\n  }\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n   */\n  getHitDetectionImage(pixelRatio) {\n    return this.iconImage_.getHitDetectionImage(pixelRatio);\n  }
 \n\n  /**\n   * Get the origin of the symbolizer.\n   * @return {Array<number>} Origin.\n   * @api\n   */\n  getOrigin() {\n    if (this.origin_) {\n      return this.origin_;\n    }\n    let offset = this.offset_;\n    const displacement = this.getDisplacement();\n\n    if (this.offsetOrigin_ != IconOrigin.TOP_LEFT) {\n      const size = this.getSize();\n      const iconImageSize = this.iconImage_.getSize();\n      if (!size || !iconImageSize) {\n        return null;\n      }\n      offset = offset.slice();\n      if (\n        this.offsetOrigin_ == IconOrigin.TOP_RIGHT ||\n        this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT\n      ) {\n        offset[0] = iconImageSize[0] - size[0] - offset[0];\n      }\n      if (\n        this.offsetOrigin_ == IconOrigin.BOTTOM_LEFT ||\n        this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT\n      ) {\n        offset[1] = iconImageSize[1] - size[1] - offset[1];\n      }\n    }\n    offset[0] += displacement[0];\n    offset[1] += displacement[1]
 ;\n    this.origin_ = offset;\n    return this.origin_;\n  }\n\n  /**\n   * Get the image URL.\n   * @return {string|undefined} Image src.\n   * @api\n   */\n  getSrc() {\n    return this.iconImage_.getSrc();\n  }\n\n  /**\n   * Get the size of the icon (in pixels).\n   * @return {import(\"../size.js\").Size} Image size.\n   * @api\n   */\n  getSize() {\n    return !this.size_ ? this.iconImage_.getSize() : this.size_;\n  }\n\n  /**\n   * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n   */\n  listenImageChange(listener) {\n    this.iconImage_.addEventListener(EventType.CHANGE, listener);\n  }\n\n  /**\n   * Load not yet loaded URI.\n   * When rendering a feature with an icon style, the vector renderer will\n   * automatically call this method. However, you might want to call this\n   * method yourself for preloading or other purposes.\n   * @api\n   */\n  load() {\n    this.iconImage_.load();\n  }\n\n  /**\n   * @param {function(import(\
 "../events/Event.js\").default): void} listener Listener function.\n   */\n  unlistenImageChange(listener) {\n    this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n  }\n}\n\nexport default Icon;\n","/**\n * @module ol/style/TextPlacement\n */\n\n/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n * @enum {string}\n */\nexport default {\n  POINT: 'point',\n  LINE: 'line',\n};\n","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\nimport {toSize} from '../size.js';\n\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nconst DEFAULT_FILL_COLO
 R = '#333';\n\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS 'font' value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {import(\"./TextPlacement.js\").default|string} [placement='point'] Text placement.\n * @property {number|import(\"..
 /size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string} [text] Text content.\n * @property {string} [textAlign] Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.\n * Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {string} [textBaseline='middle'] Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',\n * 'hanging', 'ideographic'.\n * @property {import(\"./Fill.js\").default} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333).\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n 
 * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n */\n\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nclass Text {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options || {};\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.font_ = options.font;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = options.rotation;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.rotateWithView_ = options.rotateWithView;\n\n    /**\n     * @private\n     * @type {number|imp
 ort(\"../size.js\").Size|undefined}\n     */\n    this.scale_ = options.scale;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.text_ = options.text;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.textAlign_ = options.textAlign;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.textBaseline_ = options.textBaseline;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default}\n     */\n    this.fill_ =\n      options.fill !== undefined\n        ? options.fill\n        : new Fill({color: DEFAULT_FILL_COLOR});\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxAngle_ =\n      options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n    /**\n     * @private\n     * @type {import(\"./TextPla
 cement.js\").default|string}\n     */\n    this.placement_ =\n      options.placement !== undefined ? options.placement : TextPlacement.POINT;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overflow_ = !!options.overflow;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default}\n     */\n    this.backgroundFill_ = options.backgroundFill\n      ? options.backgroundFill\n      : null;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default}\n     */\n    this.backgroundStroke_ = options.backgroundStroke\n  
     ? options.backgroundStroke\n      : null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.padding_ = options.padding === undefined ? null : options.padding;\n  }\n\n  /**\n   * Clones the style.\n   * @return {Text} The cloned style.\n   * @api\n   */\n  clone() {\n    const scale = this.getScale();\n    return new Text({\n      font: this.getFont(),\n      placement: this.getPlacement(),\n      maxAngle: this.getMaxAngle(),\n      overflow: this.getOverflow(),\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      scale: Array.isArray(scale) ? scale.slice() : scale,\n      text: this.getText(),\n      textAlign: this.getTextAlign(),\n      textBaseline: this.getTextBaseline(),\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      offsetX: this.getOffsetX(),\n      offsetY: this.getOffsetY(),\n      backgroundFill: this.get
 BackgroundFill()\n        ? this.getBackgroundFill().clone()\n        : undefined,\n      backgroundStroke: this.getBackgroundStroke()\n        ? this.getBackgroundStroke().clone()\n        : undefined,\n      padding: this.getPadding(),\n    });\n  }\n\n  /**\n   * Get the `overflow` configuration.\n   * @return {boolean} Let text overflow the length of the path they follow.\n   * @api\n   */\n  getOverflow() {\n    return this.overflow_;\n  }\n\n  /**\n   * Get the font name.\n   * @return {string|undefined} Font.\n   * @api\n   */\n  getFont() {\n    return this.font_;\n  }\n\n  /**\n   * Get the maximum angle between adjacent characters.\n   * @return {number} Angle in radians.\n   * @api\n   */\n  getMaxAngle() {\n    return this.maxAngle_;\n  }\n\n  /**\n   * Get the label placement.\n   * @return {import(\"./TextPlacement.js\").default|string} Text placement.\n   * @api\n   */\n  getPlacement() {\n    return this.placement_;\n  }\n\n  /**\n   * Get the x-offset for the text.\
 n   * @return {number} Horizontal text offset.\n   * @api\n   */\n  getOffsetX() {\n    return this.offsetX_;\n  }\n\n  /**\n   * Get the y-offset for the text.\n   * @return {number} Vertical text offset.\n   * @api\n   */\n  getOffsetY() {\n    return this.offsetY_;\n  }\n\n  /**\n   * Get the fill style for the text.\n   * @return {import(\"./Fill.js\").default} Fill style.\n   * @api\n   */\n  getFill() {\n    return this.fill_;\n  }\n\n  /**\n   * Determine whether the text rotates with the map.\n   * @return {boolean|undefined} Rotate with map.\n   * @api\n   */\n  getRotateWithView() {\n    return this.rotateWithView_;\n  }\n\n  /**\n   * Get the text rotation.\n   * @return {number|undefined} Rotation.\n   * @api\n   */\n  getRotation() {\n    return this.rotation_;\n  }\n\n  /**\n   * Get the text scale.\n   * @return {number|import(\"../size.js\").Size|undefined} Scale.\n   * @api\n   */\n  getScale() {\n    return this.scale_;\n  }\n\n  /**\n   * Get the symbolizer scale 
 array.\n   * @return {import(\"../size.js\").Size} Scale array.\n   */\n  getScaleArray() {\n    return this.scaleArray_;\n  }\n\n  /**\n   * Get the stroke style for the text.\n   * @return {import(\"./Stroke.js\").default} Stroke style.\n   * @api\n   */\n  getStroke() {\n    return this.stroke_;\n  }\n\n  /**\n   * Get the text to be rendered.\n   * @return {string|undefined} Text.\n   * @api\n   */\n  getText() {\n    return this.text_;\n  }\n\n  /**\n   * Get the text alignment.\n   * @return {string|undefined} Text align.\n   * @api\n   */\n  getTextAlign() {\n    return this.textAlign_;\n  }\n\n  /**\n   * Get the text baseline.\n   * @return {string|undefined} Text baseline.\n   * @api\n   */\n  getTextBaseline() {\n    return this.textBaseline_;\n  }\n\n  /**\n   * Get the background fill style for the text.\n   * @return {import(\"./Fill.js\").default} Fill style.\n   * @api\n   */\n  getBackgroundFill() {\n    return this.backgroundFill_;\n  }\n\n  /**\n   * Get the backg
 round stroke style for the text.\n   * @return {import(\"./Stroke.js\").default} Stroke style.\n   * @api\n   */\n  getBackgroundStroke() {\n    return this.backgroundStroke_;\n  }\n\n  /**\n   * Get the padding for the text.\n   * @return {Array<number>} Padding.\n   * @api\n   */\n  getPadding() {\n    return this.padding_;\n  }\n\n  /**\n   * Set the `overflow` property.\n   *\n   * @param {boolean} overflow Let text overflow the path that it follows.\n   * @api\n   */\n  setOverflow(overflow) {\n    this.overflow_ = overflow;\n  }\n\n  /**\n   * Set the font.\n   *\n   * @param {string|undefined} font Font.\n   * @api\n   */\n  setFont(font) {\n    this.font_ = font;\n  }\n\n  /**\n   * Set the maximum angle between adjacent characters.\n   *\n   * @param {number} maxAngle Angle in radians.\n   * @api\n   */\n  setMaxAngle(maxAngle) {\n    this.maxAngle_ = maxAngle;\n  }\n\n  /**\n   * Set the x offset.\n   *\n   * @param {number} offsetX Horizontal text offset.\n   * @api\n   *
 /\n  setOffsetX(offsetX) {\n    this.offsetX_ = offsetX;\n  }\n\n  /**\n   * Set the y offset.\n   *\n   * @param {number} offsetY Vertical text offset.\n   * @api\n   */\n  setOffsetY(offsetY) {\n    this.offsetY_ = offsetY;\n  }\n\n  /**\n   * Set the text placement.\n   *\n   * @param {import(\"./TextPlacement.js\").default|string} placement Placement.\n   * @api\n   */\n  setPlacement(placement) {\n    this.placement_ = placement;\n  }\n\n  /**\n   * Set whether to rotate the text with the view.\n   *\n   * @param {boolean} rotateWithView Rotate with map.\n   * @api\n   */\n  setRotateWithView(rotateWithView) {\n    this.rotateWithView_ = rotateWithView;\n  }\n\n  /**\n   * Set the fill.\n   *\n   * @param {import(\"./Fill.js\").default} fill Fill style.\n   * @api\n   */\n  setFill(fill) {\n    this.fill_ = fill;\n  }\n\n  /**\n   * Set the rotation.\n   *\n   * @param {number|undefined} rotation Rotation.\n   * @api\n   */\n  setRotation(rotation) {\n    this.rotation_ = rotat
 ion;\n  }\n\n  /**\n   * Set the scale.\n   *\n   * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n   * @api\n   */\n  setScale(scale) {\n    this.scale_ = scale;\n    this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n  }\n\n  /**\n   * Set the stroke.\n   *\n   * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n   * @api\n   */\n  setStroke(stroke) {\n    this.stroke_ = stroke;\n  }\n\n  /**\n   * Set the text.\n   *\n   * @param {string|undefined} text Text.\n   * @api\n   */\n  setText(text) {\n    this.text_ = text;\n  }\n\n  /**\n   * Set the text alignment.\n   *\n   * @param {string|undefined} textAlign Text align.\n   * @api\n   */\n  setTextAlign(textAlign) {\n    this.textAlign_ = textAlign;\n  }\n\n  /**\n   * Set the text baseline.\n   *\n   * @param {string|undefined} textBaseline Text baseline.\n   * @api\n   */\n  setTextBaseline(textBaseline) {\n    this.textBaseline_ = textBaseline;\n  }\n\n  /**\n   * Set the background
  fill.\n   *\n   * @param {import(\"./Fill.js\").default} fill Fill style.\n   * @api\n   */\n  setBackgroundFill(fill) {\n    this.backgroundFill_ = fill;\n  }\n\n  /**\n   * Set the background stroke.\n   *\n   * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n   * @api\n   */\n  setBackgroundStroke(stroke) {\n    this.backgroundStroke_ = stroke;\n  }\n\n  /**\n   * Set the padding (`[top, right, bottom, left]`).\n   *\n   * @param {!Array<number>} padding Padding.\n   * @api\n   */\n  setPadding(padding) {\n    this.padding_ = padding;\n  }\n}\n\nexport default Text;\n","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsE
 xtent(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent\n) {\n  const outside = forEachCorner(\n    extent,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */\n    function (coordinate) {\n      return !linearRingContainsXY(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        coordinate[0],\n        coordinate[1]\n      );\n    }\n  );\n  return !outside;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  x,\n  y\n) {\n  // http://geomalgorithms.com/a03-_inclusion.html\n  // Copyright 2000 softSurfer, 2012 Dan Sunday\n  // This code may be freely used
  and modified for any purpose\n  // providing that this copyright notice is included with it.\n  // SoftSurfer makes no warranty for this code, and cannot be held\n  // liable for any real or imagined damage resulting from its use.\n  // Users of this code must verify correctness for their application.\n  let wn = 0;\n  let x1 = flatCoordinates[end - stride];\n  let y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    if (y1 <= y) {\n      if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n        wn++;\n      }\n    } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n      wn--;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return wn !== 0;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {
 number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  x,\n  y\n) {\n  if (ends.length === 0) {\n    return false;\n  }\n  if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n    return false;\n  }\n  for (let i = 1, ii = ends.length; i < ii; ++i) {\n    if (\n      linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n    ) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  x,\n  y\n) {\n  if (endss.length === 0) {\n    return false;\n  }\n  for 
 (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {linearRingsContainsXY} from './contains.js';\nimport {numberSafeCompareFunction} from '../../array.js';\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of 
 the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  flatCenters,\n  flatCentersOffset,\n  opt_dest\n) {\n  let i, ii, x, x1, x2, y1, y2;\n  const y = flatCenters[flatCentersOffset + 1];\n  /** @type {Array<number>} */\n  const intersections = [];\n  // Calculate intersections with the horizontal line\n  for (let r = 0, rr = ends.length; r < rr; ++r) {\n    const end = ends[r];\n    x1 = flatCoordinates[end - stride];\n    y1 = flatCoordinates[end - stride + 1];\n    for (i = offset; i < end; i += stride) {\n      x2 = flatCoordinates[i];\n      y2 = flatCoordinates[i + 1];\n      if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n        x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n        intersections.push(x);\n      }\n      x1 = x2;\n      y1 = y2;\n    }\n  }\n  // Find the longest segment of the horizontal line that has its center point\n  // inside the linear ring.\n  le
 t pointX = NaN;\n  let maxSegmentLength = -Infinity;\n  intersections.sort(numberSafeCompareFunction);\n  x1 = intersections[0];\n  for (i = 1, ii = intersections.length; i < ii; ++i) {\n    x2 = intersections[i];\n    const segmentLength = Math.abs(x2 - x1);\n    if (segmentLength > maxSegmentLength) {\n      x = (x1 + x2) / 2;\n      if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n        pointX = x;\n        maxSegmentLength = segmentLength;\n      }\n    }\n    x1 = x2;\n  }\n  if (isNaN(pointX)) {\n    // There is no horizontal line that has its center point inside the linear\n    // ring.  Use the center of the the linear ring's extent.\n    pointX = flatCenters[flatCentersOffset];\n  }\n  if (opt_dest) {\n    opt_dest.push(pointX, y, maxSegmentLength);\n    return opt_dest;\n  } else {\n    return [pointX, y, maxSegmentLength];\n  }\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {
 Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  flatCenters\n) {\n  let interiorPoints = [];\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    interiorPoints = getInteriorPointOfArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      flatCenters,\n      2 * i,\n      interiorPoints\n    );\n    offset = ends[ends.length - 1];\n  }\n  return interiorPoints;\n}\n","/**\n * @module ol/proj/Units\n */\n\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nconst Units = {\n  DEGREES: 'degrees',\n  FEET: 'ft',\n  METERS: 'm',\n  PIX
 ELS: 'pixels',\n  TILE_PIXELS: 'tile-pixels',\n  USFEET: 'us-ft',\n};\n\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport const METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = (2 * Math.PI * 6370997) / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\n\nexport default Units;\n","/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").default|string} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global
 =false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `{number}` view resolution and an `{import(\"../coordinate.js\").Coordinate}` as arguments, and returns\n * the `{number}` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj#getPointResolution} function will be used.\n */\n\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link
  module:ol/proj} namespace.\n * You can use these in applications, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj~get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n *     http://www.opengis.net/gml/srs/epsg.xml#4326,\n *     urn:x-ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n *     urn:ogc:def:crs:EPSG:6.18:3:3857,\n *     http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol
 /proj/proj4~register} function.\n *\n * @api\n */\nclass Projection {\n  /**\n   * @param {Options} options Projection options.\n   */\n  constructor(options) {\n    /**\n     * @private\n     * @type {string}\n     */\n    this.code_ = options.code;\n\n    /**\n     * Units of projected coordinates. When set to `TILE_PIXELS`, a\n     * `this.extent_` and `this.worldExtent_` must be configured properly for each\n     * tile.\n     * @private\n     * @type {import(\"./Units.js\").default}\n     */\n    this.units_ = /** @type {import(\"./Units.js\").default} */ (options.units);\n\n    /**\n     * Validity extent of the projection in projected coordinates. For projections\n     * with `TILE_PIXELS` units, this is the extent of the tile in\n     * tile pixel space.\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = options.extent !== undefined ? options.extent : null;\n\n    /**\n     * Extent of the world in EPSG:4326. For projections with\n 
     * `TILE_PIXELS` units, this is the extent of the tile in\n     * projected coordinate space.\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.worldExtent_ =\n      options.worldExtent !== undefined ? options.worldExtent : null;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.axisOrientation_ =\n      options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.global_ = options.global !== undefined ? options.global : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.canWrapX_ = !!(this.global_ && this.extent_);\n\n    /**\n     * @private\n     * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n     */\n    this.getPointResolutionFunc_ = options.getPointResolution;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.defaultTi
 leGrid_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.metersPerUnit_ = options.metersPerUnit;\n  }\n\n  /**\n   * @return {boolean} The projection is suitable for wrapping the x-axis\n   */\n  canWrapX() {\n    return this.canWrapX_;\n  }\n\n  /**\n   * Get the code for this projection, e.g. 'EPSG:4326'.\n   * @return {string} Code.\n   * @api\n   */\n  getCode() {\n    return this.code_;\n  }\n\n  /**\n   * Get the validity extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getExtent() {\n    return this.extent_;\n  }\n\n  /**\n   * Get the units of this projection.\n   * @return {import(\"./Units.js\").default} Units.\n   * @api\n   */\n  getUnits() {\n    return this.units_;\n  }\n\n  /**\n   * Get the amount of meters per unit of this projection.  If the projection is\n   * not configured with `metersPerUnit` or a units identifier, the return is\n   * `undefined`.\n   * @return {numbe
 r|undefined} Meters.\n   * @api\n   */\n  getMetersPerUnit() {\n    return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n  }\n\n  /**\n   * Get the world extent for this projection.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getWorldExtent() {\n    return this.worldExtent_;\n  }\n\n  /**\n   * Get the axis orientation of this projection.\n   * Example values are:\n   * enu - the default easting, northing, elevation.\n   * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n   *     or south orientated transverse mercator.\n   * wnu - westing, northing, up - some planetary coordinate systems have\n   *     \"west positive\" coordinate systems\n   * @return {string} Axis orientation.\n   * @api\n   */\n  getAxisOrientation() {\n    return this.axisOrientation_;\n  }\n\n  /**\n   * Is this projection a global projection which spans the whole world?\n   * @return {boolean} Whether the projection is global.\n   * @api\n
    */\n  isGlobal() {\n    return this.global_;\n  }\n\n  /**\n   * Set if the projection is a global projection which spans the whole world\n   * @param {boolean} global Whether the projection is global.\n   * @api\n   */\n  setGlobal(global) {\n    this.global_ = global;\n    this.canWrapX_ = !!(global && this.extent_);\n  }\n\n  /**\n   * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n   */\n  getDefaultTileGrid() {\n    return this.defaultTileGrid_;\n  }\n\n  /**\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n   */\n  setDefaultTileGrid(tileGrid) {\n    this.defaultTileGrid_ = tileGrid;\n  }\n\n  /**\n   * Set the validity extent for this projection.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  setExtent(extent) {\n    this.extent_ = extent;\n    this.canWrapX_ = !!(this.global_ && extent);\n  }\n\n  /**\n   * Set the world extent for this projection.\n   * @param {i
 mport(\"../extent.js\").Extent} worldExtent World extent\n   *     [minlon, minlat, maxlon, maxlat].\n   * @api\n   */\n  setWorldExtent(worldExtent) {\n    this.worldExtent_ = worldExtent;\n  }\n\n  /**\n   * Set the getPointResolution function (see {@link module:ol/proj~getPointResolution}\n   * for this projection.\n   * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n   * @api\n   */\n  setGetPointResolution(func) {\n    this.getPointResolutionFunc_ = func;\n  }\n\n  /**\n   * Get the custom point resolution function for this projection (if set).\n   * @return {function(number, import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n   * resolution function (if set).\n   */\n  getPointResolutionFunc() {\n    return this.getPointResolutionFunc_;\n  }\n}\n\nexport default Projection;\n","/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\nimport {cosh} from 
 '../math.js';\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * @const\n * @type {number}\n */\nexport const HALF_SIZE = Math.PI * RADIUS;\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const WORLD_EXTENT = [-180, -85, 180, 85];\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nclass EPSG3857Projection extends Projection {\n  /**\n   * @param {string} code Code.\n   */\n  constructor(code) {\n    super({\n      code: code,\n      units: Units.METERS,\n      extent: EXTENT,\n      global: true,\n      worldExtent: WORLD_EXTENT,\n      getPointResolution: function (resolution, point) {\n        return resolution / cosh(point[1] / RADIUS);\n      },\n    });\n  }\n}\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @c
 onst\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const PROJECTIONS = [\n  new EPSG3857Projection('EPSG:3857'),\n  new EPSG3857Projection('EPSG:102100'),\n  new EPSG3857Projection('EPSG:102113'),\n  new EPSG3857Projection('EPSG:900913'),\n  new EPSG3857Projection('urn:ogc:def:crs:EPSG:6.18:3:3857'),\n  new EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'),\n  new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n  const length = input.length;\n  const dimension = opt_dimension > 1 ? opt_dimension : 2;\n  let output = opt_output;\n  if (output === un
 defined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  const halfSize = HALF_SIZE;\n  for (let i = 0; i < length; i += dimension) {\n    output[i] = (halfSize * input[i]) / 180;\n    let y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n    if (y > halfSize) {\n      y = halfSize;\n    } else if (y < -halfSize) {\n      y = -halfSize;\n    }\n    output[i + 1] = y;\n  }\n  return output;\n}\n\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n  const length = input.length;\n  const dimension = opt_
 dimension > 1 ? opt_dimension : 2;\n  let output = opt_output;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  for (let i = 0; i < length; i += dimension) {\n    output[i] = (180 * input[i]) / HALF_SIZE;\n    output[i + 1] =\n      (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n  }\n  return output;\n}\n","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-180, -90, 180, 90];\n\n/**\n * @const\n * @type {number}\n */\nexport const METERS_PER_UNIT = (Math.PI * RADIUS) / 
 180;\n\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nclass EPSG4326Projection extends Projection {\n  /**\n   * @param {string} code Code.\n   * @param {string=} opt_axisOrientation Axis orientation.\n   */\n  constructor(code, opt_axisOrientation) {\n    super({\n      code: code,\n      units: Units.DEGREES,\n      extent: EXTENT,\n      axisOrientation: opt_axisOrientation,\n      global: true,\n      metersPerUnit: METERS_PER_UNIT,\n      worldExtent: EXTENT,\n    });\n  }\n}\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport const PROJECTIONS = [\n  new EPSG4326Projection('CRS:84'),\n  new EPSG4326Projection('EPSG:4326', 'neu'),\
 n  new EPSG4326Projection('urn:ogc:def:crs:EPSG::4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n  new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n  new EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu'),\n];\n","/**\n * @module ol/proj/projections\n */\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nlet cache = {};\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n  cache = {};\n}\n\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n  return cache[code] || null;\n}\n\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").
 default} projection The projection to cache.\n */\nexport function add(code, projection) {\n  cache[code] = projection;\n}\n","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nlet transforms = {};\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n  transforms = {};\n}\n\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  if (!(sourceCode in transforms)) {\n    transforms[sourceCode] = {
 };\n  }\n  transforms[sourceCode][destinationCode] = transformFn;\n}\n\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n  const sourceCode = source.getCode();\n  const destinationCode = destination.getCode();\n  const transform = transforms[sourceCode][destinationCode];\n  delete transforms[sourceCode][destinationCode];\n  if (isEmpty(transforms[sourceCode])) {\n    delete transforms[sourceCode];\n  }\n  return transform;\n}\n\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode Th
 e code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n  let transform;\n  if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n    transform = transforms[sourceCode][destinationCode];\n  }\n  return transform;\n}\n","/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {modulo} from './math.js';\nimport {padNumber} from './string.js';\n\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n\n/**\n * Add `delta` to `coordinate`. `coordi
 nate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {add} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     add(coord, [-2, 4]);\n *     // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n  coordinate[0] += +delta[0];\n  coordinate[1] += +delta[1];\n  return coordinate;\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n  const r = circle.getRadius();\n  const center = circle.getCenter();\n  const x0 = center[0];\n  const y0 = center
 [1];\n  const x1 = coordinate[0];\n  const y1 = coordinate[1];\n\n  let dx = x1 - x0;\n  const dy = y1 - y0;\n  if (dx === 0 && dy === 0) {\n    dx = 1;\n  }\n  const d = Math.sqrt(dx * dx + dy * dy);\n\n  const x = x0 + (r * dx) / d;\n  const y = y0 + (r * dy) / d;\n\n  return [x, y];\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n  const x0 = coordinate[0];\n  const y0 = coordinate[1];\n  const start = segment[0];\n  const end = segment[1];\n  const x1 = start[0];\n  c
 onst y1 = start[1];\n  const x2 = end[0];\n  const y2 = end[1];\n  const dx = x2 - x1;\n  const dy = y2 - y1;\n  const along =\n    dx === 0 && dy === 0\n      ? 0\n      : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n  let x, y;\n  if (along <= 0) {\n    x = x1;\n    y = y1;\n  } else if (along >= 1) {\n    x = x2;\n    y = y2;\n  } else {\n    x = x1 + along * dx;\n    y = y1 + along * dy;\n  }\n  return [x, y];\n}\n\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY();\n *     var out = stringifyFunc(coord);\n *     // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord 
 = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY(2);\n *     var out = stringifyFunc(coord);\n *     // out is now '7.85, 47.98'\n *\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(opt_fractionDigits) {\n  return (\n    /**\n     * @param {Coordinate} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function (coordinate) {\n      return toStringXY(coordinate, opt_fractionDigits);\n    }\n  );\n}\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n  const normalizedDegrees = modulo(degrees + 180, 360) - 180;\n  c
 onst x = Math.abs(3600 * normalizedDegrees);\n  const dflPrecision = opt_fractionDigits || 0;\n  const precision = Math.pow(10, dflPrecision);\n\n  let deg = Math.floor(x / 3600);\n  let min = Math.floor((x - deg * 3600) / 60);\n  let sec = x - deg * 3600 - min * 60;\n  sec = Math.ceil(sec * precision) / precision;\n\n  if (sec >= 60) {\n    sec = 0;\n    min += 1;\n  }\n\n  if (min >= 60) {\n    min = 0;\n    deg += 1;\n  }\n\n  return (\n    deg +\n    '\\u00b0 ' +\n    padNumber(min, 2) +\n    '\\u2032 ' +\n    padNumber(sec, 2, dflPrecision) +\n    '\\u2033' +\n    (normalizedDegrees == 0\n      ? ''\n      : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0))\n  );\n}\n\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n * 
     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template);\n *     // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template, 2);\n *     // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n *     that will be replaced by first and second coordinate values.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, opt_fractionDigits) {\n  if (coordinate) {\n 
    return template\n      .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))\n      .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));\n  } else {\n    return '';\n  }\n}\n\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n  let equals = true;\n  for (let i = coordinate1.length - 1; i >= 0; --i) {\n    if (coordinate1[i] != coordinate2[i]) {\n      equals = false;\n      break;\n    }\n  }\n  return equals;\n}\n\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n *     import {rotate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var rotateRadians = Math.PI / 2; // 90 degrees\n *     rotate(coord, rotateRadians);\n *     // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordi
 nate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n  const cosAngle = Math.cos(angle);\n  const sinAngle = Math.sin(angle);\n  const x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n  const y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n  coordinate[0] = x;\n  coordinate[1] = y;\n  return coordinate;\n}\n\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var scale = 1.2;\n *     scaleCoordinate(coord, scale);\n *     // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n  coordinate[0] *= scale;\n  coordinate[1] 
 *= scale;\n  return coordinate;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n  const dx = coord1[0] - coord2[0];\n  const dy = coord1[1] - coord2[1];\n  return dx * dx + dy * dy;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n  return Math.sqrt(squaredDistance(coord1, coord2));\n}\n\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\
 n  return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord);\n *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord, 1);\n *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, opt_fractio
 nDigits) {\n  if (coordinate) {\n    return (\n      degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) +\n      ' ' +\n      degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits)\n    );\n  } else {\n    return '';\n  }\n}\n\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord);\n *     // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord, 1);\n *     // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate,
  opt_fractionDigits) {\n  return format(coordinate, '{x}, {y}', opt_fractionDigits);\n}\n\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport function wrapX(coordinate, projection) {\n  const worldWidth = getWidth(projection.getExtent());\n  const worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n  if (worldsAway) {\n    coordinate[0] -= worldsAway * worldWidth;\n  }\n  return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number=} opt_sourceExtentWidth Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport
  function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {\n  const projectionExtent = projection.getExtent();\n  let worldsAway = 0;\n  if (\n    projection.canWrapX() &&\n    (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])\n  ) {\n    const sourceExtentWidth =\n      opt_sourceExtentWidth || getWidth(projectionExtent);\n    worldsAway = Math.floor(\n      (coordinate[0] - projectionExtent[0]) / sourceExtentWidth\n    );\n  }\n  return worldsAway;\n}\n","/**\n * @module ol/proj\n */\n\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.
 \n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by
  this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection} object for the new projection and add it with\n * {@link module:ol/proj~addProjection}. You can then add the forward and in
 verse\n * functions with {@link module:ol/proj~addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection} with\n * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport Projection from './proj/Projection.js';\nimport Units, {METERS_PER_UNIT} from './proj/Units.js';\nimport {\n  PROJECTIONS as EPSG3857_PROJECTIONS,\n  fromEPSG4326,\n  toEPSG4326,\n} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport {\n  add as addProj,\n  clear as clearProj,\n  get as getProj,\n} from './proj/projections.js';\nimport {\n  add as addTransformFunc,\n  clear as clearTransformFuncs,\n  get as getTransformFunc,\n} from './proj/transforms.js';\nimport {applyTransform, getWidth} from './extent.js';\nimport {clamp, modulo} from './math.js';\n
 import {getDistance} from './sphere.js';\nimport {getWorldsAway} from './coordinate.js';\n\n/**\n * A projection as {@link module:ol/proj/Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array<number>, Array<number>=, number=): Array<number>} TransformFunction\n * @api\n */\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n *     values).\n */\nexp
 ort function cloneTransform(input, opt_output, opt_dimension) {\n  let output;\n  if (opt_output !== undefined) {\n    for (let i = 0, ii = input.length; i < ii; ++i) {\n      opt_output[i] = input[i];\n    }\n    output = opt_output;\n  } else {\n    output = input.slice();\n  }\n  return output;\n}\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n  if (opt_output !== undefined && input !== opt_output) {\n    for (let i = 0, ii = input.length; i < ii; ++i) {\n      opt_output[i] = input[i];\n    }\n    input = opt_output;\n  }\n  return input;\n}\n\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Proje
 ction instance.\n * @api\n */\nexport function addProjection(projection) {\n  addProj(projection.getCode(), projection);\n  addTransformFunc(projection, projection, cloneTransform);\n}\n\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n  projections.forEach(addProjection);\n}\n\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n  return typeof projectionLike === 'string'\n    ? getProj(/** @type {string} */ (projectionLike))\n    : /** @type {Projection} */ (projectionLike) || null;\n}\n\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degre
 es as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the 'point' pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").default=} opt_units Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point 
 resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n  projection = get(projection);\n  let pointResolution;\n  const getter = projection.getPointResolutionFunc();\n  if (getter) {\n    pointResolution = getter(resolution, point);\n    if (opt_units && opt_units !== projection.getUnits()) {\n      const metersPerUnit = projection.getMetersPerUnit();\n      if (metersPerUnit) {\n        pointResolution =\n          (pointResolution * metersPerUnit) / METERS_PER_UNIT[opt_units];\n      }\n    }\n  } else {\n    const units = projection.getUnits();\n    if ((units == Units.DEGREES && !opt_units) || opt_units == Units.DEGREES) {\n      pointResolution = resolution;\n    } else {\n      // Estimate point resolution by transforming the center pixel to EPSG:4326,\n      // measuring its width and height on the normal sphere, and taking the\n      // average of the width and height.\n      const toEPSG4326 = getTransformFromProjections(\
 n        projection,\n        get('EPSG:4326')\n      );\n      let vertices = [\n        point[0] - resolution / 2,\n        point[1],\n        point[0] + resolution / 2,\n        point[1],\n        point[0],\n        point[1] - resolution / 2,\n        point[0],\n        point[1] + resolution / 2,\n      ];\n      vertices = toEPSG4326(vertices, vertices, 2);\n      const width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n      const height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n      pointResolution = (width + height) / 2;\n      const metersPerUnit = opt_units\n        ? METERS_PER_UNIT[opt_units]\n        : projection.getMetersPerUnit();\n      if (metersPerUnit !== undefined) {\n        pointResolution /= metersPerUnit;\n      }\n    }\n  }\n  return pointResolution;\n}\n\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Project
 ion>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n  addProjections(projections);\n  projections.forEach(function (source) {\n    projections.forEach(function (destination) {\n      if (source !== destination) {\n        addTransformFunc(source, destination, cloneTransform);\n      }\n    });\n  });\n}\n\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equal\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(\n  project
 ions1,\n  projections2,\n  forwardTransform,\n  inverseTransform\n) {\n  projections1.forEach(function (projection1) {\n    projections2.forEach(function (projection2) {\n      addTransformFunc(projection1, projection2, forwardTransform);\n      addTransformFunc(projection2, projection1, inverseTransform);\n    });\n  });\n}\n\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n  clearProj();\n  clearTransformFuncs();\n}\n\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n  if (!projection) {\n    return get(defaultCode);\n  } else if (typeof projection === 'string') {\n    return get(projection);\n  } else {\n    return /** @type {Projection} */ (projection);\n  }\n}\n\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n 
 * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n  return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>=} opt_output Output.\n     * @param {number=} opt_dimension Dimension.\n     * @return {Array<number>} Output.\n     */\n    function (input, opt_output, opt_dimension) {\n      const length = input.length;\n      const dimension = opt_dimension !== undefined ? opt_dimension : 2;\n      const output = opt_output !== undefined ? opt_output : new Array(length);\n      for (let i = 0; i < length; i += dimension) {\n        const point = coordTransform([input[i], input[i + 1]]);\n        output[i] = point[0];\n        output[i + 1] = point[1];\n        for (let j = dimension - 1; j >= 2; --j) {\n          out
 put[i + j] = input[i + j];\n        }\n      }\n      return output;\n    }\n  );\n}\n\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordin
 ate} inverse The inverse transform\n *     function (that is, from the destination projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n  const sourceProj = get(source);\n  const destProj = get(destination);\n  addTransformFunc(\n    sourceProj,\n    destProj,\n    createTransformFromCoordinateTransform(forward)\n  );\n  addTransformFunc(\n    destProj,\n    sourceProj,\n    createTransformFromCoordinateTransform(inverse)\n  );\n}\n\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike=} opt_projection Target projection. The\n * 
     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n  return transform(\n    coordinate,\n    'EPSG:4326',\n    opt_projection !== undefined ? opt_projection : 'EPSG:3857'\n  );\n}\n\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike=} opt_projection Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, opt_projection) {\n  const lonLat = transform(\n    coordinate,\n    opt_projection !== undefined ? opt_projection : 'EPSG:3857',\n    'EPSG:4326'\n  );\n  cons
 t lon = lonLat[0];\n  if (lon < -180 || lon > 180) {\n    lonLat[0] = modulo(lon + 180, 360) - 180;\n  }\n  return lonLat;\n}\n\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n  if (projection1 === projection2) {\n    return true;\n  }\n  const equalUnits = projection1.getUnits() === projection2.getUnits();\n  if (projection1.getCode() === projection2.getCode()) {\n    return equalUnits;\n  } else {\n    const transformFunc = getTransformFromProjections(projection1, projection2);\n    return transformFunc === cloneTransform && equalUnits;\n  }\n}\n\n/**\n * Searches in the list of transform functions for the function for converting\n * coo
 rdinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Projection object.\n * @param {Projection} destinationProjection Destination Projection\n *     object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(\n  sourceProjection,\n  destinationProjection\n) {\n  const sourceCode = sourceProjection.getCode();\n  const destinationCode = destinationProjection.getCode();\n  let transformFunc = getTransformFunc(sourceCode, destinationCode);\n  if (!transformFunc) {\n    transformFunc = identityTransform;\n  }\n  return transformFunc;\n}\n\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api
 \n */\nexport function getTransform(source, destination) {\n  const sourceProjection = get(source);\n  const destinationProjection = get(destination);\n  return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj~transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n  const transformFunc = getTransform(source, destination);\n
   return transformFunc(coordinate, undefined, coordinate.length);\n}\n\n/**\n * Transforms an extent from source projection to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number=} opt_stops Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, opt_stops) {\n  const transformFunc = getTransform(source, destination);\n  return applyTransform(extent, transformFunc, undefined, opt_stops);\n}\n\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Project
 ion} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(\n  point,\n  sourceProjection,\n  destinationProjection\n) {\n  const transformFunc = getTransformFromProjections(\n    sourceProjection,\n    destinationProjection\n  );\n  return transformFunc(point);\n}\n\n/**\n * @type {?Projection}\n */\nlet userProjection = null;\n\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @param {ProjectionLike} projection The user projection.\n */\nexport function setUserProjection(projection) {\n  userProjection = get(projection);\n}\n\n/**\n * Clear the user projection if set.  Note that this method is not yet a part of\n * the stable API. 
  Support for user projections is not yet complete and should\n * be considered experimental.\n */\nexport function clearUserProjection() {\n  userProjection = null;\n}\n\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @returns {?Projection} The user projection (or null if not set).\n */\nexport function getUserProjection() {\n  return userProjection;\n}\n\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods.  Note that this\n * method is not yet a part of the stable API.  Support for user projections is\n * not yet complete and should be considered experimental.\n */\nexport function useGeographic() {\n  setUserProjection('EPSG:4326');\n}\n\n/**\n * Return a coordinate transformed into the user projection.  If no user projection\n * is set, the original coordinate is returne
 d.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @returns {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n  if (!userProjection) {\n    return coordinate;\n  }\n  return transform(coordinate, sourceProjection, userProjection);\n}\n\n/**\n * Return a coordinate transformed from the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n  if (!userProjection) {\n    return coordinate;\n  }\n  return transform(coordinate, userProjection, destProjection);\n}\n\n/**\n * Return an extent transformed into the user projection.
   If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @returns {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n  if (!userProjection) {\n    return extent;\n  }\n  return transformExtent(extent, sourceProjection, userProjection);\n}\n\n/**\n * Return an extent transformed from the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @returns {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n  if (!userProjection) {\n    return extent;\n  }\n  return transformExtent(extent, userProjection, destPr
 ojection);\n}\n\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destiation).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destiation).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n  return function (coord) {\n    let sourceX = coord[0];\n    let sourceY = coord[1];\n    let transformed, worldsAway;\n    if (sourceProj.canWrapX()) {\n      const sourc
 eExtent = sourceProj.getExtent();\n      const sourceExtentWidth = getWidth(sourceExtent);\n      worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n      if (worldsAway) {\n        // Move x to the real world\n        sourceX = sourceX - worldsAway * sourceExtentWidth;\n      }\n      sourceX = clamp(sourceX, sourceExtent[0], sourceExtent[2]);\n      sourceY = clamp(sourceY, sourceExtent[1], sourceExtent[3]);\n      transformed = transform([sourceX, sourceY]);\n    } else {\n      transformed = transform(coord);\n    }\n    if (worldsAway && destProj.canWrapX()) {\n      // Move transformed coordinate back to the offset world\n      transformed[0] += worldsAway * getWidth(destProj.getExtent());\n    }\n    return transformed;\n  };\n}\n\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexpo
 rt function addCommon() {\n  // Add transformations that don't alter coordinates to convert within set of\n  // projections with equal meaning.\n  addEquivalentProjections(EPSG3857_PROJECTIONS);\n  addEquivalentProjections(EPSG4326_PROJECTIONS);\n  // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n  // coordinates and back.\n  addEquivalentTransforms(\n    EPSG4326_PROJECTIONS,\n    EPSG3857_PROJECTIONS,\n    fromEPSG4326,\n    toEPSG4326\n  );\n}\n\naddCommon();\n","/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_dimension Destination dimension (default is `2`)\n * @return {Array<number>} Destinat
 ion.\n */\nexport function interpolatePoint(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  fraction,\n  opt_dest,\n  opt_dimension\n) {\n  let o, t;\n  const n = (end - offset) / stride;\n  if (n === 1) {\n    o = offset;\n  } else if (n === 2) {\n    o = offset;\n    t = fraction;\n  } else if (n !== 0) {\n    let x1 = flatCoordinates[offset];\n    let y1 = flatCoordinates[offset + 1];\n    let length = 0;\n    const cumulativeLengths = [0];\n    for (let i = offset + stride; i < end; i += stride) {\n      const x2 = flatCoordinates[i];\n      const y2 = flatCoordinates[i + 1];\n      length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n      cumulativeLengths.push(length);\n      x1 = x2;\n      y1 = y2;\n    }\n    const target = fraction * length;\n    const index = binarySearch(cumulativeLengths, target);\n    if (index < 0) {\n      t =\n        (target - cumulativeLengths[-index - 2]) /\n        (cumulativeLengths[-index - 1] - cumulativeLengths[-index 
 - 2]);\n      o = offset + (-index - 2) * stride;\n    } else {\n      o = offset + index * stride;\n    }\n  }\n  const dimension = opt_dimension > 1 ? opt_dimension : 2;\n  const dest = opt_dest ? opt_dest : new Array(dimension);\n  for (let i = 0; i < dimension; ++i) {\n    dest[i] =\n      o === undefined\n        ? NaN\n        : t === undefined\n        ? flatCoordinates[o + i]\n        : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n  }\n  return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  m,\n  extrapolate\n) {\n  if (end == offset) {\n    return null;\n  }\n  let coordinate;\n  if (m < fl
 atCoordinates[offset + stride - 1]) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(offset, offset + stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  } else if (flatCoordinates[end - 1] < m) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(end - stride, end);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  }\n  // FIXME use O(1) search\n  if (m == flatCoordinates[offset + stride - 1]) {\n    return flatCoordinates.slice(offset, offset + stride);\n  }\n  let lo = offset / stride;\n  let hi = end / stride;\n  while (lo < hi) {\n    const mid = (lo + hi) >> 1;\n    if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n      hi = mid;\n    } else {\n      lo = mid + 1;\n    }\n  }\n  const m0 = flatCoordinates[lo * stride - 1];\n  if (m == m0) {\n    return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n  }
 \n  const m1 = flatCoordinates[(lo + 1) * stride - 1];\n  const t = (m - m0) / (m1 - m0);\n  coordinate = [];\n  for (let i = 0; i < stride - 1; ++i) {\n    coordinate.push(\n      lerp(\n        flatCoordinates[(lo - 1) * stride + i],\n        flatCoordinates[lo * stride + i],\n        t\n      )\n    );\n  }\n  coordinate.push(m);\n  return coordinate;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  m,\n  extrapolate,\n  interpolate\n) {\n  if (interpolate) {\n    return lineStringCoordinateAtM(\n      flatCoordinates,\n      offset,\n      ends[ends.length - 1],\n     
  stride,\n      m,\n      extrapolate\n    );\n  }\n  let coordinate;\n  if (m < flatCoordinates[stride - 1]) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(0, stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  }\n  if (flatCoordinates[flatCoordinates.length - 1] < m) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  }\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    if (offset == end) {\n      continue;\n    }\n    if (m < flatCoordinates[offset + stride - 1]) {\n      return null;\n    } else if (m <= flatCoordinates[end - 1]) {\n      return lineStringCoordinateAtM(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        m,\n        false\n      );\n    }\n    offset = end;\n  }\n  r
 eturn null;\n}\n","/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  const flatCenters = [];\n  let extent = createEmpty();\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    extent = createOrUpdateFromFlatCoordinates(\n      flatCoordinates,\n      offset,\n      ends[0],\n      stride\n    );\n    flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n    offset = ends[ends.length - 1];\n  }\n  return flatCenters;\n}\n","/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} of
 fset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  transform,\n  opt_dest\n) {\n  const dest = opt_dest ? opt_dest : [];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    const x = flatCoordinates[j];\n    const y = flatCoordinates[j + 1];\n    dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n    dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<nu
 mber>} anchor Rotation anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  angle,\n  anchor,\n  opt_dest\n) {\n  const dest = opt_dest ? opt_dest : [];\n  const cos = Math.cos(angle);\n  const sin = Math.sin(angle);\n  const anchorX = anchor[0];\n  const anchorY = anchor[1];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    const deltaX = flatCoordinates[j] - anchorX;\n    const deltaY = flatCoordinates[j + 1] - anchorY;\n    dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n    dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n    for (let k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {numb
 er} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  sx,\n  sy,\n  anchor,\n  opt_dest\n) {\n  const dest = opt_dest ? opt_dest : [];\n  const anchorX = anchor[0];\n  const anchorY = anchor[1];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    const deltaX = flatCoordinates[j] - anchorX;\n    const deltaY = flatCoordinates[j + 1] - anchorY;\n    dest[i++] = anchorX + sx * deltaX;\n    dest[i++] = anchorY + sy * deltaY;\n    for (let k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return d
 est;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  deltaX,\n  deltaY,\n  opt_dest\n) {\n  const dest = opt_dest ? opt_dest : [];\n  let i = 0;\n  for (let j = offset; j < end; j += stride) {\n    dest[i++] = flatCoordinates[j] + deltaX;\n    dest[i++] = flatCoordinates[j + 1] + deltaY;\n    for (let k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n","/**\n * @module ol/render/Feature\n */\nimport GeometryType from '../geom/GeometryType.js';\nimport {\n  compose as composeTransform,\n  
 create as createTransform,\n} from '../transform.js';\nimport {\n  createOrUpdateFromCoordinate,\n  createOrUpdateFromFlatCoordinates,\n  getCenter,\n  getHeight,\n} from '../extent.js';\nimport {extend} from '../array.js';\nimport {\n  getInteriorPointOfArray,\n  getInteriorPointsOfMultiArray,\n} from '../geom/flat/interiorpoint.js';\nimport {get as getProjection} from '../proj.js';\nimport {interpolatePoint} from '../geom/flat/interpolate.js';\nimport {linearRingss as linearRingssCenter} from '../geom/flat/center.js';\nimport {transform2D} from '../geom/flat/transform.js';\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nclass RenderFeature {\n  /**
 \n   * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n   * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n   *     to be right-handed for polygons.\n   * @param {Array<number>|Array<Array<number>>} ends Ends or Endss.\n   * @param {Object<string, *>} properties Properties.\n   * @param {number|string|undefined} id Feature id.\n   */\n  constructor(type, flatCoordinates, ends, properties, id) {\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent|undefined}\n     */\n    this.extent_;\n\n    /**\n     * @private\n     * @type {number|string|undefined}\n     */\n    this.id_ = id;\n\n    /**\n     * @private\n     * @type {import(\"../geom/GeometryType.js\").default}\n     */\n    this.type_ = type;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatCoordinates_ = flatCoordinates;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatInteriorPoints_ = nu
 ll;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatMidpoints_ = null;\n\n    /**\n     * @private\n     * @type {Array<number>|Array<Array<number>>}\n     */\n    this.ends_ = ends;\n\n    /**\n     * @private\n     * @type {Object<string, *>}\n     */\n    this.properties_ = properties;\n  }\n\n  /**\n   * Get a feature property by its key.\n   * @param {string} key Key\n   * @return {*} Value for the requested key.\n   * @api\n   */\n  get(key) {\n    return this.properties_[key];\n  }\n\n  /**\n   * Get the extent of this feature's geometry.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  getExtent() {\n    if (!this.extent_) {\n      this.extent_ =\n        this.type_ === GeometryType.POINT\n          ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n          : createOrUpdateFromFlatCoordinates(\n              this.flatCoordinates_,\n              0,\n              this.flatCoordinates_.length,\n              2
 \n            );\n    }\n    return this.extent_;\n  }\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  getFlatInteriorPoint() {\n    if (!this.flatInteriorPoints_) {\n      const flatCenter = getCenter(this.getExtent());\n      this.flatInteriorPoints_ = getInteriorPointOfArray(\n        this.flatCoordinates_,\n        0,\n        /** @type {Array<number>} */ (this.ends_),\n        2,\n        flatCenter,\n        0\n      );\n    }\n    return this.flatInteriorPoints_;\n  }\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  getFlatInteriorPoints() {\n    if (!this.flatInteriorPoints_) {\n      const flatCenters = linearRingssCenter(\n        this.flatCoordinates_,\n        0,\n        /** @type {Array<Array<number>>} */ (this.ends_),\n        2\n      );\n      this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n        this.flatCoordinates_,\n        0,\n        /** @type {Array<Array<number>>} */ (this.ends_),\n        2,\n       
  flatCenters\n      );\n    }\n    return this.flatInteriorPoints_;\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoint.\n   */\n  getFlatMidpoint() {\n    if (!this.flatMidpoints_) {\n      this.flatMidpoints_ = interpolatePoint(\n        this.flatCoordinates_,\n        0,\n        this.flatCoordinates_.length,\n        2,\n        0.5\n      );\n    }\n    return this.flatMidpoints_;\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoints.\n   */\n  getFlatMidpoints() {\n    if (!this.flatMidpoints_) {\n      this.flatMidpoints_ = [];\n      const flatCoordinates = this.flatCoordinates_;\n      let offset = 0;\n      const ends = /** @type {Array<number>} */ (this.ends_);\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        const end = ends[i];\n        const midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n        extend(this.flatMidpoints_, midpoint);\n        offset = end;\n      }\n    }\n    return this.flatMidpoints_;\n  }\n\n  /**\n  
  * Get the feature identifier.  This is a stable identifier for the feature and\n   * is set when reading data from a remote source.\n   * @return {number|string|undefined} Id.\n   * @api\n   */\n  getId() {\n    return this.id_;\n  }\n\n  /**\n   * @return {Array<number>} Flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    return this.flatCoordinates_;\n  }\n\n  /**\n   * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n   * determining the geometry type in style function (see {@link #getType}).\n   * @return {RenderFeature} Feature.\n   * @api\n   */\n  getGeometry() {\n    return this;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {RenderFeature} Simplified geometry.\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    return this;\n  }\n\n  /**\n   * Get a transformed and simplified version of the geometry.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n  
  * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n   * @return {RenderFeature} Simplified geometry.\n   */\n  simplifyTransformed(squaredTolerance, opt_transform) {\n    return this;\n  }\n\n  /**\n   * Get the feature properties.\n   * @return {Object<string, *>} Feature properties.\n   * @api\n   */\n  getProperties() {\n    return this.properties_;\n  }\n\n  /**\n   * @return {number} Stride.\n   */\n  getStride() {\n    return 2;\n  }\n\n  /**\n   * @return {undefined}\n   */\n  getStyleFunction() {\n    return undefined;\n  }\n\n  /**\n   * Get the type of this feature's geometry.\n   * @return {import(\"../geom/GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return this.type_;\n  }\n\n  /**\n   * Transform geometry coordinates from tile pixel space to projected.\n   * The SRS of the source and destination are expected to be the same.\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} sour
 ce The current projection\n   * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.\n   */\n  transform(source, destination) {\n    source = getProjection(source);\n    const pixelExtent = source.getExtent();\n    const projectedExtent = source.getWorldExtent();\n    const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n    composeTransform(\n      tmpTransform,\n      projectedExtent[0],\n      projectedExtent[3],\n      scale,\n      -scale,\n      0,\n      0,\n      0\n    );\n    transform2D(\n      this.flatCoordinates_,\n      0,\n      this.flatCoordinates_.length,\n      2,\n      tmpTransform,\n      this.flatCoordinates_\n    );\n  }\n  /**\n   * @return {Array<number>|Array<Array<number>>} Ends or endss.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n}\n\nRenderFeature.prototype.getEndss = RenderFeature.prototype.getEnds;\n\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates
  =\n  RenderFeature.prototype.getOrientedFlatCoordinates;\n\nexport default RenderFeature;\n","import { listen } from 'ol/events';\nimport EventType from 'ol/events/EventType';\nimport { labelCache } from 'ol/render/canvas';\nexport function deg2rad(degrees) {\n    return degrees * Math.PI / 180;\n}\nexport var defaultResolutions = (function () {\n    var resolutions = [];\n    for (var res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n        resolutions.push(res);\n    }\n    return resolutions;\n})();\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n    if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n        return /** @type {?} */ (new OffscreenCanvas(width, height));\n    }\n    else {\n        var canvas = document.crea
 teElement('canvas');\n        canvas.width = width;\n        canvas.height = height;\n        return canvas;\n    }\n}\nexport function getZoomForResolution(resolution, resolutions) {\n    var i = 0;\n    var ii = resolutions.length;\n    for (; i < ii; ++i) {\n        var candidate = resolutions[i];\n        if (candidate < resolution && i + 1 < ii) {\n            var zoomFactor = resolutions[i] / resolutions[i + 1];\n            return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n        }\n    }\n    return ii - 1;\n}\nvar hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n    if (letterSpacing >= 0.05) {\n        var textWithLetterSpacing = '';\n        var lines = text.split('\\n');\n        var joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1));\n        for (var l = 0, ll = lines.length; l < ll; ++l) {\n            if (l > 0) {\n                textWithLetterSpacing += '\\n';\n  
           }\n            textWithLetterSpacing += lines[l].split('').join(joinSpaceString);\n        }\n        return textWithLetterSpacing;\n    }\n    return text;\n}\nvar measureContext;\nfunction getMeasureContext() {\n    if (!measureContext) {\n        measureContext = createCanvas(1, 1).getContext('2d');\n    }\n    return measureContext;\n}\nfunction measureText(text, letterSpacing) {\n    return getMeasureContext().measureText(text).width + (text.length - 1) * letterSpacing;\n}\nvar measureCache = {};\nif (labelCache) {\n    // Only available when using ES modules\n    listen(labelCache, EventType.CLEAR, function () {\n        measureCache = {};\n    });\n}\nexport function wrapText(text, font, em, letterSpacing) {\n    if (text.indexOf('\\n') !== -1) {\n        var hardLines = text.split('\\n');\n        var lines = [];\n        for (var i = 0, ii = hardLines.length; i < ii; ++i) {\n            lines.push(wrapText(hardLines[i], font, em, letterSpacing));\n        }\n     
    return lines.join('\\n');\n    }\n    var key = em + ',' + font + ',' + text + ',' + letterSpacing;\n    var wrappedText = measureCache[key];\n    if (!wrappedText) {\n        var words = text.split(' ');\n        if (words.length > 1) {\n            var ctx = getMeasureContext();\n            ctx.font = font;\n            var oneEm = ctx.measureText('M').width;\n            var maxWidth = oneEm * em;\n            var line = '';\n            var lines = [];\n            // Pass 1 - wrap lines to not exceed maxWidth\n            for (var i = 0, ii = words.length; i < ii; ++i) {\n                var word = words[i];\n                var testLine = line + (line ? ' ' : '') + word;\n                if (measureText(testLine, letterSpacing) <= maxWidth) {\n                    line = testLine;\n                }\n                else {\n                    if (line) {\n                        lines.push(line);\n                    }\n                    line = word;\n                }\n
             }\n            if (line) {\n                lines.push(line);\n            }\n            // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line\n            for (var i = 0; i < lines.length; ++i) {\n                var line_1 = lines[i];\n                if (measureText(line_1, letterSpacing) < maxWidth * 0.35) {\n                    var prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n                    var nextWidth = i < lines.length - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n                    lines.splice(i, 1);\n                    if (prevWidth < nextWidth) {\n                        lines[i - 1] += ' ' + line_1;\n                        i -= 1;\n                    }\n                    else {\n                        lines[i] = line_1 + ' ' + lines[i];\n                    }\n                }\n            }\n            // Pass 3 - try to fill 80% of maxWidth for each line\n    
         for (var i = 0, ii = lines.length - 1; i < ii; ++i) {\n                var line_2 = lines[i];\n                var next = lines[i + 1];\n                if (measureText(line_2, letterSpacing) > maxWidth * 0.7 &&\n                    measureText(next, letterSpacing) < maxWidth * 0.6) {\n                    var lineWords = line_2.split(' ');\n                    var lastWord = lineWords.pop();\n                    if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) {\n                        lines[i] = lineWords.join(' ');\n                        lines[i + 1] = lastWord + ' ' + next;\n                    }\n                    ii -= 1;\n                }\n            }\n            wrappedText = lines.join('\\n');\n        }\n        else {\n            wrappedText = text;\n        }\n        wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n        measureCache[key] = wrappedText;\n    }\n    return wrappedText;\n}\n//# sourceMappingURL=util.js.map","/*\n
 ol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\nimport Style from 'ol/style/Style';\nimport Fill from 'ol/style/Fill';\nimport Stroke from 'ol/style/Stroke';\nimport Icon from 'ol/style/Icon';\nimport Text from 'ol/style/Text';\nimport Circle from 'ol/style/Circle';\nimport RenderFeature from 'ol/render/Feature';\nimport { derefLayers } from '@mapbox/mapbox-gl-style-spec';\nimport { expression, Color, function as fn, latest as spec, featureFilter as createFilter } from '@mapbox/mapbox-gl-style-spec';\nimport mb2css from 'mapbox-to-css-font';\nimport { deg2rad, defaultResolutions, getZoomForResolution, wrapText, applyLetterSpacing, createCanvas } from './util';\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/St
 yle\").StyleFunction} StyleFunction\n */\nvar isFunction = fn.isFunction;\nvar convertFunction = fn.convertFunction;\nvar isExpression = expression.isExpression;\nvar createPropertyExpression = expression.createPropertyExpression;\nvar types = {\n    'Point': 1,\n    'MultiPoint': 1,\n    'LineString': 2,\n    'MultiLineString': 2,\n    'Polygon': 3,\n    'MultiPolygon': 3\n};\nvar anchor = {\n    'center': [0.5, 0.5],\n    'left': [0, 0.5],\n    'right': [1, 0.5],\n    'top': [0.5, 0],\n    'bottom': [0.5, 1],\n    'top-left': [0, 0],\n    'top-right': [1, 0],\n    'bottom-left': [0, 1],\n    'bottom-right': [1, 1]\n};\nvar expressionData = function (rawExpression, propertySpec) {\n    var compiledExpression = createPropertyExpression(rawExpression, propertySpec);\n    if (compiledExpression.result === 'error') {\n        throw new Error(compiledExpression.value.map(function (err) { return err.key + \": \" + err.message; }).join(', '));\n    }\n    return compiledExpression.value;\
 n};\nvar emptyObj = {};\nvar zoomObj = { zoom: 0 };\n/** @private */\nvar functionCache = {};\nvar renderFeatureCoordinates, renderFeature;\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {string} layoutOrPaint 'layout' or 'paint'.\n * @param {string} property Feature property.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @return {?} Value.\n */\nexport function getValue(layer, layoutOrPaint, property, zoom, feature) {\n    var layerId = layer.id;\n    if (!functionCache[layerId]) {\n        functionCache[layerId] = {};\n    }\n    var functions = functionCache[layerId];\n    if (!functions[property]) {\n        var value_1 = (layer[layoutOrPaint] || emptyObj)[property];\n        var propertySpec = spec[layoutOrPaint + \"_\" + layer.type][property];\n        if (value_1 === undefined) {\n            value_1 = propertySpec.default;\n        }\n        var isExpr = isExpression((value_1));\n        if (!isExpr && isFunction(value_1
 )) {\n            value_1 = convertFunction(value_1, propertySpec);\n            isExpr = true;\n        }\n        if (isExpr) {\n            var compiledExpression = expressionData(value_1, propertySpec);\n            functions[property] = compiledExpression.evaluate.bind(compiledExpression);\n        }\n        else {\n            if (propertySpec.type == 'color') {\n                value_1 = Color.parse(value_1);\n            }\n            functions[property] = function () {\n                return value_1;\n            };\n        }\n    }\n    zoomObj.zoom = zoom;\n    return functions[property](zoomObj, feature);\n}\n/** @private */\nvar filterCache = {};\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom) {\n    if (!(layerId in filterCache)) {\n        filterCache[layerId] = 
 createFilter(filter).filter;\n    }\n    zoomObj.zoom = zoom;\n    return filterCache[layerId](zoomObj, feature);\n}\n/**\n * @private\n * @param {?} color Color.\n * @param {number} opacity Opacity.\n * @return {string} Color.\n */\nfunction colorWithOpacity(color, opacity) {\n    if (color) {\n        if (color.a === 0 || opacity === 0) {\n            return undefined;\n        }\n        var a = color.a;\n        opacity = opacity === undefined ? 1 : opacity;\n        return 'rgba(' + Math.round(color.r * 255 / a) + ',' + Math.round(color.g * 255 / a) +\n            ',' + Math.round(color.b * 255 / a) + ',' + (a * opacity) + ')';\n    }\n    return color;\n}\nvar templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n    var parts;\n    do {\n        parts = text.match(templateRegEx);\n        if (parts) {\n            var va
 lue = properties[parts[2]] || '';\n            text = parts[1] + value + parts[3];\n        }\n    } while (parts);\n    return text;\n}\n/**\n * ```js\n * import stylefunction from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, which needs to be a `\"type\": \"vector\"` or\n * `\"type\": \"geojson\"` source and applies it to the specified OpenLayers layer.\n *\n * Two additional properties will be set on the provided layer:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * This function also works in a web worker. In worker
  mode, the main thread needs\n * to listen to messages from the worker and respond with another message to make\n * sure that sprite image loading works:\n *\n * ```js\n *  worker.addEventListener('message', event => {\n *   if (event.data.action === 'loadImage') {\n *     const image = new Image();\n *     image.crossOrigin = 'anonymous';\n *     image.addEventListener('load', function() {\n *       createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => {\n *         worker.postMessage({\n *           action: 'imageLoaded',\n *           image: imageBitmap,\n *           src: event.data.src\n *         }, [imageBitmap]);\n *       });\n *     });\n *     image.src = event.data.src;\n *   }\n * });\n * ```\n *\n * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to\n * apply the style to. In addition to the style, the layer will get two\n * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used\n * for the layer, and `mapbox-l
 ayers` will be an array of the `id`s of the\n * `glStyle`'s layers.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s\n * from the Mapbox Style object. When a `source` key is provided, all layers for\n * the specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array<number>} [resolutions=[78271.51696402048, 39135.75848201024,\n   19567.87924100512, 9783.93962050256, 4891.96981025128, 2445.98490512564,\n   1222.99245256282, 611.49622628141, 305.748113140705, 152.8740565703525,\n   76.43702828517625, 38.21851414258813, 19.109257071294063, 9.554628535647032,\n   4.777314267823516, 2.388657133911758, 1.194328566955879, 0.5971642834779395,\n   0.29858214173896974, 0.14929107086948487, 0.07464553543474244]]\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} [spriteData=undefined] 
 Sprite data from the url specified in\n * the Mapbox Style object's `sprite` property. Only required if a `sprite`\n * property is specified in the Mapbox Style object.\n * @param {Object} [spriteImageUrl=undefined] Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `sprite` property is specified in the Mapbox Style object.\n * @param {function(Array<string>):Array<string>} [getFonts=undefined] Function that\n * receives a font stack as arguments, and returns a (modified) font stack that\n * is available. Font names are the names used in the Mapbox Style object. If\n * not provided, the font stack will be used as-is. This function can also be\n * used for loading web fonts.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport default function (olLayer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts) {\n    if (resolutions === void 0) { r
 esolutions = defaultResolutions; }\n    if (typeof glStyle == 'string') {\n        glStyle = JSON.parse(glStyle);\n    }\n    if (glStyle.version != 8) {\n        throw new Error('glStyle version 8 required.');\n    }\n    var spriteImage, spriteImgSize;\n    if (spriteImageUrl) {\n        if (typeof Image !== 'undefined') {\n            var img_1 = new Image();\n            img_1.crossOrigin = 'anonymous';\n            img_1.onload = function () {\n                spriteImage = img_1;\n                spriteImgSize = [img_1.width, img_1.height];\n                olLayer.changed();\n                img_1.onload = null;\n            };\n            img_1.src = spriteImageUrl;\n        }\n        else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n            var worker = /** @type {*} */ (self);\n            // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded'\n            worker.postMessage({\n            
     action: 'loadImage',\n                src: spriteImageUrl\n            });\n            worker.addEventListener('message', function handler(event) {\n                if (event.data.action === 'imageLoaded' && event.data.src === spriteImageUrl) {\n                    spriteImage = event.data.image;\n                    spriteImgSize = [spriteImage.width, spriteImage.height];\n                }\n            });\n        }\n    }\n    var allLayers = derefLayers(glStyle.layers);\n    var layersBySourceLayer = {};\n    var mapboxLayers = [];\n    var mapboxSource;\n    for (var i = 0, ii = allLayers.length; i < ii; ++i) {\n        var layer = allLayers[i];\n        var layerId = layer.id;\n        if (typeof source == 'string' && layer.source == source ||\n            source.indexOf(layerId) !== -1) {\n            var sourceLayer = layer['source-layer'];\n            if (!mapboxSource) {\n                mapboxSource = layer.source;\n                var source_1 = glStyle.sources[ma
 pboxSource];\n                if (!source_1) {\n                    throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not defined\");\n                }\n                var type = source_1.type;\n                if (type !== 'vector' && type !== 'geojson') {\n                    throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not of type \\\"vector\\\" or \\\"geojson\\\", but \\\"\" + type + \"\\\"\");\n                }\n            }\n            var layers = layersBySourceLayer[sourceLayer];\n            if (!layers) {\n                layers = layersBySourceLayer[sourceLayer] = [];\n            }\n            layers.push({\n                layer: layer,\n                index: i\n            });\n            mapboxLayers.push(layerId);\n        }\n        // TODO revisit when diffing gets added\n        delete functionCache[layerId];\n        delete filterCache[layerId];\n    }\n    var textHalo = new Stroke();\n    var textColor = new Fill();\n    var iconI
 mageCache = {};\n    var patternCache = {};\n    var styles = [];\n    var styleFunction = function (feature, resolution) {\n        var properties = feature.getProperties();\n        var layers = layersBySourceLayer[properties.layer];\n        if (!layers) {\n            return;\n        }\n        var zoom = resolutions.indexOf(resolution);\n        if (zoom == -1) {\n            zoom = getZoomForResolution(resolution, resolutions);\n        }\n        var type = types[feature.getGeometry().getType()];\n        var f = {\n            properties: properties,\n            type: type\n        };\n        var stylesLength = -1;\n        var _loop_1 = function (i, ii) {\n            var layerData = layers[i];\n            var layer = layerData.layer;\n            var layerId = layer.id;\n            var layout = layer.layout || emptyObj;\n            var paint = layer.paint || emptyObj;\n            if (layout.visibility === 'none' || ('minzoom' in layer && zoom < layer.minzoom) ||\n  
               ('maxzoom' in layer && zoom >= layer.maxzoom)) {\n                return \"continue\";\n            }\n            var filter = layer.filter;\n            if (!filter || evaluateFilter(layerId, filter, f, zoom)) {\n                var color = void 0, opacity = void 0, fill = void 0, stroke = void 0, strokeColor = void 0, style = void 0;\n                var index = layerData.index;\n                if (type == 3 && layer.type == 'fill') {\n                    opacity = getValue(layer, 'paint', 'fill-opacity', zoom, f);\n                    if ('fill-pattern' in paint) {\n                        var fillIcon = getValue(layer, 'paint', 'fill-pattern', zoom, f);\n                        if (fillIcon) {\n                            var icon_1 = typeof fillIcon === 'string'\n                                ? fromTemplate(fillIcon, properties)\n                                : fillIcon.toString();\n                            if (spriteImage && spriteData && spriteData[icon
 _1]) {\n                                ++stylesLength;\n                                style = styles[stylesLength];\n                                if (!style || !style.getFill() || style.getStroke() || style.getText()) {\n                                    style = styles[stylesLength] = new Style({\n                                        fill: new Fill()\n                                    });\n                                }\n                                fill = style.getFill();\n                                style.setZIndex(index);\n                                var icon_cache_key = icon_1 + '.' + opacity;\n                                var pattern = patternCache[icon_cache_key];\n                                if (!pattern) {\n                                    var spriteImageData = spriteData[icon_1];\n                                    var canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n                                    var ctx = /*
 * @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n                                    ctx.globalAlpha = opacity;\n                                    ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n                                    pattern = ctx.createPattern(canvas, 'repeat');\n                                    patternCache[icon_cache_key] = pattern;\n                                }\n                                fill.setColor(pattern);\n                            }\n                        }\n                    }\n                    else {\n                        color = colorWithOpacity(getValue(layer, 'paint', 'fill-color', zoom, f), opacity);\n                        if (color) {\n                            if ('fill-outline-color' in paint) {\n                                strokeColor = colorWithOpacity(getValue(layer, 'paint', '
 fill-outline-color', zoom, f), opacity);\n                            }\n                            if (!strokeColor) {\n                                strokeColor = color;\n                            }\n                            ++stylesLength;\n                            style = styles[stylesLength];\n                            if (!style || !(style.getFill() && style.getStroke()) || style.getText()) {\n                                style = styles[stylesLength] = new Style({\n                                    fill: new Fill(),\n                                    stroke: new Stroke()\n                                });\n                            }\n                            fill = style.getFill();\n                            fill.setColor(color);\n                            stroke = style.getStroke();\n                            stroke.setColor(strokeColor);\n                            stroke.setWidth(1);\n                            style.setZIndex(index);\n  
                       }\n                    }\n                }\n                if (type != 1 && layer.type == 'line') {\n                    color = !('line-pattern' in paint) && 'line-color' in paint ?\n                        colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f), getValue(layer, 'paint', 'line-opacity', zoom, f)) :\n                        undefined;\n                    var width_1 = getValue(layer, 'paint', 'line-width', zoom, f);\n                    if (color && width_1 > 0) {\n                        ++stylesLength;\n                        style = styles[stylesLength];\n                        if (!style || !style.getStroke() || style.getFill() || style.getText()) {\n                            style = styles[stylesLength] = new Style({\n                                stroke: new Stroke()\n                            });\n                        }\n                        stroke = style.getStroke();\n                        stroke.setLineCap(
 getValue(layer, 'layout', 'line-cap', zoom, f));\n                        stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f));\n                        stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f));\n                        stroke.setColor(color);\n                        stroke.setWidth(width_1);\n                        stroke.setLineDash(paint['line-dasharray'] ?\n                            getValue(layer, 'paint', 'line-dasharray', zoom, f).map(function (x) {\n                                return x * width_1;\n                            }) : null);\n                        style.setZIndex(index);\n                    }\n                }\n                var hasImage = false;\n                var text = null;\n                var placementAngle = 0;\n                var icon = void 0, iconImg = void 0, skipLabel = void 0;\n                if ((type == 1 || type == 2) && 'icon-image' in layout) {\n                    var iconImag
 e = getValue(layer, 'layout', 'icon-image', zoom, f);\n                    if (iconImage) {\n                        icon = typeof iconImage === 'string'\n                            ? fromTemplate(iconImage, properties)\n                            : iconImage.toString();\n                        var styleGeom = undefined;\n                        if (spriteImage && spriteData && spriteData[icon]) {\n                            var iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f);\n                            if (type == 2) {\n                                var geom = feature.getGeometry();\n                                // ol package and ol-debug.js only\n                                if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n                                    var extent = geom.getExtent();\n                                    var size = Math.sqrt(Math.max(Math.pow((extent[2] - extent[0]) / resolution, 2), Math.pow((extent[3] 
 - extent[1]) / resolution, 2)));\n                                    if (size > 150) {\n                                        //FIXME Do not hard-code a size of 150\n                                        var midpoint = geom.getType() === 'MultiLineString' ? geom.getFlatMidpoints() : geom.getFlatMidpoint();\n                                        if (!renderFeature) {\n                                            renderFeatureCoordinates = [NaN, NaN];\n                                            renderFeature = new RenderFeature('Point', renderFeatureCoordinates, [], {}, null);\n                                        }\n                                        styleGeom = renderFeature;\n                                        renderFeatureCoordinates[0] = midpoint[0];\n                                        renderFeatureCoordinates[1] = midpoint[1];\n                                        var placement = getValue(layer, 'layout', 'symbol-placement', zoom, f);\n               
                          if (placement === 'line' && iconRotationAlignment === 'map') {\n                                            var stride = geom.getStride();\n                                            var coordinates = geom.getFlatCoordinates();\n                                            for (var i_1 = 0, ii_1 = coordinates.length - stride; i_1 < ii_1; i_1 += stride) {\n                                                var x1 = coordinates[i_1];\n                                                var y1 = coordinates[i_1 + 1];\n                                                var x2 = coordinates[i_1 + stride];\n                                                var y2 = coordinates[i_1 + stride + 1];\n                                                var minX = Math.min(x1, x2);\n                                                var minY = Math.min(y1, y2);\n                                                var maxX = Math.max(x1, x2);\n                                                va
 r maxY = Math.max(y1, y2);\n                                                if (midpoint[0] >= minX && midpoint[0] <= maxX &&\n                                                    midpoint[1] >= minY && midpoint[1] <= maxY) {\n                                                    placementAngle = Math.atan2(y1 - y2, x2 - x1);\n                                                    break;\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                            if (type !== 2 || styleGeom) {\n                                ++stylesLength;\n                                style = styles[stylesLength];\n                                if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n                                    style = styles[stylesLength] = new Style();\n    
                             }\n                                style.setGeometry(styleGeom);\n                                var iconSize = getValue(layer, 'layout', 'icon-size', zoom, f);\n                                var iconColor = paint['icon-color'] !== undefined ? getValue(layer, 'paint', 'icon-color', zoom, f) : null;\n                                var icon_cache_key = icon + '.' + iconSize;\n                                if (iconColor !== null) {\n                                    icon_cache_key += '.' + iconColor;\n                                }\n                                iconImg = iconImageCache[icon_cache_key];\n                                if (!iconImg) {\n                                    var spriteImageData = spriteData[icon];\n                                    if (iconColor !== null) {\n                                        // cut out the sprite and color it\n                                        var canvas = createCanvas(spriteImageData.
 width, spriteImageData.height);\n                                        var ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n                                        ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n                                        var data = ctx.getImageData(0, 0, canvas.width, canvas.height);\n                                        for (var c = 0, cc = data.data.length; c < cc; c += 4) {\n                                            var a = iconColor.a;\n                                            if (a !== 0) {\n                                                data.data[c] = iconColor.r * 255 / a;\n                                                data.data[c + 1] = iconColor.g * 255 / a;\n                                                data.data[c + 2] = iconColor.b * 255 / a;\n                                         
    }\n                                            data.data[c + 3] = a;\n                                        }\n                                        ctx.putImageData(data, 0, 0);\n                                        iconImg = iconImageCache[icon_cache_key] = new Icon({\n                                            img: canvas,\n                                            imgSize: [canvas.width, canvas.height],\n                                            scale: iconSize / spriteImageData.pixelRatio\n                                        });\n                                    }\n                                    else {\n                                        iconImg = iconImageCache[icon_cache_key] = new Icon({\n                                            img: spriteImage,\n                                            imgSize: spriteImgSize,\n                                            size: [spriteImageData.width, spriteImageData.height],\n                           
                  offset: [spriteImageData.x, spriteImageData.y],\n                                            rotateWithView: iconRotationAlignment === 'map',\n                                            scale: iconSize / spriteImageData.pixelRatio\n                                        });\n                                    }\n                                }\n                                iconImg.setRotation(placementAngle + deg2rad(getValue(layer, 'layout', 'icon-rotate', zoom, f)));\n                                iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f));\n                                iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f)]);\n                                style.setImage(iconImg);\n                                text = style.getText();\n                                style.setText(undefined);\n                                style.setZIndex(index);\n                                hasImage = true;\n 
                                skipLabel = false;\n                            }\n                            else {\n                                skipLabel = true;\n                            }\n                        }\n                    }\n                }\n                if (type == 1 && 'circle-radius' in paint) {\n                    ++stylesLength;\n                    style = styles[stylesLength];\n                    if (!style || !style.getImage() || style.getFill() || style.getStroke()) {\n                        style = styles[stylesLength] = new Style();\n                    }\n                    var circleRadius = getValue(layer, 'paint', 'circle-radius', zoom, f);\n                    var circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f));\n                    var circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f), getValue(la
 yer, 'paint', 'circle-opacity', zoom, f));\n                    var circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f);\n                    var cache_key = circleRadius + '.' + circleStrokeColor + '.' +\n                        circleColor + '.' + circleStrokeWidth;\n                    iconImg = iconImageCache[cache_key];\n                    if (!iconImg) {\n                        iconImg = iconImageCache[cache_key] = new Circle({\n                            radius: circleRadius,\n                            stroke: circleStrokeColor && circleStrokeWidth > 0 ? new Stroke({\n                                width: circleStrokeWidth,\n                                color: circleStrokeColor\n                            }) : undefined,\n                            fill: circleColor ? new Fill({\n                                color: circleColor\n                            }) : undefined\n                        });\n                    }\n               
      style.setImage(iconImg);\n                    text = style.getText();\n                    style.setText(undefined);\n                    style.setGeometry(undefined);\n                    style.setZIndex(index);\n                    hasImage = true;\n                }\n                var label = void 0;\n                if ('text-field' in layout) {\n                    var textField = getValue(layer, 'layout', 'text-field', zoom, f).toString();\n                    label = fromTemplate(textField, properties).trim();\n                    opacity = getValue(layer, 'paint', 'text-opacity', zoom, f);\n                }\n                if (label && opacity && !skipLabel) {\n                    if (!hasImage) {\n                        ++stylesLength;\n                        style = styles[stylesLength];\n                        if (!style || !style.getText() || style.getFill() || style.getStroke()) {\n                            style = styles[stylesLength] = new Style();\n    
                     }\n                        style.setImage(undefined);\n                        style.setGeometry(undefined);\n                    }\n                    if (!style.getText()) {\n                        style.setText(text || new Text({\n                            padding: [2, 2, 2, 2]\n                        }));\n                    }\n                    text = style.getText();\n                    var textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f));\n                    var fontArray = getValue(layer, 'layout', 'text-font', zoom, f);\n                    var textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f);\n                    var font = mb2css(getFonts ? getFonts(fontArray) : fontArray, textSize, textLineHeight);\n                    var textTransform = layout['text-transform'];\n                    if (textTransform == 'uppercase') {\n                        label = label.toUpperCase();\n                    }\n
                     else if (textTransform == 'lowercase') {\n                        label = label.toLowerCase();\n                    }\n                    var maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f);\n                    var letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f);\n                    var wrappedLabel = type == 2 ? applyLetterSpacing(label, letterSpacing) : wrapText(label, font, maxTextWidth, letterSpacing);\n                    text.setText(wrappedLabel);\n                    text.setFont(font);\n                    text.setRotation(deg2rad(getValue(layer, 'layout', 'text-rotate', zoom, f)));\n                    var textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f);\n                    var placement = (hasImage || type == 1) ? 'point' : getValue(layer, 'layout', 'symbol-placement', zoom, f);\n                    text.setPlacement(placement);\n                    var textHaloWidth = getValue(layer, 'pa
 int', 'text-halo-width', zoom, f);\n                    var textOffset = getValue(layer, 'layout', 'text-offset', zoom, f);\n                    var textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f);\n                    // Text offset has to take halo width and line height into account\n                    var vOffset = 0;\n                    var hOffset = 0;\n                    if (placement == 'point') {\n                        var textAlign = 'center';\n                        if (textAnchor.indexOf('left') !== -1) {\n                            textAlign = 'left';\n                            hOffset = textHaloWidth;\n                        }\n                        else if (textAnchor.indexOf('right') !== -1) {\n                            textAlign = 'right';\n                            hOffset = -textHaloWidth;\n                        }\n                        text.setTextAlign(textAlign);\n                        var textRotationAlignment = getValu
 e(layer, 'layout', 'text-rotation-alignment', zoom, f);\n                        text.setRotateWithView(textRotationAlignment == 'map');\n                    }\n                    else {\n                        text.setMaxAngle(deg2rad(getValue(layer, 'layout', 'text-max-angle', zoom, f)) * label.length / wrappedLabel.length);\n                        text.setTextAlign();\n                        text.setRotateWithView(false);\n                    }\n                    var textBaseline = 'middle';\n                    if (textAnchor.indexOf('bottom') == 0) {\n                        textBaseline = 'bottom';\n                        vOffset = -textHaloWidth - (0.5 * (textLineHeight - 1)) * textSize;\n                    }\n                    else if (textAnchor.indexOf('top') == 0) {\n                        textBaseline = 'top';\n                        vOffset = textHaloWidth + (0.5 * (textLineHeight - 1)) * textSize;\n                    }\n                    text.setTextBase
 line(textBaseline);\n                    text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]);\n                    text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]);\n                    textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f), opacity));\n                    text.setFill(textColor);\n                    var haloColor = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f), opacity);\n                    if (haloColor) {\n                        textHalo.setColor(haloColor);\n                        // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width\n                        // Halo width must be doubled because it is applied around the center of the text outline\n                        textHaloWidth *= 2;\n                        // 1/4 of text size (spec) x 2\n                        var halfTextSize = 0.5 * textSize;\n                      
   textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize);\n                        text.setStroke(textHalo);\n                    }\n                    else {\n                        text.setStroke(undefined);\n                    }\n                    var textPadding = getValue(layer, 'layout', 'text-padding', zoom, f);\n                    var padding = text.getPadding();\n                    if (textPadding !== padding[0]) {\n                        padding[0] = padding[1] = padding[2] = padding[3] = textPadding;\n                    }\n                    style.setZIndex(index);\n                }\n            }\n        };\n        for (var i = 0, ii = layers.length; i < ii; ++i) {\n            _loop_1(i, ii);\n        }\n        if (stylesLength > -1) {\n            styles.length = stylesLength + 1;\n            return styles;\n        }\n    };\n    olLayer.setStyle(styleFunction);\n    olLayer.set('mapbox-source', mapboxSource);\n    olLayer.set('
 mapbox-layers', mapboxLayers);\n    return styleFunction;\n}\nexport { colorWithOpacity as _colorWithOpacity, filterCache as _filterCache, evaluateFilter as _evaluateFilter, fromTemplate as _fromTemplate, getValue as _getValue, functionCache as _functionCache };\n//# sourceMappingURL=stylefunction.js.map","/**\n * @module ol/TileRange\n */\n\n/**\n * A representation of a contiguous block of tiles.  A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nclass TileRange {\n  /**\n   * @param {number} minX Minimum X.\n   * @param {number} maxX Maximum X.\n   * @param {number} minY Minimum Y.\n   * @param {number} maxY Maximum Y.\n   */\n  constructor(minX, maxX, minY, maxY) {\n    /**\n     * @type {number}\n     */\n    this.minX = minX;\n\n    /**\n     * @type {number}\n     */\n    this.maxX = maxX;\n\n    /**\n     * @type {number}\n     */\n    this.minY = minY;\n\n    /**\n     * @type {number}\n     */\n    this.maxY = maxY;\n  }\n
 \n  /**\n   * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @return {boolean} Contains tile coordinate.\n   */\n  contains(tileCoord) {\n    return this.containsXY(tileCoord[1], tileCoord[2]);\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Contains.\n   */\n  containsTileRange(tileRange) {\n    return (\n      this.minX <= tileRange.minX &&\n      tileRange.maxX <= this.maxX &&\n      this.minY <= tileRange.minY &&\n      tileRange.maxY <= this.maxY\n    );\n  }\n\n  /**\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @return {boolean} Contains coordinate.\n   */\n  containsXY(x, y) {\n    return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Equals.\n   */\n  equals(tileRange) {\n    return (\n      this.minX == tileRange.minX &&\n      this.minY == tileRange.min
 Y &&\n      this.maxX == tileRange.maxX &&\n      this.maxY == tileRange.maxY\n    );\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   */\n  extend(tileRange) {\n    if (tileRange.minX < this.minX) {\n      this.minX = tileRange.minX;\n    }\n    if (tileRange.maxX > this.maxX) {\n      this.maxX = tileRange.maxX;\n    }\n    if (tileRange.minY < this.minY) {\n      this.minY = tileRange.minY;\n    }\n    if (tileRange.maxY > this.maxY) {\n      this.maxY = tileRange.maxY;\n    }\n  }\n\n  /**\n   * @return {number} Height.\n   */\n  getHeight() {\n    return this.maxY - this.minY + 1;\n  }\n\n  /**\n   * @return {import(\"./size.js\").Size} Size.\n   */\n  getSize() {\n    return [this.getWidth(), this.getHeight()];\n  }\n\n  /**\n   * @return {number} Width.\n   */\n  getWidth() {\n    return this.maxX - this.minX + 1;\n  }\n\n  /**\n   * @param {TileRange} tileRange Tile range.\n   * @return {boolean} Intersects.\n   */\n  intersects(tileRange) {\n    return (\n  
     this.minX <= tileRange.maxX &&\n      this.maxX >= tileRange.minX &&\n      this.minY <= tileRange.maxY &&\n      this.maxY >= tileRange.minY\n    );\n  }\n}\n\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange=} tileRange TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n  if (tileRange !== undefined) {\n    tileRange.minX = minX;\n    tileRange.maxX = maxX;\n    tileRange.minY = minY;\n    tileRange.maxY = maxY;\n    return tileRange;\n  } else {\n    return new TileRange(minX, maxX, minY, maxY);\n  }\n}\n\nexport default TileRange;\n","/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  OPACITY: 'opacity',\n  VISIBLE: 'visible',\n  EXTENT: 'extent',\n  Z_INDEX: 'zIndex',\n  MAX_RESOLUTION: 'maxResolution',\n  MIN_RESOLUTION: 'minResolution',\n  MAX_
 ZOOM: 'maxZoom',\n  MIN_ZOOM: 'minZoom',\n  SOURCE: 'source',\n};\n","/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {abstract} from '../util.js';\nimport {assert} from '../asserts.js';\nimport {assign} from '../obj.js';\nimport {clamp} from '../math.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Inf
 inity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nclass BaseLayer extends BaseObject {\n  /**\n   * @param {Options} options Layer options.\n   */\n  const
 ructor(options) {\n    super();\n\n    /**\n     * @type {Object<string, *>}\n     */\n    const properties = assign({}, options);\n\n    properties[LayerProperty.OPACITY] =\n      options.opacity !== undefined ? options.opacity : 1;\n    assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number\n\n    properties[LayerProperty.VISIBLE] =\n      options.visible !== undefined ? options.visible : true;\n    properties[LayerProperty.Z_INDEX] = options.zIndex;\n    properties[LayerProperty.MAX_RESOLUTION] =\n      options.maxResolution !== undefined ? options.maxResolution : Infinity;\n    properties[LayerProperty.MIN_RESOLUTION] =\n      options.minResolution !== undefined ? options.minResolution : 0;\n    properties[LayerProperty.MIN_ZOOM] =\n      options.minZoom !== undefined ? options.minZoom : -Infinity;\n    properties[LayerProperty.MAX_ZOOM] =\n      options.maxZoom !== undefined ? options.maxZoom : Infinity;\n\n    /**\n     * @type {st
 ring}\n     * @private\n     */\n    this.className_ =\n      properties.className !== undefined ? options.className : 'ol-layer';\n    delete properties.className;\n\n    this.setProperties(properties);\n\n    /**\n     * @type {import(\"./Layer.js\").State}\n     * @private\n     */\n    this.state_ = null;\n  }\n\n  /**\n   * @return {string} CSS class name.\n   */\n  getClassName() {\n    return this.className_;\n  }\n\n  /**\n   * This method is not meant to be called by layers or layer renderers because the state\n   * is incorrect if the layer is included in a layer group.\n   *\n   * @param {boolean=} opt_managed Layer is managed.\n   * @return {import(\"./Layer.js\").State} Layer state.\n   */\n  getLayerState(opt_managed) {\n    /** @type {import(\"./Layer.js\").State} */\n    const state =\n      this.state_ ||\n      /** @type {?} */ ({\n        layer: this,\n        managed: opt_managed === undefined ? true : opt_managed,\n      });\n    const zIndex = this.getZIndex();
 \n    state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n    state.sourceState = this.getSourceState();\n    state.visible = this.getVisible();\n    state.extent = this.getExtent();\n    state.zIndex =\n      zIndex !== undefined ? zIndex : state.managed === false ? Infinity : 0;\n    state.maxResolution = this.getMaxResolution();\n    state.minResolution = Math.max(this.getMinResolution(), 0);\n    state.minZoom = this.getMinZoom();\n    state.maxZoom = this.getMaxZoom();\n    this.state_ = state;\n\n    return state;\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be\n   *     modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   */\n  getLayersArray(opt_array) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer\n   *     states (to be modified in place).\n   * @ret
 urn {Array<import(\"./Layer.js\").State>} List of layer states.\n   */\n  getLayerStatesArray(opt_states) {\n    return abstract();\n  }\n\n  /**\n   * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n   * will be visible regardless of extent.\n   * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n   * @observable\n   * @api\n   */\n  getExtent() {\n    return /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(\n      LayerProperty.EXTENT\n    ));\n  }\n\n  /**\n   * Return the maximum resolution of the layer.\n   * @return {number} The maximum resolution of the layer.\n   * @observable\n   * @api\n   */\n  getMaxResolution() {\n    return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n  }\n\n  /**\n   * Return the minimum resolution of the layer.\n   * @return {number} The minimum resolution of the layer.\n   * @observable\n   * @api\n   */\n  getMinResolution() {\n    return /** @type {numb
 er} */ (this.get(LayerProperty.MIN_RESOLUTION));\n  }\n\n  /**\n   * Return the minimum zoom level of the layer.\n   * @return {number} The minimum zoom level of the layer.\n   * @observable\n   * @api\n   */\n  getMinZoom() {\n    return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n  }\n\n  /**\n   * Return the maximum zoom level of the layer.\n   * @return {number} The maximum zoom level of the layer.\n   * @observable\n   * @api\n   */\n  getMaxZoom() {\n    return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n  }\n\n  /**\n   * Return the opacity of the layer (between 0 and 1).\n   * @return {number} The opacity of the layer.\n   * @observable\n   * @api\n   */\n  getOpacity() {\n    return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"../source/State.js\").default} Source state.\n   */\n  getSourceState() {\n    return abstract();\n  }\n\n  /**\n   * Return the visibility of the layer (`
 true` or `false`).\n   * @return {boolean} The visibility of the layer.\n   * @observable\n   * @api\n   */\n  getVisible() {\n    return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n  }\n\n  /**\n   * Return the Z-index of the layer, which is used to order layers before\n   * rendering. The default Z-index is 0.\n   * @return {number} The Z-index of the layer.\n   * @observable\n   * @api\n   */\n  getZIndex() {\n    return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n  }\n\n  /**\n   * Set the extent at which the layer is visible.  If `undefined`, the layer\n   * will be visible at all extents.\n   * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n   * @observable\n   * @api\n   */\n  setExtent(extent) {\n    this.set(LayerProperty.EXTENT, extent);\n  }\n\n  /**\n   * Set the maximum resolution at which the layer is visible.\n   * @param {number} maxResolution The maximum resolution of the layer.\n   * @observable\n   
 * @api\n   */\n  setMaxResolution(maxResolution) {\n    this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n  }\n\n  /**\n   * Set the minimum resolution at which the layer is visible.\n   * @param {number} minResolution The minimum resolution of the layer.\n   * @observable\n   * @api\n   */\n  setMinResolution(minResolution) {\n    this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n  }\n\n  /**\n   * Set the maximum zoom (exclusive) at which the layer is visible.\n   * Note that the zoom levels for layer visibility are based on the\n   * view zoom level, which may be different from a tile source zoom level.\n   * @param {number} maxZoom The maximum zoom of the layer.\n   * @observable\n   * @api\n   */\n  setMaxZoom(maxZoom) {\n    this.set(LayerProperty.MAX_ZOOM, maxZoom);\n  }\n\n  /**\n   * Set the minimum zoom (inclusive) at which the layer is visible.\n   * Note that the zoom levels for layer visibility are based on the\n   * view zoom level, which may be different f
 rom a tile source zoom level.\n   * @param {number} minZoom The minimum zoom of the layer.\n   * @observable\n   * @api\n   */\n  setMinZoom(minZoom) {\n    this.set(LayerProperty.MIN_ZOOM, minZoom);\n  }\n\n  /**\n   * Set the opacity of the layer, allowed values range from 0 to 1.\n   * @param {number} opacity The opacity of the layer.\n   * @observable\n   * @api\n   */\n  setOpacity(opacity) {\n    assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n    this.set(LayerProperty.OPACITY, opacity);\n  }\n\n  /**\n   * Set the visibility of the layer (`true` or `false`).\n   * @param {boolean} visible The visibility of the layer.\n   * @observable\n   * @api\n   */\n  setVisible(visible) {\n    this.set(LayerProperty.VISIBLE, visible);\n  }\n\n  /**\n   * Set Z-index of the layer, which is used to order layers before rendering.\n   * The default Z-index is 0.\n   * @param {number} zindex The z-index of the layer.\n   * @observable\n   * @api\n   */\n  setZInde
 x(zindex) {\n    this.set(LayerProperty.Z_INDEX, zindex);\n  }\n\n  /**\n   * Clean up.\n   */\n  disposeInternal() {\n    if (this.state_) {\n      this.state_.layer = null;\n      this.state_ = null;\n    }\n    super.disposeInternal();\n  }\n}\n\nexport default BaseLayer;\n","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered before a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#prerender\n   * @api\n   */\n  PRERENDER: 'prerender',\n\n  /**\n   * Triggered after a layer is rendered.\n   * @event module:ol/render/Event~RenderEvent#postrender\n   * @api\n   */\n  POSTRENDER: 'postrender',\n\n  /**\n   * Triggered before layers are rendered.\n   * The event object will not have a `context` set.\n   * @event module:ol/render/Event~RenderEvent#precompose\n   * @api\n   */\n  PRECOMPOSE: 'precompose',\n\n  /**\n   * Triggered after all layers are rendered.\n   * The event object will not have a `contex
 t` set.\n   * @event module:ol/render/Event~RenderEvent#postcompose\n   * @api\n   */\n  POSTCOMPOSE: 'postcompose',\n\n  /**\n   * Triggered when rendering is complete, i.e. all sources and tiles have\n   * finished loading for the current viewport, and all tiles are faded in.\n   * The event object will not have a `context` set.\n   * @event module:ol/render/Event~RenderEvent#rendercomplete\n   * @api\n   */\n  RENDERCOMPLETE: 'rendercomplete',\n};\n","/**\n * @module ol/source/State\n */\n\n/**\n * @enum {string}\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\nexport default {\n  UNDEFINED: 'undefined',\n  LOADING: 'loading',\n  READY: 'ready',\n  ERROR: 'error',\n};\n","/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport {asse
 rt} from '../asserts.js';\nimport {assign} from '../obj.js';\nimport {getChangeEventType} from '../Object.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(import(\"../PluggableMap.js\").FrameState):HTMLElement} RenderFunction\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @prope
 rty {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../source/Source.js\").default} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n */\n\n/**\n * @typedef {Object} State\
 n * @property {import(\"./Layer.js\").default} layer\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {import(\"../source/State.js\").default} sourceState\n * @property {boolean} visible\n * @property {boolean} managed\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {number} zIndex\n * @property {number} maxResolution\n * @property {number} minResolution\n * @property {number} minZoom\n * @property {number} maxZoom\n */\n\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is be added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespect
 ive of the source of that data.\n *\n * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components\n * like {@link module:ol/interaction/Select~Select} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * Please note that for performance reasons several layers might get rendered to\n * the same HTML element, which will cause {@link module:ol/Map~Map#forEachLayerAtPixel} to\n * give false positives. To avoid this, apply different `className` properties to the\n * layers at creation time.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n *\n * @template {import(\"../source/Source.js\").default} SourceType\n * @api\n */\nclass Layer extends BaseLayer {\n  /**\n   * @param {Options} options Layer op
 tions.\n   */\n  constructor(options) {\n    const baseOptions = assign({}, options);\n    delete baseOptions.source;\n\n    super(baseOptions);\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapPrecomposeKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapRenderKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.sourceChangeKey_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../renderer/Layer.js\").default}\n     */\n    this.renderer_ = null;\n\n    // Overwrite default render method with a custom one\n    if (options.render) {\n      this.render = options.render;\n    }\n\n    if (options.map) {\n      this.setMap(options.map);\n    }\n\n    this.addEventListener(\n      getChangeEventType(LayerProperty.SOURCE),\n      this.handleSourcePropertyChange_\n    );\n\n    const source = options.source
 \n      ? /** @type {SourceType} */ (options.source)\n      : null;\n    this.setSource(source);\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   */\n  getLayersArray(opt_array) {\n    const array = opt_array ? opt_array : [];\n    array.push(this);\n    return array;\n  }\n\n  /**\n   * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   */\n  getLayerStatesArray(opt_states) {\n    const states = opt_states ? opt_states : [];\n    states.push(this.getLayerState());\n    return states;\n  }\n\n  /**\n   * Get the layer source.\n   * @return {SourceType} The layer source (or `null` if not yet set).\n   * @observable\n   * @api\n   */\n  getSource() {\n    return /** @type {SourceType} */ (this.get(Laye
 rProperty.SOURCE)) || null;\n  }\n\n  /**\n   * @return {import(\"../source/State.js\").default} Source state.\n   */\n  getSourceState() {\n    const source = this.getSource();\n    return !source ? SourceState.UNDEFINED : source.getState();\n  }\n\n  /**\n   * @private\n   */\n  handleSourceChange_() {\n    this.changed();\n  }\n\n  /**\n   * @private\n   */\n  handleSourcePropertyChange_() {\n    if (this.sourceChangeKey_) {\n      unlistenByKey(this.sourceChangeKey_);\n      this.sourceChangeKey_ = null;\n    }\n    const source = this.getSource();\n    if (source) {\n      this.sourceChangeKey_ = listen(\n        source,\n        EventType.CHANGE,\n        this.handleSourceChange_,\n        this\n      );\n    }\n    this.changed();\n  }\n\n  /**\n   * @param {import(\"../pixel\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n   * an array of features.\n   */\n  getFeatures(pixel) {\n    return this.renderer_.getF
 eatures(pixel);\n  }\n\n  /**\n   * In charge to manage the rendering of the layer. One layer type is\n   * bounded with one layer renderer.\n   * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target which the renderer may (but need not) use\n   * for rendering its content.\n   * @return {HTMLElement} The rendered element.\n   */\n  render(frameState, target) {\n    const layerRenderer = this.getRenderer();\n\n    if (layerRenderer.prepareFrame(frameState)) {\n      return layerRenderer.renderFrame(frameState, target);\n    }\n  }\n\n  /**\n   * Sets the layer to be rendered on top of other layers on a map. The map will\n   * not manage this layer in its layers collection, and the callback in\n   * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This\n   * is useful for temporary layers. To remove an unmanaged layer from the map,\n   * use `#setMap(null)`.\n   *\n   * To add the layer to a map an
 d have it managed by the map, use\n   * {@link module:ol/Map#addLayer} instead.\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @api\n   */\n  setMap(map) {\n    if (this.mapPrecomposeKey_) {\n      unlistenByKey(this.mapPrecomposeKey_);\n      this.mapPrecomposeKey_ = null;\n    }\n    if (!map) {\n      this.changed();\n    }\n    if (this.mapRenderKey_) {\n      unlistenByKey(this.mapRenderKey_);\n      this.mapRenderKey_ = null;\n    }\n    if (map) {\n      this.mapPrecomposeKey_ = listen(\n        map,\n        RenderEventType.PRECOMPOSE,\n        function (evt) {\n          const renderEvent = /** @type {import(\"../render/Event.js\").default} */ (evt);\n          const layerStatesArray = renderEvent.frameState.layerStatesArray;\n          const layerState = this.getLayerState(false);\n          // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.\n          assert(\n            !layerStatesArray.some(fu
 nction (arrayLayerState) {\n              return arrayLayerState.layer === layerState.layer;\n            }),\n            67\n          );\n          layerStatesArray.push(layerState);\n        },\n        this\n      );\n      this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n      this.changed();\n    }\n  }\n\n  /**\n   * Set the layer source.\n   * @param {SourceType} source The layer source.\n   * @observable\n   * @api\n   */\n  setSource(source) {\n    this.set(LayerProperty.SOURCE, source);\n  }\n\n  /**\n   * Get the renderer for this layer.\n   * @return {import(\"../renderer/Layer.js\").default} The layer renderer.\n   */\n  getRenderer() {\n    if (!this.renderer_) {\n      this.renderer_ = this.createRenderer();\n    }\n    return this.renderer_;\n  }\n\n  /**\n   * @return {boolean} The layer has a renderer.\n   */\n  hasRenderer() {\n    return !!this.renderer_;\n  }\n\n  /**\n   * Create a renderer for this layer.\n   * @return {import(\"../rend
 erer/Layer.js\").default} A layer renderer.\n   * @protected\n   */\n  createRenderer() {\n    return null;\n  }\n\n  /**\n   * Clean up.\n   */\n  disposeInternal() {\n    this.setSource(null);\n    super.disposeInternal();\n  }\n}\n\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n  if (!layerState.visible) {\n    return false;\n  }\n  const resolution = viewState.resolution;\n  if (\n    resolution < layerState.minResolution ||\n    resolution >= layerState.maxResolution\n  ) {\n    return false;\n  }\n  const zoom = viewState.zoom;\n  return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\n\nexport default Layer;\n","/**\n * @module ol/r
 ender/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries.  A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nclass VectorContext {\n  /**\n   * Render a geometry with a custom renderer.\n   *\n   * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {Function} renderer Renderer.\n   */\n  drawCustom(geometry, feature, renderer) {}\n\n  /**\n   * Render a geometry.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n   */\n  drawGeometry(geometry) {}\n\n  /**\n   * Set the rendering style.\n   *\n   * @param {import(\"../style/Style.js\").default} style The rendering style.\n   */\n  setStyle(style) {}\n\n  /**\n   * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n   * @param {import(\"../Feature.js\").default} feature Fe
 ature.\n   */\n  drawCircle(circleGeometry, feature) {}\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"../style/Style.js\").default} style Style.\n   */\n  drawFeature(feature, style) {}\n\n  /**\n   * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   */\n  drawGeometryCollection(geometryCollectionGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawLineString(lineStringGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   */\
 n  drawMultiLineString(multiLineStringGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawMultiPoint(multiPointGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawMultiPolygon(multiPolygonGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawPoint(pointGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feat
 ure Feature.\n   */\n  drawPolygon(polygonGeometry, feature) {}\n\n  /**\n   * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawText(geometry, feature) {}\n\n  /**\n   * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n   */\n  setFillStrokeStyle(fillStyle, strokeStyle) {}\n\n  /**\n   * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n   * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n   */\n  setImageStyle(imageStyle, opt_declutterGroup) {}\n\n  /**\n   * @param {import(\"../style/Text.js\").default} textStyle Text style.\n   * @param {import(\"./canvas.js\").DeclutterGroups=} opt_declutterGroups Declutter.\n   */\n  setTextStyle(textStyle, opt_declutterGroups) {}\n}\n\nexport default Ve
 ctorContext;\n","/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport Units from '../proj/Units.js';\nimport {abstract} from '../util.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../transform.js';\nimport {\n  createEmpty,\n  createOrUpdateEmpty,\n  getHeight,\n  returnOrUpdate,\n} from '../extent.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {memoizeOne} from '../functions.js';\nimport {transform2D} from './flat/transform.js';\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nclass Geometry extends BaseO
 bject {\n  constructor() {\n    super();\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.extentRevision_ = -1;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.simplifiedGeometryRevision = 0;\n\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} revision The geometry revision.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {Geometry} Simplified geometry.\n     */\n    this.simplifyTransformedInternal = memoizeOne(function (\n      revision,\n      squaredTolerance,\n      opt_transform\n    ) {\n      if (!opt_t
 ransform) {\n        return this.getSimplifiedGeometry(squaredTolerance);\n      }\n      const clone = this.clone();\n      clone.applyTransform(opt_transform);\n      return clone.getSimplifiedGeometry(squaredTolerance);\n    });\n  }\n\n  /**\n   * Get a transformed and simplified version of the geometry.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n   * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n   * @return {Geometry} Simplified geometry.\n   */\n  simplifyTransformed(squaredTolerance, opt_transform) {\n    return this.simplifyTransformedInternal(\n      this.getRevision(),\n      squaredTolerance,\n      opt_transform\n    );\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @abstract\n   * @return {!Geometry} Clone.\n   */\n  clone() {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js
 \").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    return abstract();\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */\n  containsXY(x, y) {\n    const coord = this.getClosestPoint([x, y]);\n    return coord[0] === x && coord[1] === y;\n  }\n\n  /**\n   * Return the closest point of the geometry to the passed point as\n   * {@link module:ol/coordinate~Coordinate coordinate}.\n   * @param {import(\"../coordinate.js\").Coordinate} point Point.\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_closestPoint Closest point.\n   * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n   * @api\n   */\n  getClosestPoint(point, opt_closestPoint) {\n    const closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n   
  this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n    return closestPoint;\n  }\n\n  /**\n   * Returns true if this geometry includes the specified coordinate. If the\n   * coordinate is on the boundary of the geometry, returns false.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {boolean} Contains coordinate.\n   * @api\n   */\n  intersectsCoordinate(coordinate) {\n    return this.containsXY(coordinate[0], coordinate[1]);\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */\n  computeExtent(extent) {\n    return abstract();\n  }\n\n  /**\n   * Get the extent of the geometry.\n   * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  getExtent(opt_extent) {\n    if (this.extentRevision_ != this.getRevision(
 )) {\n      const extent = this.computeExtent(this.extent_);\n      if (isNaN(extent[0]) || isNaN(extent[1])) {\n        createOrUpdateEmpty(extent);\n      }\n      this.extentRevision_ = this.getRevision();\n    }\n    return returnOrUpdate(this.extent_, opt_extent);\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   */\n  rotate(angle, anchor) {\n    abstract();\n  }\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the 
 center\n   *     of the geometry extent).\n   * @api\n   */\n  scale(sx, opt_sy, opt_anchor) {\n    abstract();\n  }\n\n  /**\n   * Create a simplified version of this geometry.  For linestrings, this uses\n   * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n   * algorithm.  For polygons, a quantization-based\n   * simplification is used to preserve topology.\n   * @param {number} tolerance The tolerance distance for simplification.\n   * @return {Geometry} A new, simplified version of the original geometry.\n   * @api\n   */\n  simplify(tolerance) {\n    return this.getSimplifiedGeometry(tolerance * tolerance);\n  }\n\n  /**\n   * Create a simplified version of this geometry using the Douglas Peucker\n   * algorithm.\n   * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Geometry} Simplified geometry.\n   */\n  getSimplifiedGeometry(squar
 edTolerance) {\n    return abstract();\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @abstract\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   */\n  getType() {\n    return abstract();\n  }\n\n  /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @abstract\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   */\n  applyTransform(transformFn) {\n    abstract();\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   */\n  intersectsExtent(extent) {\n    return abstract();\n  }\n\n  /**\n   * Transl
 ate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @abstract\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   */\n  translate(deltaX, deltaY) {\n    abstract();\n  }\n\n  /**\n   * Transform each coordinate of the geometry from one coordinate reference\n   * system to another. The geometry is modified in place.\n   * For example, a line will be transformed to a line and a circle to a circle.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n   *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n   * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n   *     string identifier or a {@link module:ol/proj/
 Projection~Projection} object.\n   * @return {Geometry} This geometry.  Note that original geometry is\n   *     modified in place.\n   * @api\n   */\n  transform(source, destination) {\n    /** @type {import(\"../proj/Projection.js\").default} */\n    const sourceProj = getProjection(source);\n    const transformFn =\n      sourceProj.getUnits() == Units.TILE_PIXELS\n        ? function (inCoordinates, outCoordinates, stride) {\n            const pixelExtent = sourceProj.getExtent();\n            const projectedExtent = sourceProj.getWorldExtent();\n            const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n            composeTransform(\n              tmpTransform,\n              projectedExtent[0],\n              projectedExtent[3],\n              scale,\n              -scale,\n              0,\n              0,\n              0\n            );\n            transform2D(\n              inCoordinates,\n              0,\n              inCoordinates.length,\n      
         stride,\n              tmpTransform,\n              outCoordinates\n            );\n            return getTransform(sourceProj, destination)(\n              inCoordinates,\n              outCoordinates,\n              stride\n            );\n          }\n        : getTransform(sourceProj, destination);\n    this.applyTransform(transformFn);\n    return this;\n  }\n}\n\nexport default Geometry;\n","/**\n * @module ol/geom/GeometryLayout\n */\n\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nexport default {\n  XY: 'XY',\n  XYZ: 'XYZ',\n  XYM: 'XYM',\n  XYZM: 'XYZM',\n};\n","/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../ex
 tent.js';\nimport {rotate, scale, transform2D, translate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nclass SimpleGeometry extends Geometry {\n  constructor() {\n    super();\n\n    /**\n     * @protected\n     * @type {import(\"./GeometryLayout.js\").default}\n     */\n    this.layout = GeometryLayout.XY;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.stride = 2;\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.flatCoordinates = null;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */\n  computeExtent(extent) {\n    return createOrUpdateFromFlatCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      extent\n 
    );\n  }\n\n  /**\n   * @abstract\n   * @return {Array<*>} Coordinates.\n   */\n  getCoordinates() {\n    return abstract();\n  }\n\n  /**\n   * Return the first coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n   * @api\n   */\n  getFirstCoordinate() {\n    return this.flatCoordinates.slice(0, this.stride);\n  }\n\n  /**\n   * @return {Array<number>} Flat coordinates.\n   */\n  getFlatCoordinates() {\n    return this.flatCoordinates;\n  }\n\n  /**\n   * Return the last coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} Last point.\n   * @api\n   */\n  getLastCoordinate() {\n    return this.flatCoordinates.slice(\n      this.flatCoordinates.length - this.stride\n    );\n  }\n\n  /**\n   * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n   * @return {import(\"./GeometryLayout.js\").default} Layout.\n   * @api\n   */\n  getLayout() {\n    return this.layout;\n  }\n\n  /**
 \n   * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    if (this.simplifiedGeometryRevision !== this.getRevision()) {\n      this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n      this.simplifiedGeometryRevision = this.getRevision();\n    }\n    // If squaredTolerance is negative or if we know that simplification will not\n    // have any effect then just return this.\n    if (\n      squaredTolerance < 0 ||\n      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n        squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n    ) {\n      return this;\n    }\n\n    const simplifiedGeometry = this.getSimplifiedGeometryInternal(\n      squaredTolerance\n    );\n    const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n    if (simplifiedFlatCo
 ordinates.length < this.flatCoordinates.length) {\n      return simplifiedGeometry;\n    } else {\n      // Simplification did not actually remove any coordinates.  We now know\n      // that any calls to getSimplifiedGeometry with a squaredTolerance less\n      // than or equal to the current squaredTolerance will also not have any\n      // effect.  This allows us to short circuit simplification (saving CPU\n      // cycles) and prevents the cache of simplified geometries from filling\n      // up with useless identical copies of this geometry (saving memory).\n      this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n      return this;\n    }\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    return this;\n  }\n\n  /**\n   * @return {number} Stride.\n   */\n  getStride() {\n    return this.stride;\n  }\n\n  /**\n
    * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   */\n  setFlatCoordinates(layout, flatCoordinates) {\n    this.stride = getStrideForLayout(layout);\n    this.layout = layout;\n    this.flatCoordinates = flatCoordinates;\n  }\n\n  /**\n   * @abstract\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   */\n  setCoordinates(coordinates, opt_layout) {\n    abstract();\n  }\n\n  /**\n   * @param {import(\"./GeometryLayout.js\").default|undefined} layout Layout.\n   * @param {Array<*>} coordinates Coordinates.\n   * @param {number} nesting Nesting.\n   * @protected\n   */\n  setLayout(layout, coordinates, nesting) {\n    /** @type {number} */\n    let stride;\n    if (layout) {\n      stride = getStrideForLayout(layout);\n    } else {\n      for (let i = 0; i < nesting; ++i) {\n        if (coordinates.length === 0) {\n         
  this.layout = GeometryLayout.XY;\n          this.stride = 2;\n          return;\n        } else {\n          coordinates = /** @type {Array} */ (coordinates[0]);\n        }\n      }\n      stride = coordinates.length;\n      layout = getLayoutForStride(stride);\n    }\n    this.layout = layout;\n    this.stride = stride;\n  }\n\n  /**\n   * Apply a transform function to the coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   * @api\n   */\n  applyTransform(transformFn) {\n    if (this.flatCoordinates) {\n      transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n      this.changed();\n    }\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geomet
 ry\n   * coordinates in place.\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   */\n  rotate(angle, anchor) {\n    const flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      const stride = this.getStride();\n      rotate(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        stride,\n        angle,\n        anchor,\n        flatCoordinates\n      );\n      this.changed();\n    }\n  }\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n   *     of the geometry extent).\n   * @api\n   */\n  scale(sx, opt_sy, opt_
 anchor) {\n    let sy = opt_sy;\n    if (sy === undefined) {\n      sy = sx;\n    }\n    let anchor = opt_anchor;\n    if (!anchor) {\n      anchor = getCenter(this.getExtent());\n    }\n    const flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      const stride = this.getStride();\n      scale(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        stride,\n        sx,\n        sy,\n        anchor,\n        flatCoordinates\n      );\n      this.changed();\n    }\n  }\n\n  /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   */\n  translate(deltaX, deltaY) {\n    const flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      const stride = this.getStride();\n      translate(\n        flatCoordinates,\n        0,\n   
      flatCoordinates.length,\n        stride,\n        deltaX,\n        deltaY,\n        flatCoordinates\n      );\n      this.changed();\n    }\n  }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./GeometryLayout.js\").default} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n  let layout;\n  if (stride == 2) {\n    layout = GeometryLayout.XY;\n  } else if (stride == 3) {\n    layout = GeometryLayout.XYZ;\n  } else if (stride == 4) {\n    layout = GeometryLayout.XYZM;\n  }\n  return /** @type {import(\"./GeometryLayout.js\").default} */ (layout);\n}\n\n/**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n  let stride;\n  if (layout == GeometryLayout.XY) {\n    stride = 2;\n  } else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n    stride = 3;\n  } else if (layout == GeometryLayout.XYZM) {\n    stride = 4;\n  }\n  return /** @type 
 {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n  const flatCoordinates = simpleGeometry.getFlatCoordinates();\n  if (!flatCoordinates) {\n    return null;\n  } else {\n    const stride = simpleGeometry.getStride();\n    return transform2D(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride,\n      transform,\n      opt_dest\n    );\n  }\n}\n\nexport default SimpleGeometry;\n","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport GeometryType from '../
 ../geom/GeometryType.js';\nimport VectorContext from '../VectorContext.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../../transform.js';\nimport {\n  defaultFillStyle,\n  defaultFont,\n  defaultLineCap,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeStyle,\n  defaultTextAlign,\n  defaultTextBaseline,\n} from '../canvas.js';\nimport {equals} from '../../array.js';\nimport {intersects} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorCont
 ext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nclass CanvasImmediateRenderer extends VectorContext {\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../extent.js\").Extent} extent Extent.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {number=} opt_squaredTolerance Optional squared tolerance for simplification.\n   * @param {import(\"../../proj.js\").TransformFunction=} opt_userTransform Transform from user to view projection.\n   */\n  constructor(\n    context,\n    pixelRatio,\n    extent,\n    transform,\n    viewRotation,\n    opt_squaredTolerance,\n    opt_userTransform\n  ) {\n    super();\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.con
 text_ = context;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.extent_ = extent;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.transform_ = transform;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.viewRotation_ = viewRotation;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.squaredTolerance_ = opt_squaredTolerance;\n\n    /**\n     * @private\n     * @type {import(\"../../proj.js\").TransformFunction}\n     */\n    this.userTransform_ = opt_userTransform;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.contextFillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.contextStrokeState_ = null;\n\n    /**\n     * @private\n  
    * @type {?import(\"../canvas.js\").TextState}\n     */\n    this.contextTextState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.fillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.strokeState_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageAnchorX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageAnchorY_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageHeight_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOpacity_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOriginX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOriginY_ = 0;\
 n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.imageRotateWithView_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageRotation_ = 0;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size}\n     */\n    this.imageScale_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageWidth_ = 0;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.textRotateWithView_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textRotation_ = 0;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size}\n     */\n    this.textScale_ = [0, 0];\n\n    /**\n     * @private\n     * @type
  {?import(\"../canvas.js\").FillState}\n     */\n    this.textFillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.textStrokeState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").TextState}\n     */\n    this.textState_ = null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.pixelCoordinates_ = [];\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tmpLocalTransform_ = createTransform();\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   */\n  drawImages_(flatCoordinates, offset, end, stride) {\n    if (!this.image_) {\n      return;\n    }\n    const pixelCoordinates = transform2D(\n      flatCoordinates,\n      offset,\n      end,\n      2,\n      this.trans
 form_,\n      this.pixelCoordinates_\n    );\n    const context = this.context_;\n    const localTransform = this.tmpLocalTransform_;\n    const alpha = context.globalAlpha;\n    if (this.imageOpacity_ != 1) {\n      context.globalAlpha = alpha * this.imageOpacity_;\n    }\n    let rotation = this.imageRotation_;\n    if (this.imageRotateWithView_) {\n      rotation += this.viewRotation_;\n    }\n    for (let i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n      const x = pixelCoordinates[i] - this.imageAnchorX_;\n      const y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n      if (\n        rotation !== 0 ||\n        this.imageScale_[0] != 1 ||\n        this.imageScale_[1] != 1\n      ) {\n        const centerX = x + this.imageAnchorX_;\n        const centerY = y + this.imageAnchorY_;\n        composeTransform(\n          localTransform,\n          centerX,\n          centerY,\n          1,\n          1,\n          rotation,\n          -centerX,\n          -centerY\n   
      );\n        context.setTransform.apply(context, localTransform);\n        context.translate(centerX, centerY);\n        context.scale(this.imageScale_[0], this.imageScale_[1]);\n        context.drawImage(\n          this.image_,\n          this.imageOriginX_,\n          this.imageOriginY_,\n          this.imageWidth_,\n          this.imageHeight_,\n          -this.imageAnchorX_,\n          -this.imageAnchorY_,\n          this.imageWidth_,\n          this.imageHeight_\n        );\n        context.setTransform(1, 0, 0, 1, 0, 0);\n      } else {\n        context.drawImage(\n          this.image_,\n          this.imageOriginX_,\n          this.imageOriginY_,\n          this.imageWidth_,\n          this.imageHeight_,\n          x,\n          y,\n          this.imageWidth_,\n          this.imageHeight_\n        );\n      }\n    }\n    if (this.imageOpacity_ != 1) {\n      context.globalAlpha = alpha;\n    }\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\
 n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   */\n  drawText_(flatCoordinates, offset, end, stride) {\n    if (!this.textState_ || this.text_ === '') {\n      return;\n    }\n    if (this.textFillState_) {\n      this.setContextFillState_(this.textFillState_);\n    }\n    if (this.textStrokeState_) {\n      this.setContextStrokeState_(this.textStrokeState_);\n    }\n    this.setContextTextState_(this.textState_);\n    const pixelCoordinates = transform2D(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      this.transform_,\n      this.pixelCoordinates_\n    );\n    const context = this.context_;\n    let rotation = this.textRotation_;\n    if (this.textRotateWithView_) {\n      rotation += this.viewRotation_;\n    }\n    for (; offset < end; offset += stride) {\n      const x = pixelCoordinates[offset] + this.textOffsetX_;\n      const y = pixelCoordinates[offset + 1] + this.textOffset
 Y_;\n      if (\n        rotation !== 0 ||\n        this.textScale_[0] != 1 ||\n        this.textScale_[1] != 1\n      ) {\n        const localTransform = composeTransform(\n          this.tmpLocalTransform_,\n          x,\n          y,\n          1,\n          1,\n          rotation,\n          -x,\n          -y\n        );\n        context.setTransform.apply(context, localTransform);\n        context.translate(x, y);\n        context.scale(this.textScale_[0], this.textScale_[1]);\n        if (this.textStrokeState_) {\n          context.strokeText(this.text_, 0, 0);\n        }\n        if (this.textFillState_) {\n          context.fillText(this.text_, 0, 0);\n        }\n        context.setTransform(1, 0, 0, 1, 0, 0);\n      } else {\n        if (this.textStrokeState_) {\n          context.strokeText(this.text_, x, y);\n        }\n        if (this.textFillState_) {\n          context.fillText(this.text_, x, y);\n        }\n      }\n    }\n  }\n\n  /**\n   * @param {Array<number>} fl
 atCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {boolean} close Close.\n   * @private\n   * @return {number} end End.\n   */\n  moveToLineTo_(flatCoordinates, offset, end, stride, close) {\n    const context = this.context_;\n    const pixelCoordinates = transform2D(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      this.transform_,\n      this.pixelCoordinates_\n    );\n    context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n    let length = pixelCoordinates.length;\n    if (close) {\n      length -= 2;\n    }\n    for (let i = 2; i < length; i += 2) {\n      context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n    }\n    if (close) {\n      context.closePath();\n    }\n    return end;\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   *
  @param {number} stride Stride.\n   * @private\n   * @return {number} End.\n   */\n  drawRings_(flatCoordinates, offset, ends, stride) {\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      offset = this.moveToLineTo_(\n        flatCoordinates,\n        offset,\n        ends[i],\n        stride,\n        true\n      );\n    }\n    return offset;\n  }\n\n  /**\n   * Render a circle geometry into the canvas.  Rendering is immediate and uses\n   * the current fill and stroke styles.\n   *\n   * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n   * @api\n   */\n  drawCircle(geometry) {\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.fillState_ || this.strokeState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      const pixelCoordinates = transformGeom2D(\n 
        geometry,\n        this.transform_,\n        this.pixelCoordinates_\n      );\n      const dx = pixelCoordinates[2] - pixelCoordinates[0];\n      const dy = pixelCoordinates[3] - pixelCoordinates[1];\n      const radius = Math.sqrt(dx * dx + dy * dy);\n      const context = this.context_;\n      context.beginPath();\n      context.arc(\n        pixelCoordinates[0],\n        pixelCoordinates[1],\n        radius,\n        0,\n        2 * Math.PI\n      );\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      this.drawText_(geometry.getCenter(), 0, 2, 2);\n    }\n  }\n\n  /**\n   * Set the rendering style.  Note that since this is an immediate rendering API,\n   * any `zIndex` on the provided style will be ignored.\n   *\n   * @param {import(\"../../style/Style.js\").default} style The rendering style.\n   * @api\n   */\n  setStyle(style) {\n    this.setFillS
 trokeStyle(style.getFill(), style.getStroke());\n    this.setImageStyle(style.getImage());\n    this.setTextStyle(style.getText());\n  }\n\n  /**\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   */\n  setTransform(transform) {\n    this.transform_ = transform;\n  }\n\n  /**\n   * Render a geometry into the canvas.  Call\n   * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style.\n   *\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n   * @api\n   */\n  drawGeometry(geometry) {\n    const type = geometry.getType();\n    switch (type) {\n      case GeometryType.POINT:\n        this.drawPoint(\n          /** @type {import(\"../../geom/Point.js\").default} */ (geometry)\n        );\n        break;\n      case GeometryType.LINE_STRING:\n        this.drawLineString(\n          /** @type {import(\"../../geom/LineString.js\").default} */ (geometry)\n   
      );\n        break;\n      case GeometryType.POLYGON:\n        this.drawPolygon(\n          /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n        );\n        break;\n      case GeometryType.MULTI_POINT:\n        this.drawMultiPoint(\n          /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry)\n        );\n        break;\n      case GeometryType.MULTI_LINE_STRING:\n        this.drawMultiLineString(\n          /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry)\n        );\n        break;\n      case GeometryType.MULTI_POLYGON:\n        this.drawMultiPolygon(\n          /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry)\n        );\n        break;\n      case GeometryType.GEOMETRY_COLLECTION:\n        this.drawGeometryCollection(\n          /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry)\n        );\n        break;\n      case GeometryType.CIRCLE:\n        this.
 drawCircle(\n          /** @type {import(\"../../geom/Circle.js\").default} */ (geometry)\n        );\n        break;\n      default:\n    }\n  }\n\n  /**\n   * Render a feature into the canvas.  Note that any `zIndex` on the provided\n   * style will be ignored - features are rendered immediately in the order that\n   * this method is called.  If you need `zIndex` support, you should be using an\n   * {@link module:ol/layer/Vector~VectorLayer} instead.\n   *\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {import(\"../../style/Style.js\").default} style Style.\n   * @api\n   */\n  drawFeature(feature, style) {\n    const geometry = style.getGeometryFunction()(feature);\n    if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    this.setStyle(style);\n    this.drawGeometry(geometry);\n  }\n\n  /**\n   * Render a GeometryCollection to the canvas.  Rendering is immediate and\n   * uses the current styles appropr
 iate for each geometry in the collection.\n   *\n   * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n   */\n  drawGeometryCollection(geometry) {\n    const geometries = geometry.getGeometriesArray();\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      this.drawGeometry(geometries[i]);\n    }\n  }\n\n  /**\n   * Render a Point geometry into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n   */\n  drawPoint(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/Point.js\").default} */ (geometry.simplifyTransformed(\n        this.squaredTolerance_,\n        this.userTransform_\n      ));\n    }\n    const flatCoordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    if (this.image_) {\n      this.drawImages_(fla
 tCoordinates, 0, flatCoordinates.length, stride);\n    }\n    if (this.text_ !== '') {\n      this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n  }\n\n  /**\n   * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and\n   * uses the current style.\n   *\n   * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n   */\n  drawMultiPoint(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry.simplifyTransformed(\n        this.squaredTolerance_,\n        this.userTransform_\n      ));\n    }\n    const flatCoordinates = geometry.getFlatCoordinates();\n    const stride = geometry.getStride();\n    if (this.image_) {\n      this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n    if (this.text_ !== '') {\n      this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride
 );\n    }\n  }\n\n  /**\n   * Render a LineString into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n   */\n  drawLineString(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry.simplifyTransformed(\n        this.squaredTolerance_,\n        this.userTransform_\n      ));\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_) {\n      this.setContextStrokeState_(this.strokeState_);\n      const context = this.context_;\n      const flatCoordinates = geometry.getFlatCoordinates();\n      context.beginPath();\n      this.moveToLineTo_(\n        flatCoordinates,\n        0,\n        flatCoordinates.length,\n        geometry.getStride(),\n        false\n      );\n      context.stroke();\n    }\
 n    if (this.text_ !== '') {\n      const flatMidpoint = geometry.getFlatMidpoint();\n      this.drawText_(flatMidpoint, 0, 2, 2);\n    }\n  }\n\n  /**\n   * Render a MultiLineString geometry into the canvas.  Rendering is immediate\n   * and uses the current style.\n   *\n   * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n   */\n  drawMultiLineString(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry.simplifyTransformed(\n        this.squaredTolerance_,\n        this.userTransform_\n      ));\n    }\n    const geometryExtent = geometry.getExtent();\n    if (!intersects(this.extent_, geometryExtent)) {\n      return;\n    }\n    if (this.strokeState_) {\n      this.setContextStrokeState_(this.strokeState_);\n      const context = this.context_;\n      const flatCoordinates = geometry.getFlatCoordinates();\n      
 let offset = 0;\n      const ends = /** @type {Array<number>} */ (geometry.getEnds());\n      const stride = geometry.getStride();\n      context.beginPath();\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        offset = this.moveToLineTo_(\n          flatCoordinates,\n          offset,\n          ends[i],\n          stride,\n          false\n        );\n      }\n      context.stroke();\n    }\n    if (this.text_ !== '') {\n      const flatMidpoints = geometry.getFlatMidpoints();\n      this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n    }\n  }\n\n  /**\n   * Render a Polygon geometry into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n   */\n  drawPolygon(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry.simplifyTransformed(\n      
   this.squaredTolerance_,\n        this.userTransform_\n      ));\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_ || this.fillState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      const context = this.context_;\n      context.beginPath();\n      this.drawRings_(\n        geometry.getOrientedFlatCoordinates(),\n        0,\n        /** @type {Array<number>} */ (geometry.getEnds()),\n        geometry.getStride()\n      );\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      const flatInteriorPoint = geometry.getFlatInteriorPoint();\n      this.drawText_(flatInteriorPoint, 0, 2, 2);\n    }\n  }\n\n  /**\n   * Render MultiPolygon geometry into the ca
 nvas.  Rendering is immediate and\n   * uses the current style.\n   * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n   */\n  drawMultiPolygon(geometry) {\n    if (this.squaredTolerance_) {\n      geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry.simplifyTransformed(\n        this.squaredTolerance_,\n        this.userTransform_\n      ));\n    }\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_ || this.fillState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      const context = this.context_;\n      const flatCoordinates = geometry.getOrientedFlatCoordinates();\n      let offset = 0;\n      const endss = geometry.getEndss();\n      const stride = geometry.getStride();\n      context.beginPath();\n      f
 or (let i = 0, ii = endss.length; i < ii; ++i) {\n        const ends = endss[i];\n        offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n      }\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      const flatInteriorPoints = geometry.getFlatInteriorPoints();\n      this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n   * @private\n   */\n  setContextFillState_(fillState) {\n    const context = this.context_;\n    const contextFillState = this.contextFillState_;\n    if (!contextFillState) {\n      context.fillStyle = fillState.fillStyle;\n      this.contextFillState_ = {\n        fillStyle: fillState.fillStyle,\n      };\n    } else {\n      if (contextFillState.fillStyle != fillState.fillStyle) {\n        contextFillState.fillStyle =
  fillState.fillStyle;\n        context.fillStyle = fillState.fillStyle;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n   * @private\n   */\n  setContextStrokeState_(strokeState) {\n    const context = this.context_;\n    const contextStrokeState = this.contextStrokeState_;\n    if (!contextStrokeState) {\n      context.lineCap = strokeState.lineCap;\n      if (context.setLineDash) {\n        context.setLineDash(strokeState.lineDash);\n        context.lineDashOffset = strokeState.lineDashOffset;\n      }\n      context.lineJoin = strokeState.lineJoin;\n      context.lineWidth = strokeState.lineWidth;\n      context.miterLimit = strokeState.miterLimit;\n      context.strokeStyle = strokeState.strokeStyle;\n      this.contextStrokeState_ = {\n        lineCap: strokeState.lineCap,\n        lineDash: strokeState.lineDash,\n        lineDashOffset: strokeState.lineDashOffset,\n        lineJoin: strokeState.lineJoin,\n        li
 neWidth: strokeState.lineWidth,\n        miterLimit: strokeState.miterLimit,\n        strokeStyle: strokeState.strokeStyle,\n      };\n    } else {\n      if (contextStrokeState.lineCap != strokeState.lineCap) {\n        contextStrokeState.lineCap = strokeState.lineCap;\n        context.lineCap = strokeState.lineCap;\n      }\n      if (context.setLineDash) {\n        if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n          context.setLineDash(\n            (contextStrokeState.lineDash = strokeState.lineDash)\n          );\n        }\n        if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n          contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n          context.lineDashOffset = strokeState.lineDashOffset;\n        }\n      }\n      if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n        contextStrokeState.lineJoin = strokeState.lineJoin;\n        context.lineJoin = strokeState.lineJoin;\n      }\n      if (c
 ontextStrokeState.lineWidth != strokeState.lineWidth) {\n        contextStrokeState.lineWidth = strokeState.lineWidth;\n        context.lineWidth = strokeState.lineWidth;\n      }\n      if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n        contextStrokeState.miterLimit = strokeState.miterLimit;\n        context.miterLimit = strokeState.miterLimit;\n      }\n      if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n        contextStrokeState.strokeStyle = strokeState.strokeStyle;\n        context.strokeStyle = strokeState.strokeStyle;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").TextState} textState Text state.\n   * @private\n   */\n  setContextTextState_(textState) {\n    const context = this.context_;\n    const contextTextState = this.contextTextState_;\n    const textAlign = textState.textAlign\n      ? textState.textAlign\n      : defaultTextAlign;\n    if (!contextTextState) {\n      context.font = textState.font;\n     
  context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n      context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n      this.contextTextState_ = {\n        font: textState.font,\n        textAlign: textAlign,\n        textBaseline: textState.textBaseline,\n      };\n    } else {\n      if (contextTextState.font != textState.font) {\n        contextTextState.font = textState.font;\n        context.font = textState.font;\n      }\n      if (contextTextState.textAlign != textAlign) {\n        contextTextState.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n        context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n      }\n      if (contextTextState.textBaseline != textState.textBaseline) {\n        contextTextState.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n        context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n      }\n    }\n  }\n\n  /**\n   * Set th
 e fill and stroke style for subsequent draw operations.  To clear\n   * either fill or stroke styles, pass null for the appropriate parameter.\n   *\n   * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n   */\n  setFillStrokeStyle(fillStyle, strokeStyle) {\n    if (!fillStyle) {\n      this.fillState_ = null;\n    } else {\n      const fillStyleColor = fillStyle.getColor();\n      this.fillState_ = {\n        fillStyle: asColorLike(\n          fillStyleColor ? fillStyleColor : defaultFillStyle\n        ),\n      };\n    }\n    if (!strokeStyle) {\n      this.strokeState_ = null;\n    } else {\n      const strokeStyleColor = strokeStyle.getColor();\n      const strokeStyleLineCap = strokeStyle.getLineCap();\n      const strokeStyleLineDash = strokeStyle.getLineDash();\n      const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      const strokeStyleLineJoin = str
 okeStyle.getLineJoin();\n      const strokeStyleWidth = strokeStyle.getWidth();\n      const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n      this.strokeState_ = {\n        lineCap:\n          strokeStyleLineCap !== undefined\n            ? strokeStyleLineCap\n            : defaultLineCap,\n        lineDash: strokeStyleLineDash ? strokeStyleLineDash : defaultLineDash,\n        lineDashOffset: strokeStyleLineDashOffset\n          ? strokeStyleLineDashOffset\n          : defaultLineDashOffset,\n        lineJoin:\n          strokeStyleLineJoin !== undefined\n            ? strokeStyleLineJoin\n            : defaultLineJoin,\n        lineWidth:\n          this.pixelRatio_ *\n          (strokeStyleWidth !== undefined\n            ? strokeStyleWidth\n            : defaultLineWidth),\n        miterLimit:\n          strokeStyleMiterLimit !== undefined\n            ? strokeStyleMiterLimit\n            : defaultMiterLimit,\n        strokeStyle: asColorLike(\n          strokeStyleCol
 or ? strokeStyleColor : defaultStrokeStyle\n        ),\n      };\n    }\n  }\n\n  /**\n   * Set the image style for subsequent draw operations.  Pass null to remove\n   * the image style.\n   *\n   * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n   */\n  setImageStyle(imageStyle) {\n    if (!imageStyle) {\n      this.image_ = null;\n    } else {\n      const imageSize = imageStyle.getSize();\n      if (!imageSize) {\n        this.image_ = null;\n      } else {\n        const imageAnchor = imageStyle.getAnchor();\n        // FIXME pixel ratio\n        const imageImage = imageStyle.getImage(1);\n        const imageOrigin = imageStyle.getOrigin();\n        const imageScale = imageStyle.getScaleArray();\n        this.imageAnchorX_ = imageAnchor[0];\n        this.imageAnchorY_ = imageAnchor[1];\n        this.imageHeight_ = imageSize[1];\n        this.image_ = imageImage;\n        this.imageOpacity_ = imageStyle.getOpacity();\n        this.imageOriginX_ = imag
 eOrigin[0];\n        this.imageOriginY_ = imageOrigin[1];\n        this.imageRotateWithView_ = imageStyle.getRotateWithView();\n        this.imageRotation_ = imageStyle.getRotation();\n        this.imageScale_ = [\n          this.pixelRatio_ * imageScale[0],\n          this.pixelRatio_ * imageScale[1],\n        ];\n        this.imageWidth_ = imageSize[0];\n      }\n    }\n  }\n\n  /**\n   * Set the text style for subsequent draw operations.  Pass null to\n   * remove the text style.\n   *\n   * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n   */\n  setTextStyle(textStyle) {\n    if (!textStyle) {\n      this.text_ = '';\n    } else {\n      const textFillStyle = textStyle.getFill();\n      if (!textFillStyle) {\n        this.textFillState_ = null;\n      } else {\n        const textFillStyleColor = textFillStyle.getColor();\n        this.textFillState_ = {\n          fillStyle: asColorLike(\n            textFillStyleColor ? textFillStyleColor : defaultFillS
 tyle\n          ),\n        };\n      }\n      const textStrokeStyle = textStyle.getStroke();\n      if (!textStrokeStyle) {\n        this.textStrokeState_ = null;\n      } else {\n        const textStrokeStyleColor = textStrokeStyle.getColor();\n        const textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n        const textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n        const textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n        const textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n        const textStrokeStyleWidth = textStrokeStyle.getWidth();\n        const textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n        this.textStrokeState_ = {\n          lineCap:\n            textStrokeStyleLineCap !== undefined\n              ? textStrokeStyleLineCap\n              : defaultLineCap,\n          lineDash: textStrokeStyleLineDash\n            ? textStrokeStyleLineDash\n            : defaultLineDash,\n          lineDa
 shOffset: textStrokeStyleLineDashOffset\n            ? textStrokeStyleLineDashOffset\n            : defaultLineDashOffset,\n          lineJoin:\n            textStrokeStyleLineJoin !== undefined\n              ? textStrokeStyleLineJoin\n              : defaultLineJoin,\n          lineWidth:\n            textStrokeStyleWidth !== undefined\n              ? textStrokeStyleWidth\n              : defaultLineWidth,\n          miterLimit:\n            textStrokeStyleMiterLimit !== undefined\n              ? textStrokeStyleMiterLimit\n              : defaultMiterLimit,\n          strokeStyle: asColorLike(\n            textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle\n          ),\n        };\n      }\n      const textFont = textStyle.getFont();\n      const textOffsetX = textStyle.getOffsetX();\n      const textOffsetY = textStyle.getOffsetY();\n      const textRotateWithView = textStyle.getRotateWithView();\n      const textRotation = textStyle.getRotation();\n      const t
 extScale = textStyle.getScaleArray();\n      const textText = textStyle.getText();\n      const textTextAlign = textStyle.getTextAlign();\n      const textTextBaseline = textStyle.getTextBaseline();\n      this.textState_ = {\n        font: textFont !== undefined ? textFont : defaultFont,\n        textAlign:\n          textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n        textBaseline:\n          textTextBaseline !== undefined\n            ? textTextBaseline\n            : defaultTextBaseline,\n      };\n      this.text_ = textText !== undefined ? textText : '';\n      this.textOffsetX_ =\n        textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n      this.textOffsetY_ =\n        textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n      this.textRotateWithView_ =\n        textRotateWithView !== undefined ? textRotateWithView : false;\n      this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n      this.textScale_ = [\n
         this.pixelRatio_ * textScale[0],\n        this.pixelRatio_ * textScale[1],\n      ];\n    }\n  }\n}\n\nexport default CanvasImmediateRenderer;\n","/**\n * @module ol/render/canvas/BuilderType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  CIRCLE: 'Circle',\n  DEFAULT: 'Default',\n  IMAGE: 'Image',\n  LINE_STRING: 'LineString',\n  POLYGON: 'Polygon',\n  TEXT: 'Text',\n};\n","/**\n * @module ol/renderer/vector\n */\nimport BuilderType from '../render/canvas/BuilderType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ImageState from '../ImageState.js';\nimport {getUid} from '../util.js';\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nconst SIMPLIFY_TOLERANCE = 0.5;\n\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n *                function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                         import(\"../s
 tyle/Style.js\").default, Object): void>}\n */\nconst GEOMETRY_RENDERERS = {\n  'Point': renderPointGeometry,\n  'LineString': renderLineStringGeometry,\n  'Polygon': renderPolygonGeometry,\n  'MultiPoint': renderMultiPointGeometry,\n  'MultiLineString': renderMultiLineStringGeometry,\n  'MultiPolygon': renderMultiPolygonGeometry,\n  'GeometryCollection': renderGeometryCollectionGeometry,\n  'Circle': renderCircleGeometry,\n};\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n  return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n  const tolerance = getTolerance(resolution, 
 pixelRatio);\n  return tolerance * tolerance;\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n  return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature) {\n  const fillStyle = style.getFill();\n  const strokeStyle = style.getStroke();\n  if (fillStyle || strokeStyle) {\n    const circleReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.CIRCLE\n    );\n    circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    circleReplay.drawCircle(
 geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n * @return {boolean} `true` if style is loading.\n * @template T\n */\nexport function renderFeature(\n  replayGroup,\n  feature,\n  style,\n  squaredTolerance,\n  listener,\n  opt_tran
 sform\n) {\n  let loading = false;\n  const imageStyle = style.getImage();\n  if (imageStyle) {\n    let imageState = imageStyle.getImageState();\n    if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n      imageStyle.unlistenImageChange(listener);\n    } else {\n      if (imageState == ImageState.IDLE) {\n        imageStyle.load();\n      }\n      imageState = imageStyle.getImageState();\n      imageStyle.listenImageChange(listener);\n      loading = true;\n    }\n  }\n  renderFeatureInternal(\n    replayGroup,\n    feature,\n    style,\n    squaredTolerance,\n    opt_transform\n  );\n\n  return loading;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] 
 Optional transform function.\n */\nfunction renderFeatureInternal(\n  replayGroup,\n  feature,\n  style,\n  squaredTolerance,\n  opt_transform\n) {\n  const geometry = style.getGeometryFunction()(feature);\n  if (!geometry) {\n    return;\n  }\n  const simplifiedGeometry = geometry.simplifyTransformed(\n    squaredTolerance,\n    opt_transform\n  );\n  const renderer = style.getRenderer();\n  if (renderer) {\n    renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n  } else {\n    const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n    geometryRenderer(replayGroup, simplifiedGeometry, style, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.
 \n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n  if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n    const geometries = /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      renderGeometry(replayGroup, geometries[i], style, feature);\n    }\n    return;\n  }\n  const replay = replayGroup.getBuilder(style.getZIndex(), BuilderType.DEFAULT);\n  replay.drawCustom(\n    /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n    feature,\n    style.getRenderer()\n  );\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderGeometryCollectionGeometry(\n  
 replayGroup,\n  geometry,\n  style,\n  feature\n) {\n  const geometries = geometry.getGeometriesArray();\n  let i, ii;\n  for (i = 0, ii = geometries.length; i < ii; ++i) {\n    const geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n    geometryRenderer(replayGroup, geometries[i], style, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderLineStringGeometry(builderGroup, geometry, style, feature) {\n  const strokeStyle = style.getStroke();\n  if (strokeStyle) {\n    const lineStringReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.LINE_STRING\n    );\n    lineStringReplay.setFillStrokeStyle(null, strokeStyle);\
 n    lineStringReplay.drawLineString(geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiLineStringGeometry(builderGroup, geometry, style, feature) {\n  const strokeStyle = style.getStroke();\n  if (strokeStyle) {\n    const lineStringReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.LINE_STRING\n    );\n    lineStringRepl
 ay.setFillStrokeStyle(null, strokeStyle);\n    lineStringReplay.drawMultiLineString(geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderMultiPolygonGeometry(builderGroup, geometry, style, feature) {\n  const fillStyle = style.getFill();\n  const strokeStyle = style.getStroke();\n  if (strokeStyle || fillStyle) {\n    const polygonReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      Builder
 Type.POLYGON\n    );\n    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    polygonReplay.drawMultiPolygon(geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPointGeometry(builderGroup, geometry, style, feature) {\n  const imageStyle = style.getImage();\n  if (imageStyle) {\n    if (imageStyle.getImageState() != ImageState.LOADED) {\n      return;\n   
  }\n    const imageReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.IMAGE\n    );\n    imageReplay.setImageStyle(imageStyle, builderGroup.addDeclutter(false));\n    imageReplay.drawPoint(geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(!!imageStyle));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiPointGeometry(builderGroup, geometry, style, feature) {\n  const imageStyle = styl
 e.getImage();\n  if (imageStyle) {\n    if (imageStyle.getImageState() != ImageState.LOADED) {\n      return;\n    }\n    const imageReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.IMAGE\n    );\n    imageReplay.setImageStyle(imageStyle, builderGroup.addDeclutter(false));\n    imageReplay.drawMultiPoint(geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(!!imageStyle));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature F
 eature.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature) {\n  const fillStyle = style.getFill();\n  const strokeStyle = style.getStroke();\n  if (fillStyle || strokeStyle) {\n    const polygonReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.POLYGON\n    );\n    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    polygonReplay.drawPolygon(geometry, feature);\n  }\n  const textStyle = style.getText();\n  if (textStyle) {\n    const textReplay = builderGroup.getBuilder(\n      style.getZIndex(),\n      BuilderType.TEXT\n    );\n    textReplay.setTextStyle(textStyle, builderGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nclass RenderEvent extends Event {\n  /**\n   * @param {import(\"./EventType.js\").default} type Type.\n   * @param {import(\"../transform.js\").Transform=} opt_inversePixelTransform T
 ransform for\n   *     CSS pixels to rendered pixels.\n   * @param {import(\"../PluggableMap.js\").FrameState=} opt_frameState Frame state.\n   * @param {?CanvasRenderingContext2D=} opt_context Context.\n   */\n  constructor(type, opt_inversePixelTransform, opt_frameState, opt_context) {\n    super(type);\n\n    /**\n     * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n     * to rendered pixels on this event's `context`.\n     * @type {import(\"../transform.js\").Transform|undefined}\n     * @api\n     */\n    this.inversePixelTransform = opt_inversePixelTransform;\n\n    /**\n     * An object representing the current render frame state.\n     * @type {import(\"../PluggableMap.js\").FrameState|undefined}\n     * @api\n     */\n    this.frameState = opt_frameState;\n\n    /**\n     * Canvas context. Not available when the event is dispatched by the map. Only available\n     * when a Canvas renderer is used, null otherwise.\n     * @type {CanvasRende
 ringContext2D|null|undefined}\n     * @api\n     */\n    this.context = opt_context;\n  }\n}\n\nexport default RenderEvent;\n","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n/**\n * @type {number}\n */\nexport const DROP = Infinity;\n\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html\n * and http://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nclass PriorityQueue {\n  /**\n   * @param {function(T): number} priorityFunction Priority function.\n   * @param {function(T): string} keyFunction Key function.\n   */\n  constructor(priorityFunction, keyFunction) {\n    /**\n     * @type {function(T): number}\n     * @private\n     */\n    this.priorityFunction_ = priorityFunction;\n\n    /**\n     
 * @type {function(T): string}\n     * @private\n     */\n    this.keyFunction_ = keyFunction;\n\n    /**\n     * @type {Array<T>}\n     * @private\n     */\n    this.elements_ = [];\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.priorities_ = [];\n\n    /**\n     * @type {!Object<string, boolean>}\n     * @private\n     */\n    this.queuedElements_ = {};\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  clear() {\n    this.elements_.length = 0;\n    this.priorities_.length = 0;\n    clear(this.queuedElements_);\n  }\n\n  /**\n   * Remove and return the highest-priority element. O(log N).\n   * @return {T} Element.\n   */\n  dequeue() {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const element = elements[0];\n    if (elements.length == 1) {\n      elements.length = 0;\n      priorities.length = 0;\n    } else {\n      elements[0] = elements.pop();\n      priorities[0] = priorities.pop();\n      this.
 siftUp_(0);\n    }\n    const elementKey = this.keyFunction_(element);\n    delete this.queuedElements_[elementKey];\n    return element;\n  }\n\n  /**\n   * Enqueue an element. O(log N).\n   * @param {T} element Element.\n   * @return {boolean} The element was added to the queue.\n   */\n  enqueue(element) {\n    assert(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue\n    const priority = this.priorityFunction_(element);\n    if (priority != DROP) {\n      this.elements_.push(element);\n      this.priorities_.push(priority);\n      this.queuedElements_[this.keyFunction_(element)] = true;\n      this.siftDown_(0, this.elements_.length - 1);\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * @return {number} Count.\n   */\n  getCount() {\n    return this.elements_.length;\n  }\n\n  /**\n   * Gets the index of the left child of the node at the given index.\n   * @param {number} index The in
 dex of the node to get the left child for.\n   * @return {number} The index of the left child.\n   * @private\n   */\n  getLeftChildIndex_(index) {\n    return index * 2 + 1;\n  }\n\n  /**\n   * Gets the index of the right child of the node at the given index.\n   * @param {number} index The index of the node to get the right child for.\n   * @return {number} The index of the right child.\n   * @private\n   */\n  getRightChildIndex_(index) {\n    return index * 2 + 2;\n  }\n\n  /**\n   * Gets the index of the parent of the node at the given index.\n   * @param {number} index The index of the node to get the parent for.\n   * @return {number} The index of the parent.\n   * @private\n   */\n  getParentIndex_(index) {\n    return (index - 1) >> 1;\n  }\n\n  /**\n   * Make this a heap. O(N).\n   * @private\n   */\n  heapify_() {\n    let i;\n    for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n      this.siftUp_(i);\n    }\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */
 \n  isEmpty() {\n    return this.elements_.length === 0;\n  }\n\n  /**\n   * @param {string} key Key.\n   * @return {boolean} Is key queued.\n   */\n  isKeyQueued(key) {\n    return key in this.queuedElements_;\n  }\n\n  /**\n   * @param {T} element Element.\n   * @return {boolean} Is queued.\n   */\n  isQueued(element) {\n    return this.isKeyQueued(this.keyFunction_(element));\n  }\n\n  /**\n   * @param {number} index The index of the node to move down.\n   * @private\n   */\n  siftUp_(index) {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const count = elements.length;\n    const element = elements[index];\n    const priority = priorities[index];\n    const startIndex = index;\n\n    while (index < count >> 1) {\n      const lIndex = this.getLeftChildIndex_(index);\n      const rIndex = this.getRightChildIndex_(index);\n\n      const smallerChildIndex =\n        rIndex < count && priorities[rIndex] < priorities[lIndex]\n          ? rIndex\n 
          : lIndex;\n\n      elements[index] = elements[smallerChildIndex];\n      priorities[index] = priorities[smallerChildIndex];\n      index = smallerChildIndex;\n    }\n\n    elements[index] = element;\n    priorities[index] = priority;\n    this.siftDown_(startIndex, index);\n  }\n\n  /**\n   * @param {number} startIndex The index of the root.\n   * @param {number} index The index of the node to move up.\n   * @private\n   */\n  siftDown_(startIndex, index) {\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    const element = elements[index];\n    const priority = priorities[index];\n\n    while (index > startIndex) {\n      const parentIndex = this.getParentIndex_(index);\n      if (priorities[parentIndex] > priority) {\n        elements[index] = elements[parentIndex];\n        priorities[index] = priorities[parentIndex];\n        index = parentIndex;\n      } else {\n        break;\n      }\n    }\n    elements[index] = element;\n    priorit
 ies[index] = priority;\n  }\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  reprioritize() {\n    const priorityFunction = this.priorityFunction_;\n    const elements = this.elements_;\n    const priorities = this.priorities_;\n    let index = 0;\n    const n = elements.length;\n    let element, i, priority;\n    for (i = 0; i < n; ++i) {\n      element = elements[i];\n      priority = priorityFunction(element);\n      if (priority == DROP) {\n        delete this.queuedElements_[this.keyFunction_(element)];\n      } else {\n        priorities[index] = priority;\n        elements[index++] = element;\n      }\n    }\n    elements.length = index;\n    priorities.length = index;\n    this.heapify_();\n  }\n}\n\nexport default PriorityQueue;\n","/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  IDLE: 0,\n  LOADING: 1,\n  LOADED: 2,\n  /**\n   * Indicates that tile loading failed\n   * @type {number}\n   */\n  ERROR: 3,\n  EMPTY: 4,\n};\n","/
 **\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  ANIMATING: 0,\n  INTERACTING: 1,\n};\n","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(\n  flatCoordinates,\n  offset1,\n  offset2,\n  stride,\n  x,\n  y,\n  closestPoint\n) {\n  const x1 = flatCoordinates[offset1];\n  const y1 = flatCoordinates[offset1 + 1];\n  const dx = flatCoordinates[offset2] - x1;\n  const dy = flatCoordinates[offset2 + 1] -
  y1;\n  let offset;\n  if (dx === 0 && dy === 0) {\n    offset = offset1;\n  } else {\n    const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      offset = offset2;\n    } else if (t > 0) {\n      for (let i = 0; i < stride; ++i) {\n        closestPoint[i] = lerp(\n          flatCoordinates[offset1 + i],\n          flatCoordinates[offset2 + i],\n          t\n        );\n      }\n      closestPoint.length = stride;\n      return;\n    } else {\n      offset = offset1;\n    }\n  }\n  for (let i = 0; i < stride; ++i) {\n    closestPoint[i] = flatCoordinates[offset + i];\n  }\n  closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n 
 */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  for (offset += stride; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    const squaredDelta = squaredDx(x1, y1, x2, y2);\n    if (squaredDelta > max) {\n      max = squaredDelta;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  max\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n    off
 set = end;\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  max\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n    offset = ends[ends.length - 1];\n  }\n  return max;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {num
 ber} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  maxDelta,\n  isRing,\n  x,\n  y,\n  closestPoint,\n  minSquaredDistance,\n  opt_tmpPoint\n) {\n  if (offset == end) {\n    return minSquaredDistance;\n  }\n  let i, squaredDistance;\n  if (maxDelta === 0) {\n    // All points are identical, so just test the first point.\n    squaredDistance = squaredDx(\n      x,\n      y,\n      flatCoordinates[offset],\n      flatCoordinates[offset + 1]\n    );\n    if (squaredDistance < minSquaredDistance) {\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[offset + i];\n      }\n      closestPoint.length = stride;\n      return squaredDistance;\n    } else {\n      return minSquaredDistance;\n    }\n  }\n  const tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN]
 ;\n  let index = offset + stride;\n  while (index < end) {\n    assignClosest(\n      flatCoordinates,\n      index - stride,\n      index,\n      stride,\n      x,\n      y,\n      tmpPoint\n    );\n    squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n    if (squaredDistance < minSquaredDistance) {\n      minSquaredDistance = squaredDistance;\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = tmpPoint[i];\n      }\n      closestPoint.length = stride;\n      index += stride;\n    } else {\n      // Skip ahead multiple points, because we know that all the skipped\n      // points cannot be any closer than the closest point we have found so\n      // far.  We know this because we know how close the current point is, how\n      // close the closest point we have found so far is, and the maximum\n      // distance between consecutive points.  For example, if we're currently\n      // at distance 10, the best we've found so far is 3, and that the maximum\n     
  // distance between consecutive points is 2, then we'll need to skip at\n      // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n      // finding a closer point.  We use Math.max(..., 1) to ensure that we\n      // always advance at least one point, to avoid an infinite loop.\n      index +=\n        stride *\n        Math.max(\n          ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n            maxDelta) |\n            0,\n          1\n        );\n    }\n  }\n  if (isRing) {\n    // Check the closing segment.\n    assignClosest(\n      flatCoordinates,\n      end - stride,\n      offset,\n      stride,\n      x,\n      y,\n      tmpPoint\n    );\n    squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n    if (squaredDistance < minSquaredDistance) {\n      minSquaredDistance = squaredDistance;\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = tmpPoint[i];\n      }\n      closestPoint.length = stride;\n    }\n  }\n  r
 eturn minSquaredDistance;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  maxDelta,\n  isRing,\n  x,\n  y,\n  closestPoint,\n  minSquaredDistance,\n  opt_tmpPoint\n) {\n  const tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    minSquaredDistance = assignClosestPoint(\n      flatCoordinates,\n      offset,\n      end,\n
       stride,\n      maxDelta,\n      isRing,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n      tmpPoint\n    );\n    offset = end;\n  }\n  return minSquaredDistance;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  maxDelta,\n  isRing,\n  x,\n  y,\n  closestPoint,\n  minSquaredDistance,\n  opt_tmpPoint\n) {\n  const tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, N
 aN];\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    minSquaredDistance = assignClosestArrayPoint(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      maxDelta,\n      isRing,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance,\n      tmpPoint\n    );\n    offset = ends[ends.length - 1];\n  }\n  return minSquaredDistance;\n}\n","/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n  for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n    flatCoordinates[offset++] = coordinate[i];\n  }\n  return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @par
 am {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n  flatCoordinates,\n  offset,\n  coordinates,\n  stride\n) {\n  for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n    const coordinate = coordinates[i];\n    for (let j = 0; j < stride; ++j) {\n      flatCoordinates[offset++] = coordinate[j];\n    }\n  }\n  return offset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_ends Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(\n  flatCoordinates,\n  offset,\n  coordinatess,\n  stride,\n  opt_ends\n) {\n  const ends = opt_ends ? opt_ends : [];\n  let i
  = 0;\n  for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n    const end = deflateCoordinates(\n      flatCoordinates,\n      offset,\n      coordinatess[j],\n      stride\n    );\n    ends[i++] = end;\n    offset = end;\n  }\n  ends.length = i;\n  return ends;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>=} opt_endss Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n  flatCoordinates,\n  offset,\n  coordinatesss,\n  stride,\n  opt_endss\n) {\n  const endss = opt_endss ? opt_endss : [];\n  let i = 0;\n  for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n    const ends = deflateCoordinatesArray(\n      flatCoordinates,\n      offset,\n      coordinatesss[j],\n      stride,\n      endss[i
 ]\n    );\n    endss[i++] = ends;\n    offset = ends[ends.length - 1];\n  }\n  endss.length = i;\n  return endss;\n}\n","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
 THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * 
 @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  highQuality,\n  opt_simplifiedFlatCoordinates\n) {\n  const simplifiedFlatCoordinates =\n    opt_simplifiedFlatCoordinates !== undefined\n      ? opt_simplifiedFlatCoordinates\n      : [];\n  if (!highQuality) {\n    end = radialDistance(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0\n    );\n    flatCoordinates = simplifiedFlatCoordinates;\n    offset = 0;\n    stride = 2;\n  }\n  simplifiedFlatCoordinates.length = douglasPeucker(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    squaredTolerance,\n    simplifiedFlatCoordinates,\n    0\n  );\n  return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array<number>} flatCoordinate
 s Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset\n) {\n  const n = (end - offset) / stride;\n  if (n < 3) {\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  /** @type {Array<number>} */\n  const markers = new Array(n);\n  markers[0] = 1;\n  markers[n - 1] = 1;\n  /** @type {Array<number>} */\n  const stack = [
 offset, end - stride];\n  let index = 0;\n  while (stack.length > 0) {\n    const last = stack.pop();\n    const first = stack.pop();\n    let maxSquaredDistance = 0;\n    const x1 = flatCoordinates[first];\n    const y1 = flatCoordinates[first + 1];\n    const x2 = flatCoordinates[last];\n    const y2 = flatCoordinates[last + 1];\n    for (let i = first + stride; i < last; i += stride) {\n      const x = flatCoordinates[i];\n      const y = flatCoordinates[i + 1];\n      const squaredDistance = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n      if (squaredDistance > maxSquaredDistance) {\n        index = i;\n        maxSquaredDistance = squaredDistance;\n      }\n    }\n    if (maxSquaredDistance > squaredTolerance) {\n      markers[(index - offset) / stride] = 1;\n      if (first + stride < index) {\n        stack.push(first, index);\n      }\n      if (index + stride < last) {\n        stack.push(index, last);\n      }\n    }\n  }\n  for (let i = 0; i < n; ++i) {\n    if (marke
 rs[i]) {\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + i * stride];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + i * stride + 1];\n    }\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEnds\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = en
 ds[i];\n    simplifiedOffset = douglasPeucker(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset\n    );\n    simplifiedEnds.push(simplifiedOffset);\n    offset = end;\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEndss\n) {\n  
 for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    const simplifiedEnds = [];\n    simplifiedOffset = douglasPeuckerArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n      simplifiedEnds\n    );\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  squaredTolerance,\n  simplifiedFlatCoordinate
 s,\n  simplifiedOffset\n) {\n  if (end <= offset + stride) {\n    // zero or one point, no simplification possible, so copy and return\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n        flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  // copy first point\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n  let x2 = x1;\n  let y2 = y1;\n  for (offset += stride; offset < end; offset += stride) {\n    x2 = flatCoordinates[offset];\n    y2 = flatCoordinates[offset + 1];\n    if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n      // copy point at offset\n      simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n      simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n      x1 = 
 x2;\n      y1 = y2;\n    }\n  }\n  if (x2 != x1 || y2 != y1) {\n    // copy last point\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n  return tolerance * Math.round(value / tolerance);\n}\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded.  This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string.  This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons.  This implementation uses a single\n
  * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset\n) {\n  // do nothing if the line is empty\n  if (offset == end) {\n    return simplifiedOffset;\n  }\n  // snap the first coordinate (P1)\n  let x1 = snap(flatCoordinates[offset], tolerance);\n  let y1 = snap(flatCoordinates[offset + 1], tolerance);\n  offset += stride;\n  // add the first coordinate to the output\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  simplifiedFlat
 Coordinates[simplifiedOffset++] = y1;\n  // find the next coordinate that does not snap to the same value as the first\n  // coordinate (P2)\n  let x2, y2;\n  do {\n    x2 = snap(flatCoordinates[offset], tolerance);\n    y2 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    if (offset == end) {\n      // all coordinates snap to the same value, the line collapses to a point\n      // push the last snapped value anyway to ensure that the output contains\n      // at least two points\n      // FIXME should we really return at least two points anyway?\n      simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n      simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n      return simplifiedOffset;\n    }\n  } while (x2 == x1 && y2 == y1);\n  while (offset < end) {\n    // snap the next coordinate (P3)\n    const x3 = snap(flatCoordinates[offset], tolerance);\n    const y3 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    // skip P3 if 
 it is equal to P2\n    if (x3 == x2 && y3 == y2) {\n      continue;\n    }\n    // calculate the delta between P1 and P2\n    const dx1 = x2 - x1;\n    const dy1 = y2 - y1;\n    // calculate the delta between P3 and P1\n    const dx2 = x3 - x1;\n    const dy2 = y3 - y1;\n    // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n    // P1 in the same direction then P2 is on the straight line between P1 and\n    // P3\n    if (\n      dx1 * dy2 == dy1 * dx2 &&\n      ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n      ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))\n    ) {\n      // discard P2 and set P2 = P3\n      x2 = x3;\n      y2 = y3;\n      continue;\n    }\n    // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n    // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n    // and continue with P1 = P2 and P2 = P3\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n 
    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    x1 = x2;\n    y1 = y2;\n    x2 = x3;\n    y2 = y3;\n  }\n  // add the last point (P2)\n  simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEnds\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = end
 s[i];\n    simplifiedOffset = quantize(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      tolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset\n    );\n    simplifiedEnds.push(simplifiedOffset);\n    offset = end;\n  }\n  return simplifiedOffset;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  tolerance,\n  simplifiedFlatCoordinates,\n  simplifiedOffset,\n  simplifiedEndss\n) {\n  for (let i = 0, ii = endss.length; i < ii;
  ++i) {\n    const ends = endss[i];\n    const simplifiedEnds = [];\n    simplifiedOffset = quantizeArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      tolerance,\n      simplifiedFlatCoordinates,\n      simplifiedOffset,\n      simplifiedEnds\n    );\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n","/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>=} opt_coordinates Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  opt_coordinates\n) {\n  const coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n  let i = 0;\n  for (le
 t j = offset; j < end; j += stride) {\n    coordinates[i++] = flatCoordinates.slice(j, j + stride);\n  }\n  coordinates.length = i;\n  return coordinates;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>=} opt_coordinatess Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  opt_coordinatess\n) {\n  const coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n  let i = 0;\n  for (let j = 0, jj = ends.length; j < jj; ++j) {\n    const end = ends[j];\n    coordinatess[i++] = inflateCoordinates(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      coordinatess[i]\n    );\n    offset = end;\n  }\n  coordinatess
 .length = i;\n  return coordinatess;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>=} opt_coordinatesss\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  opt_coordinatesss\n) {\n  const coordinatesss =\n    opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n  let i = 0;\n  for (let j = 0, jj = endss.length; j < jj; ++j) {\n    const ends = endss[j];\n    coordinatesss[i++] = inflateCoordinatesArray(\n      flatCoordinates,\n      offset,\n      ends,\n      stride,\n      coordinatesss[i]\n    );\n    offset = ends[ends.length - 1];\n  }\n  coordinatesss.length = i;\n  return coordinatesss;\n
 }\n","/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n  let twiceArea = 0;\n  let x1 = flatCoordinates[end - stride];\n  let y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    const x2 = flatCoordinates[offset];\n    const y2 = flatCoordinates[offset + 1];\n    twiceArea += y1 * x2 - x1 * y2;\n    x1 = x2;\n    y1 = y2;\n  }\n  return twiceArea / 2;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n  let area = 0;\n  for (let i = 0, ii = ends.length; i < ii; ++i) 
 {\n    const end = ends[i];\n    area += linearRing(flatCoordinates, offset, end, stride);\n    offset = end;\n  }\n  return area;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  let area = 0;\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    area += linearRings(flatCoordinates, offset, ends, stride);\n    offset = ends[ends.length - 1];\n  }\n  return area;\n}\n","/**\n * @module ol/geom/LinearRing\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} 
 from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   */\n  constructor(coordinates, opt_layout) {\n    super();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(\
 n        opt_layout,\n        /** @type {Array<number>} */ (coordinates)\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates),\n        opt_layout\n      );\n    }\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!LinearRing} Clone.\n   * @api\n   */\n  clone() {\n    return new LinearRing(this.flatCoordinates.slice(), this.layout);\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n    
     maxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.flatCoordinates.length,\n          this.stride,\n          0\n        )\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance\n    );\n  }\n\n  /**\n   * Return the area of the linear ring on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingArea(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride\n    );\n  }\n\n  /**\n   * Return the coordinates of the linear ring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   */\n  getCoordinates() {\n    return inflateCoordinates(\n      this.flatCoordinates,\n     
  0,\n      this.flatCoordinates.length,\n      this.stride\n    );\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {LinearRing} Simplified LinearRing.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    const simplifiedFlatCoordinates = [];\n    simplifiedFlatCoordinates.length = douglasPeucker(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0\n    );\n    return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.LINEAR_RING;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the exten
 t intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    return false;\n  }\n\n  /**\n   * Set the coordinates of the linear ring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride\n    );\n    this.changed();\n  }\n}\n\nexport default LinearRing;\n","/**\n * @module ol/geom/Point\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from 
 '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends SimpleGeometry {\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   */\n  constructor(coordinates, opt_layout) {\n    super();\n    this.setCoordinates(coordinates, opt_layout);\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Point} Clone.\n   * @api\n   */\n  clone() {\n    const point = new Point(this.flatCoordinates.slice(), this.layout);\n    return point;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    const flatCoordinates = this.flatCoordinates;\n    const sq
 uaredDistance = squaredDx(\n      x,\n      y,\n      flatCoordinates[0],\n      flatCoordinates[1]\n    );\n    if (squaredDistance < minSquaredDistance) {\n      const stride = this.stride;\n      for (let i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[i];\n      }\n      closestPoint.length = stride;\n      return squaredDistance;\n    } else {\n      return minSquaredDistance;\n    }\n  }\n\n  /**\n   * Return the coordinate of the point.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n   * @api\n   */\n  getCoordinates() {\n    return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */\n  computeExtent(extent) {\n    return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryT
 ype.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.POINT;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n  }\n\n  /**\n   * @param {!Array<*>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 0);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinate(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride\n    );\n    this.changed();\n  }\n}\n\nexport default Point;\n","/**\n * @module ol/geom/flat/segmen
 ts\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n  const point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n  const point2 = [];\n  let ret;\n  for (; offset + stride < end; offset += stride) {\n    point2[0] = flatCoordinates[offset + stride];\n    point2[1] = flatCoordinates[offset + stride + 1];\n    ret = callback(point1, point2);\n    if (ret
 ) {\n      return ret;\n    }\n    point1[0] = point2[0];\n    point1[1] = point2[1];\n  }\n  return false;\n}\n","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {\n  containsExtent,\n  createEmpty,\n  extendFlatCoordinates,\n  intersects,\n  intersectsSegment,\n} from '../../extent.js';\nimport {forEach as forEachSegment} from './segments.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent\n) {\n  const coordinatesExtent = extendFlatCoordinates(\n    createEmpty(),\n    flatCoordinates,\n    offset,\n    end,\n    stride\n  );\n  if (!intersec
 ts(extent, coordinatesExtent)) {\n    return false;\n  }\n  if (containsExtent(extent, coordinatesExtent)) {\n    return true;\n  }\n  if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n    return true;\n  }\n  if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n    return true;\n  }\n  return forEachSegment(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n     * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function (point1, point2) {\n      return intersectsSegment(extent, point1, point2);\n    }\n  );\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param
  {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  extent\n) {\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    if (\n      intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n    ) {\n      return true;\n    }\n    offset = ends[i];\n  }\n  return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  extent\n) {\n  if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n    return true;\n  }\n  if (\n    linearRingConta
 insXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[0],\n      extent[1]\n    )\n  ) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[0],\n      extent[3]\n    )\n  ) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[2],\n      extent[1]\n    )\n  ) {\n    return true;\n  }\n  if (\n    linearRingContainsXY(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      extent[2],\n      extent[3]\n    )\n  ) {\n    return true;\n  }\n  return false;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\
 nexport function intersectsLinearRingArray(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  extent\n) {\n  if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n    return false;\n  }\n  if (ends.length === 1) {\n    return true;\n  }\n  for (let i = 1, ii = ends.length; i < ii; ++i) {\n    if (\n      linearRingContainsExtent(\n        flatCoordinates,\n        ends[i - 1],\n        ends[i],\n        stride,\n        extent\n      )\n    ) {\n      if (\n        !intersectsLineString(\n          flatCoordinates,\n          ends[i - 1],\n          ends[i],\n          stride,\n          extent\n        )\n      ) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if th
 e geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  extent\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (\n      intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)\n    ) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n","/**\n * @module ol/geom/flat/reverse\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n  while (offset < end - stride) {\n    for (let i = 0; i < stride; ++i) {\n      const tmp = flatCoordinates[offset + i];\n      flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n      flatCoordinates[end - stride + i] = tmp;\n    }\n    offset += stride;\n    end -
 = stride;\n  }\n}\n","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n  // https://stackoverflow.com/a/1180256/2389327\n  // https://en.wikipedia.org/wiki/Curve_orientation#Orientation_of_a_simple_polygon\n\n  let firstVertexRepeated = true;\n  for (let i = 0; i < stride; ++i) {\n    if (flatCoordinates[offset + i] !== flatCoordinates[end - stride + i]) {\n      firstVertexRepeated = false;\n      break;\n  
   }\n  }\n  if (firstVertexRepeated) {\n    end -= stride;\n  }\n  const iMinVertex = findCornerVertex(flatCoordinates, offset, end, stride);\n  // Orientation matrix:\n  //     [ 1  xa  ya ]\n  // O = | 1  xb  yb |\n  //     [ 1  xc  yc ]\n  let iPreviousVertex = iMinVertex - stride;\n  if (iPreviousVertex < offset) {\n    iPreviousVertex = end - stride;\n  }\n  let iNextVertex = iMinVertex + stride;\n  if (iNextVertex >= end) {\n    iNextVertex = offset;\n  }\n  const aX = flatCoordinates[iPreviousVertex];\n  const aY = flatCoordinates[iPreviousVertex + 1];\n  const bX = flatCoordinates[iMinVertex];\n  const bY = flatCoordinates[iMinVertex + 1];\n  const cX = flatCoordinates[iNextVertex];\n  const cY = flatCoordinates[iNextVertex + 1];\n  const determinant =\n    bX * cY + aX * bY + aY * cX - (aY * bX + bY * cX + aX * cY);\n\n  return determinant < 0;\n}\n\n// Find vertex along one edge of bounding box.\n// In this case, we find smallest y; in case of tie also smallest x.\nfunctio
 n findCornerVertex(flatCoordinates, offset, end, stride) {\n  let iMinVertex = -1;\n  let minY = Infinity;\n  let minXAtMinY = Infinity;\n  for (let i = offset; i < end; i += stride) {\n    const x = flatCoordinates[i];\n    const y = flatCoordinates[i + 1];\n    if (y > minY) {\n      continue;\n    }\n    if (y == minY) {\n      if (x >= minXAtMinY) {\n        continue;\n      }\n    }\n\n    // Minimum so far.\n    iMinVertex = i;\n    minY = y;\n    minXAtMinY = x;\n  }\n\n  return iMinVertex;\n}\n\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\
 n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  opt_right\n) {\n  const right = opt_right !== undefined ? opt_right : false;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    const isClockwise = linearRingIsClockwise(\n      flatCoordinates,\n      offset,\n      end,\n      stride\n    );\n    if (i === 0) {\n      if ((right && isClockwise) || (!right && !isClockwise)) {\n        return false;\n      }\n    } else {\n      if ((right && !isClockwise) || (!right && isClockwise)) {\n        return false;\n      }\n    }\n    offset = end;\n  }\n  return true;\n}\n\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `op
 t_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  opt_right\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    const ends = endss[i];\n    if (\n      !linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)\n    ) {\n      return false;\n    }\n    if (ends.length) {\n      offset = ends[ends.length - 1];\n    }\n  }\n  return true;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * coun
 ter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(\n  flatCoordinates,\n  offset,\n  ends,\n  stride,\n  opt_right\n) {\n  const right = opt_right !== undefined ? opt_right : false;\n  for (let i = 0, ii = ends.length; i < ii; ++i) {\n    const end = ends[i];\n    const isClockwise = linearRingIsClockwise(\n      flatCoordinates,\n      offset,\n      end,\n      stride\n    );\n    const reverse =\n      i === 0\n        ? (right && isClockwise) || (!right && !isClockwise)\n        : (right && !isClockwise) || (!right && isClockwise);\n    if (reverse) {\n      reverseCoordinates(flatCoordinates, offset, end, 
 stride);\n    }\n    offset = end;\n  }\n  return offset;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(\n  flatCoordinates,\n  offset,\n  endss,\n  stride,\n  opt_right\n) {\n  for (let i = 0, ii = endss.length; i < ii; ++i) {\n    offset = orientLinearRings(\n      flatCoordinates,\n      offset,\n      endss[i],\n      stride,\n      opt_right\n    );\n  }\n  return offset;\n}\n","/**\n * @module ol/geo
 m/Polygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {closestSquaredDistanceXY, getCenter} from '../extent.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRings} from './flat/orient.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {modulo} from '../math.js';\nimport {quantizeArray} from './flat/simplify.js';\nimport {offset as sphereOf
 fset} from '../sphere.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n  /**\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n   *     Array of linear rings that define the polygon. The first linear ring of the\n   *     array defines the outer-boundary or surface of the polygon. Each subsequent\n   *     linear ring defines a hole in the surface of the polygon. A linear ring is\n   *     an array of vertices' coordinates where the first coordinate and the last are\n   *     equivalent. (For internal use, flat coordinates in combination with\n   *     `opt_layout` and `opt_ends` are also accepted.)\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).\n   */\n  constructor(coordinates, opt_layout, opt_ends) {\n    super();\n\n    /**\n     * @type {Array<number>}\n     * 
 @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.flatInteriorPoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (opt_layout !== undefined && opt_ends) {\n      this.setFlatCoordinates(\n        opt_layout,\n        /** @type {Array<number>} */ (coordinates)\n      );\n      this.ends_ = opt_ends;\n    } else {\n      this.setCoordinates(\n        /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates),\n        
 opt_layout\n      );\n    }\n  }\n\n  /**\n   * Append the passed linear ring to this polygon.\n   * @param {LinearRing} linearRing Linear ring.\n   * @api\n   */\n  appendLinearRing(linearRing) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n    }\n    this.ends_.push(this.flatCoordinates.length);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Polygon} Clone.\n   * @api\n   */\n  clone() {\n    return new Polygon(\n      this.flatCoordinates.slice(),\n      this.layout,\n      this.ends_.slice()\n    );\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, 
 y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        arrayMaxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.ends_,\n          this.stride,\n          0\n        )\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestArrayPoint(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance\n    );\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */\n  containsXY(x, y) {\n    return linearRingsContainsXY(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride,\n      x,\n      y\n    );\n  }\n\n
   /**\n   * Return the area of the polygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingsArea(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride\n    );\n  }\n\n  /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for polygons.\n   *\n   * @param {boolean=} opt_right Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @api\n   */\n  getCoordinates(opt_right) {\n    let flatCo
 ordinates;\n    if (opt_right !== undefined) {\n      flatCoordinates = this.getOrientedFlatCoordinates().slice();\n      orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);\n    } else {\n      flatCoordinates = this.flatCoordinates;\n    }\n\n    return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n  }\n\n  /**\n   * @return {Array<number>} Ends.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n\n  /**\n   * @return {Array<number>} Interior point.\n   */\n  getFlatInteriorPoint() {\n    if (this.flatInteriorPointRevision_ != this.getRevision()) {\n      const flatCenter = getCenter(this.getExtent());\n      this.flatInteriorPoint_ = getInteriorPointOfArray(\n        this.getOrientedFlatCoordinates(),\n        0,\n        this.ends_,\n        this.stride,\n        flatCenter,\n        0\n      );\n      this.flatInteriorPointRevision_ = this.getRevision();\n    }\n    return this.flatInteriorPoint_;\n  }\n\n  /**\n   * Return an in
 terior point of the polygon.\n   * @return {Point} Interior point as XYM coordinate, where M is the\n   * length of the horizontal intersection that the point belongs to.\n   * @api\n   */\n  getInteriorPoint() {\n    return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n  }\n\n  /**\n   * Return the number of rings of the polygon,  this includes the exterior\n   * ring and any interior rings.\n   *\n   * @return {number} Number of rings.\n   * @api\n   */\n  getLinearRingCount() {\n    return this.ends_.length;\n  }\n\n  /**\n   * Return the Nth linear ring of the polygon geometry. Return `null` if the\n   * given index is out of range.\n   * The exterior linear ring is available at index `0` and the interior rings\n   * at index `1` and beyond.\n   *\n   * @param {number} index Index.\n   * @return {LinearRing} Linear ring.\n   * @api\n   */\n  getLinearRing(index) {\n    if (index < 0 || this.ends_.length <= index) {\n      return null;\n    }\n    return new Linear
 Ring(\n      this.flatCoordinates.slice(\n        index === 0 ? 0 : this.ends_[index - 1],\n        this.ends_[index]\n      ),\n      this.layout\n    );\n  }\n\n  /**\n   * Return the linear rings of the polygon.\n   * @return {Array<LinearRing>} Linear rings.\n   * @api\n   */\n  getLinearRings() {\n    const layout = this.layout;\n    const flatCoordinates = this.flatCoordinates;\n    const ends = this.ends_;\n    const linearRings = [];\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const linearRing = new LinearRing(\n        flatCoordinates.slice(offset, end),\n        layout\n      );\n      linearRings.push(linearRing);\n      offset = end;\n    }\n    return linearRings;\n  }\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    if (this.orientedRevision_ != this.getRevision()) {\n      const flatCoordinates = this.flatCoordinates;\n      if (linearRingsA
 reOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n        this.orientedFlatCoordinates_ = flatCoordinates;\n      } else {\n        this.orientedFlatCoordinates_ = flatCoordinates.slice();\n        this.orientedFlatCoordinates_.length = orientLinearRings(\n          this.orientedFlatCoordinates_,\n          0,\n          this.ends_,\n          this.stride\n        );\n      }\n      this.orientedRevision_ = this.getRevision();\n    }\n    return this.orientedFlatCoordinates_;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Polygon} Simplified Polygon.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    const simplifiedFlatCoordinates = [];\n    const simplifiedEnds = [];\n    simplifiedFlatCoordinates.length = quantizeArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      Math.sqrt(squaredTolerance),\n      simplifiedFlatCoordinates,\n      0,\n      simplifiedEnds\n  
   );\n    return new Polygon(\n      simplifiedFlatCoordinates,\n      GeometryLayout.XY,\n      simplifiedEnds\n    );\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.POLYGON;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    return intersectsLinearRingArray(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.ends_,\n      this.stride,\n      extent\n    );\n  }\n\n  /**\n   * Set the coordinates of the polygon.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_la
 yout) {\n    this.setLayout(opt_layout, coordinates, 2);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    const ends = deflateCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n      this.ends_\n    );\n    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n    this.changed();\n  }\n}\n\nexport default Polygon;\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n *     the polygon vertices.\n * @param {number=} opt_n Optional number of vertices for the resulting\n *     polygon. Default is `32`.\n * @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to\n *     the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n 
 */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n  const n = opt_n ? opt_n : 32;\n  /** @type {Array<number>} */\n  const flatCoordinates = [];\n  for (let i = 0; i < n; ++i) {\n    extend(\n      flatCoordinates,\n      sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius)\n    );\n  }\n  flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n  return new Polygon(flatCoordinates, GeometryLayout.XY, [\n    flatCoordinates.length,\n  ]);\n}\n\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n  const minX = extent[0];\n  const minY = extent[1];\n  const maxX = extent[2];\n  const maxY = extent[3];\n  const flatCoordinates = [\n    minX,\n    minY,\n    minX,\n    maxY,\n    maxX,\n    maxY,\n    maxX,\n    minY,\n    minX,\n    minY,\n  ];\n  return new Polygon(flatCoordi
 nates, GeometryLayout.XY, [\n    flatCoordinates.length,\n  ]);\n}\n\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number=} opt_sides Number of sides of the polygon. Default is 32.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n  const sides = opt_sides ? opt_sides : 32;\n  const stride = circle.getStride();\n  const layout = circle.getLayout();\n  const center = circle.getCenter();\n  const arrayLength = stride * (sides + 1);\n  const flatCoordinates = new Array(arrayLength);\n  for (let i = 0; i < arrayLength; i += stride) {\n    flatCoordinates[i] = 0;\n    flatCoordinates[i + 1] = 0;\n    for (let j = 2; j < stride; j++) {\n      flatCoordinates[i + j] = center[j];\n    }\n  }\n  const ends = [flatCoordinates.length];\
 n  const polygon = new Polygon(flatCoordinates, layout, ends);\n  makeRegular(polygon, center, circle.getRadius(), opt_angle);\n  return polygon;\n}\n\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n  const flatCoordinates = polygon.getFlatCoordinates();\n  const stride = polygon.getStride();\n  const sides = flatCoordinates.length / stride - 1;\n  const startAngle = opt_angle ? opt_angle : 0;\n  for (let i = 0; i <= sides; ++i) {\n    const offset = i * stride;\n    const angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n    flatCoordinates[offset] = center[0] + radi
 us * Math.cos(angle);\n    flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n  }\n  polygon.changed();\n}\n","/**\n * @module ol/Feature\n */\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport EventType from './events/EventType.js';\nimport {assert} from './asserts.js';\nimport {listen, unlistenByKey} from './events.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have ge
 t/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature.  For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/geom/Point';\n *\n * var feature = new Feature({\n *   geometry: new Polygon(polyCoords),\n *   labelPoint: new Point(labelCoords),\n *   name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\
 n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} Geometry\n */\nclass Feature extends BaseObject {\n  /**\n   * @param {Geometry|Object<string, *>=} opt_geometryOrProperties\n   *     You may pass a Geometry object directly, or an object literal containing\n   *     properties. If you pass an object literal, you may include a Geometry\n   *     associated with a `geometry` key.\n   */\n  constructor(opt_geometryOrProperties) {\n    super();\n\n    /**\n     * @private\n     * @type {number|string|undefined}\n     */\n    this.id_ = undefined;\n\n    /**\n     * @type {string}\n     * @private\n     */\n    this.geometryName_ = 'geometry';\n\n    /**\n     * User provided style.\n     * @private\n     * @type {import(\"./style/Style.js\").StyleLike}\n     */\n    this.style_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./style/S
 tyle.js\").StyleFunction|undefined}\n     */\n    this.styleFunction_ = undefined;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.geometryChangeKey_ = null;\n\n    this.addEventListener(\n      getChangeEventType(this.geometryName_),\n      this.handleGeometryChanged_\n    );\n\n    if (opt_geometryOrProperties) {\n      if (\n        typeof (\n          /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry\n        ) === 'function'\n      ) {\n        const geometry = /** @type {Geometry} */ (opt_geometryOrProperties);\n        this.setGeometry(geometry);\n      } else {\n        /** @type {Object<string, *>} */\n        const properties = opt_geometryOrProperties;\n        this.setProperties(properties);\n      }\n    }\n  }\n\n  /**\n   * Clone this feature. If the original feature has a geometry it\n   * is also cloned. The feature id is not set in the clone.\n   * @return {Feature} The clone.\n   * @api\n   */\n  cl
 one() {\n    const clone = new Feature(\n      this.hasProperties() ? this.getProperties() : null\n    );\n    clone.setGeometryName(this.getGeometryName());\n    const geometry = this.getGeometry();\n    if (geometry) {\n      clone.setGeometry(geometry.clone());\n    }\n    const style = this.getStyle();\n    if (style) {\n      clone.setStyle(style);\n    }\n    return clone;\n  }\n\n  /**\n   * Get the feature's default geometry.  A feature may have any number of named\n   * geometries.  The \"default\" geometry (the one that is rendered by default) is\n   * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n   * @return {Geometry|undefined} The default geometry for the feature.\n   * @api\n   * @observable\n   */\n  getGeometry() {\n    return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n  }\n\n  /**\n   * Get the feature identifier.  This is a stable identifier for the feature and\n   * is either set when reading data from a remote source or
  set explicitly by\n   * calling {@link module:ol/Feature~Feature#setId}.\n   * @return {number|string|undefined} Id.\n   * @api\n   */\n  getId() {\n    return this.id_;\n  }\n\n  /**\n   * Get the name of the feature's default geometry.  By default, the default\n   * geometry is named `geometry`.\n   * @return {string} Get the property name associated with the default geometry\n   *     for this feature.\n   * @api\n   */\n  getGeometryName() {\n    return this.geometryName_;\n  }\n\n  /**\n   * Get the feature's style. Will return what was provided to the\n   * {@link module:ol/Feature~Feature#setStyle} method.\n   * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n   * @api\n   */\n  getStyle() {\n    return this.style_;\n  }\n\n  /**\n   * Get the feature's style function.\n   * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n   * representing the current style of this feature.\n   * @api\n   */\n  getStyleFunction
 () {\n    return this.styleFunction_;\n  }\n\n  /**\n   * @private\n   */\n  handleGeometryChange_() {\n    this.changed();\n  }\n\n  /**\n   * @private\n   */\n  handleGeometryChanged_() {\n    if (this.geometryChangeKey_) {\n      unlistenByKey(this.geometryChangeKey_);\n      this.geometryChangeKey_ = null;\n    }\n    const geometry = this.getGeometry();\n    if (geometry) {\n      this.geometryChangeKey_ = listen(\n        geometry,\n        EventType.CHANGE,\n        this.handleGeometryChange_,\n        this\n      );\n    }\n    this.changed();\n  }\n\n  /**\n   * Set the default geometry for the feature.  This will update the property\n   * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n   * @param {Geometry|undefined} geometry The new geometry.\n   * @api\n   * @observable\n   */\n  setGeometry(geometry) {\n    this.set(this.geometryName_, geometry);\n  }\n\n  /**\n   * Set the style for the feature to override the layer style.  This can be a\
 n   * single style object, an array of styles, or a function that takes a\n   * resolution and returns an array of styles. To unset the feature style, call\n   * `setStyle()` without arguments or a falsey value.\n   * @param {import(\"./style/Style.js\").StyleLike=} opt_style Style for this feature.\n   * @api\n   * @fires module:ol/events/Event~BaseEvent#event:change\n   */\n  setStyle(opt_style) {\n    this.style_ = opt_style;\n    this.styleFunction_ = !opt_style\n      ? undefined\n      : createStyleFunction(opt_style);\n    this.changed();\n  }\n\n  /**\n   * Set the feature id.  The feature id is considered stable and may be used when\n   * requesting features or comparing identifiers returned from a remote source.\n   * The feature id can be used with the\n   * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n   * @param {number|string|undefined} id The feature id.\n   * @api\n   * @fires module:ol/events/Event~BaseEvent#event:change\n   */\n  setId(id) {
 \n    this.id_ = id;\n    this.changed();\n  }\n\n  /**\n   * Set the property name to be used when getting the feature's default geometry.\n   * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n   * this name will be returned.\n   * @param {string} name The property name of the default geometry.\n   * @api\n   */\n  setGeometryName(name) {\n    this.removeEventListener(\n      getChangeEventType(this.geometryName_),\n      this.handleGeometryChanged_\n    );\n    this.geometryName_ = name;\n    this.addEventListener(\n      getChangeEventType(this.geometryName_),\n      this.handleGeometryChanged_\n    );\n    this.handleGeometryChanged_();\n  }\n}\n\n/**\n * Convert the provided object into a feature style function.  Functions passed\n * through unchanged.  Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default
 >|!import(\"./style/Style.js\").default} obj\n *     A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n  if (typeof obj === 'function') {\n    return obj;\n  } else {\n    /**\n     * @type {Array<import(\"./style/Style.js\").default>}\n     */\n    let styles;\n    if (Array.isArray(obj)) {\n      styles = obj;\n    } else {\n      assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n      const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n      styles = [style];\n    }\n    return function () {\n      return styles;\n    };\n  }\n}\nexport default Feature;\n","/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.js';\nimport
  GeometryType from './GeometryType.js';\nimport {\n  closestSquaredDistanceXY,\n  createOrUpdateEmpty,\n  extend,\n  getCenter,\n} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry} objects.\n *\n * @api\n */\nclass GeometryCollection extends Geometry {\n  /**\n   * @param {Array<Geometry>=} opt_geometries Geometries.\n   */\n  constructor(opt_geometries) {\n    super();\n\n    /**\n     * @private\n     * @type {Array<Geometry>}\n     */\n    this.geometries_ = opt_geometries ? opt_geometries : null;\n\n    /**\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.changeEventsKeys_ = [];\n\n    this.listenGeometriesChange_();\n  }\n\n  /**\n   * @private\n   */\n  unlistenGeometriesChange_() {\n    this.changeEventsKeys_.forEach(unlistenByKey);\n    this.changeEventsKeys_.length = 0;\n  }\n\n  /**\n   * @private\n   */\n  listenGeometriesChange_() {\n    if (!this.geo
 metries_) {\n      return;\n    }\n    for (let i = 0, ii = this.geometries_.length; i < ii; ++i) {\n      this.changeEventsKeys_.push(\n        listen(this.geometries_[i], EventType.CHANGE, this.changed, this)\n      );\n    }\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!GeometryCollection} Clone.\n   * @api\n   */\n  clone() {\n    const geometryCollection = new GeometryCollection(null);\n    geometryCollection.setGeometries(this.geometries_);\n    return geometryCollection;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    const geometries = this.
 geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      minSquaredDistance = geometries[i].closestPointXY(\n        x,\n        y,\n        closestPoint,\n        minSquaredDistance\n      );\n    }\n    return minSquaredDistance;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */\n  containsXY(x, y) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].containsXY(x, y)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */\n  computeExtent(extent) {\n    createOrUpdateEmpty(extent);\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      extend(extent, geometries[i].getExtent());\n    }\n    return exten
 t;\n  }\n\n  /**\n   * Return the geometries that make up this geometry collection.\n   * @return {Array<Geometry>} Geometries.\n   * @api\n   */\n  getGeometries() {\n    return cloneGeometries(this.geometries_);\n  }\n\n  /**\n   * @return {Array<Geometry>} Geometries.\n   */\n  getGeometriesArray() {\n    return this.geometries_;\n  }\n\n  /**\n   * @return {Array<Geometry>} Geometries.\n   */\n  getGeometriesArrayRecursive() {\n    /** @type {Array<Geometry>} */\n    let geometriesArray = [];\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].getType() === this.getType()) {\n        geometriesArray = geometriesArray.concat(\n          /** @type {GeometryCollection} */ (geometries[\n            i\n          ]).getGeometriesArrayRecursive()\n        );\n      } else {\n        geometriesArray.push(geometries[i]);\n      }\n    }\n    return geometriesArray;\n  }\n\n  /**\n   * Create a simplified version o
 f this geometry using the Douglas Peucker algorithm.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {GeometryCollection} Simplified GeometryCollection.\n   */\n  getSimplifiedGeometry(squaredTolerance) {\n    if (this.simplifiedGeometryRevision !== this.getRevision()) {\n      this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n      this.simplifiedGeometryRevision = this.getRevision();\n    }\n    if (\n      squaredTolerance < 0 ||\n      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n        squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)\n    ) {\n      return this;\n    }\n\n    const simplifiedGeometries = [];\n    const geometries = this.geometries_;\n    let simplified = false;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      const geometry = geometries[i];\n      const simplifiedGeometry = geometry.getSimplifiedGeometry(\n        squaredTolerance\n      );\n      simplifiedGeometries.push(simplifiedGeome
 try);\n      if (simplifiedGeometry !== geometry) {\n        simplified = true;\n      }\n    }\n    if (simplified) {\n      const simplifiedGeometryCollection = new GeometryCollection(null);\n      simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n      return simplifiedGeometryCollection;\n    } else {\n      this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n      return this;\n    }\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.GEOMETRY_COLLECTION;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      if 
 (geometries[i].intersectsExtent(extent)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    return this.geometries_.length === 0;\n  }\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   */\n  rotate(angle, anchor) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].rotate(angle, anchor);\n    }\n    this.changed();\n  }\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n   * @param {imp
 ort(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n   *     of the geometry extent).\n   * @api\n   */\n  scale(sx, opt_sy, opt_anchor) {\n    let anchor = opt_anchor;\n    if (!anchor) {\n      anchor = getCenter(this.getExtent());\n    }\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].scale(sx, opt_sy, anchor);\n    }\n    this.changed();\n  }\n\n  /**\n   * Set the geometries that make up this geometry collection.\n   * @param {Array<Geometry>} geometries Geometries.\n   * @api\n   */\n  setGeometries(geometries) {\n    this.setGeometriesArray(cloneGeometries(geometries));\n  }\n\n  /**\n   * @param {Array<Geometry>} geometries Geometries.\n   */\n  setGeometriesArray(geometries) {\n    this.unlistenGeometriesChange_();\n    this.geometries_ = geometries;\n    this.listenGeometriesChange_();\n    this.changed();\n  }\n\n  /**\n   * Apply a transform function to the 
 coordinates of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n   * Called with a flat array of geometry coordinates.\n   * @api\n   */\n  applyTransform(transformFn) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].applyTransform(transformFn);\n    }\n    this.changed();\n  }\n\n  /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   */\n  translate(deltaX, deltaY) {\n    const geometries = this.geometries_;\n    for (let i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].translate(del
 taX, deltaY);\n    }\n    this.changed();\n  }\n\n  /**\n   * Clean up.\n   */\n  disposeInternal() {\n    this.unlistenGeometriesChange_();\n    super.disposeInternal();\n  }\n}\n\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n  const clonedGeometries = [];\n  for (let i = 0, ii = geometries.length; i < ii; ++i) {\n    clonedGeometries.push(geometries[i].clone());\n  }\n  return clonedGeometries;\n}\n\nexport default GeometryCollection;\n","/**\n * @module ol/format/Feature\n */\nimport Units from '../proj/Units.js';\nimport {abstract} from '../util.js';\nimport {assign} from '../obj.js';\nimport {\n  equivalent as equivalentProjection,\n  get as getProjection,\n  transformExtent,\n} from '../proj.js';\n\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the pro
 jection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile being read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProj
 ection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation.  This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings.  By default, coordinates are serialized\n * as they are provided at construction.  If `true`, the right-hand rule will\n * be applied.  If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings).  Note that not all\n * formats support this.  The GeoJSON format do
 es use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats.  See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nclass FeatureFormat {\n  constructo
 r() {\n    /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.dataProjection = null;\n\n    /**\n     * @protected\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.defaultFeatureProjection = null;\n  }\n\n  /**\n   * Adds the data projection to the read options.\n   * @param {Document|Element|Object|string} source Source.\n   * @param {ReadOptions=} opt_options Options.\n   * @return {ReadOptions|undefined} Options.\n   * @protected\n   */\n  getReadOptions(source, opt_options) {\n    let options;\n    if (opt_options) {\n      let dataProjection = opt_options.dataProjection\n        ? getProjection(opt_options.dataProjection)\n        : this.readProjection(source);\n      if (\n        opt_options.extent &&\n        dataProjection &&\n        dataProjection.getUnits() === Units.TILE_PIXELS\n      ) {\n        dataProjection = getProjection(dataProjection);\n        dataProjection.setWorldExtent(opt_options
 .extent);\n      }\n      options = {\n        dataProjection: dataProjection,\n        featureProjection: opt_options.featureProjection,\n      };\n    }\n    return this.adaptOptions(options);\n  }\n\n  /**\n   * Sets the `dataProjection` on the options, if no `dataProjection`\n   * is set.\n   * @param {WriteOptions|ReadOptions|undefined} options\n   *     Options.\n   * @protected\n   * @return {WriteOptions|ReadOptions|undefined}\n   *     Updated options.\n   */\n  adaptOptions(options) {\n    return assign(\n      {\n        dataProjection: this.dataProjection,\n        featureProjection: this.defaultFeatureProjection,\n      },\n      options\n    );\n  }\n\n  /**\n   * @abstract\n   * @return {import(\"./FormatType.js\").default} Format.\n   */\n  getType() {\n    return abstract();\n  }\n\n  /**\n   * Read a single feature from a source.\n   *\n   * @abstract\n   * @param {Document|Element|Object|string} source Source.\n   * @param {ReadOptions=} opt_options Read options.\
 n   * @return {import(\"../Feature.js\").FeatureLike} Feature.\n   */\n  readFeature(source, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Read all features from a source.\n   *\n   * @abstract\n   * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n   * @param {ReadOptions=} opt_options Read options.\n   * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n   */\n  readFeatures(source, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Read a single geometry from a source.\n   *\n   * @abstract\n   * @param {Document|Element|Object|string} source Source.\n   * @param {ReadOptions=} opt_options Read options.\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  readGeometry(source, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Read the projection from a source.\n   *\n   * @abstract\n   * @param {Document|Element|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").defa
 ult} Projection.\n   */\n  readProjection(source) {\n    return abstract();\n  }\n\n  /**\n   * Encode a feature in this format.\n   *\n   * @abstract\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {WriteOptions=} opt_options Write options.\n   * @return {string} Result.\n   */\n  writeFeature(feature, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Encode an array of features in this format.\n   *\n   * @abstract\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {WriteOptions=} opt_options Write options.\n   * @return {string} Result.\n   */\n  writeFeatures(features, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Write a single geometry in this format.\n   *\n   * @abstract\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {WriteOptions=} opt_options Write options.\n   * @return {string} Result.\n   */\n  writeGeometry(geometry, opt_options) {\n    retu
 rn abstract();\n  }\n}\n\nexport default FeatureFormat;\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {(WriteOptions|ReadOptions)=} opt_options Options.\n * @return {import(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, opt_options) {\n  const featureProjection = opt_options\n    ? getProjection(opt_options.featureProjection)\n    : null;\n  const dataProjection = opt_options\n    ? getProjection(opt_options.dataProjection)\n    : null;\n\n  let transformed;\n  if (\n    featureProjection &&\n    dataProjection &&\n    !equivalentProjection(featureProjection, dataProjection)\n  ) {\n    transformed = (write ? geometry.clone() : geometry).transform(\n      write ? featureProjection : dataProjection,\n      write ? dataProjection : featureProjection\n    );\n  } else {\n    transformed = geometry
 ;\n  }\n  if (\n    write &&\n    opt_options &&\n    /** @type {WriteOptions} */ (opt_options).decimals !== undefined\n  ) {\n    const power = Math.pow(\n      10,\n      /** @type {WriteOptions} */ (opt_options).decimals\n    );\n    // if decimals option on write, round each coordinate appropriately\n    /**\n     * @param {Array<number>} coordinates Coordinates.\n     * @return {Array<number>} Transformed coordinates.\n     */\n    const transform = function (coordinates) {\n      for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n        coordinates[i] = Math.round(coordinates[i] * power) / power;\n      }\n      return coordinates;\n    };\n    if (transformed === geometry) {\n      transformed = geometry.clone();\n    }\n    transformed.applyTransform(transform);\n  }\n  return transformed;\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../extent.js\").Extent} Transformed e
 xtent.\n */\nexport function transformExtentWithOptions(extent, opt_options) {\n  const featureProjection = opt_options\n    ? getProjection(opt_options.featureProjection)\n    : null;\n  const dataProjection = opt_options\n    ? getProjection(opt_options.dataProjection)\n    : null;\n\n  if (\n    featureProjection &&\n    dataProjection &&\n    !equivalentProjection(featureProjection, dataProjection)\n  ) {\n    return transformExtent(extent, dataProjection, featureProjection);\n  } else {\n    return extent;\n  }\n}\n","/**\n * @module ol/format/FormatType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  ARRAY_BUFFER: 'arraybuffer',\n  JSON: 'json',\n  TEXT: 'text',\n  XML: 'xml',\n};\n","/**\n * @module ol/format/JSONFeature\n */\nimport FeatureFormat from './Feature.js';\nimport FormatType from './FormatType.js';\nimport {abstract} from '../util.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in app
 s.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\nclass JSONFeature extends FeatureFormat {\n  constructor() {\n    super();\n  }\n\n  /**\n   * @return {import(\"./FormatType.js\").default} Format.\n   */\n  getType() {\n    return FormatType.JSON;\n  }\n\n  /**\n   * Read a feature.  Only works for a single feature. Use `readFeatures` to\n   * read a feature collection.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../Feature.js\").default} Feature.\n   * @api\n   */\n  readFeature(source, opt_options) {\n    return this.readFeatureFromObject(\n      getObject(source),\n      this.getReadOptions(source, opt_options)\n    );\n  }\n\n  /**\n   * Read all features.  Works with both a single feature and a feature\n   * collection.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @param {import(\"./
 Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  readFeatures(source, opt_options) {\n    return this.readFeaturesFromObject(\n      getObject(source),\n      this.getReadOptions(source, opt_options)\n    );\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../Feature.js\").default} Feature.\n   */\n  readFeatureFromObject(object, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   */\n  readFeaturesFromObject(object, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Read a geometry.\n   *\n   * @param {ArrayBuffer|Document|Element
 |Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   * @api\n   */\n  readGeometry(source, opt_options) {\n    return this.readGeometryFromObject(\n      getObject(source),\n      this.getReadOptions(source, opt_options)\n    );\n  }\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  readGeometryFromObject(object, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Read the projection.\n   *\n   * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   */\n  readProjection(source) {\n    return this.readProjectionFromObject(getObject(source));\n  }\n\n  /**\n   * @abstract\n   
 * @param {Object} object Object.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  readProjectionFromObject(object) {\n    return abstract();\n  }\n\n  /**\n   * Encode a feature as string.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded feature.\n   * @api\n   */\n  writeFeature(feature, opt_options) {\n    return JSON.stringify(this.writeFeatureObject(feature, opt_options));\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   */\n  writeFeatureObject(feature, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Encode an array of features as string.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @pa
 ram {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded features.\n   * @api\n   */\n  writeFeatures(features, opt_options) {\n    return JSON.stringify(this.writeFeaturesObject(features, opt_options));\n  }\n\n  /**\n   * @abstract\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   */\n  writeFeaturesObject(features, opt_options) {\n    return abstract();\n  }\n\n  /**\n   * Encode a geometry as string.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded geometry.\n   * @api\n   */\n  writeGeometry(geometry, opt_options) {\n    return JSON.stringify(this.writeGeometryObject(geometry, opt_options));\n  }\n\n  /**\n   * @abstract\n   * @param {import(\"../geom/Ge
 ometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   */\n  writeGeometryObject(geometry, opt_options) {\n    return abstract();\n  }\n}\n\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n  if (typeof source === 'string') {\n    const object = JSON.parse(source);\n    return object ? /** @type {Object} */ (object) : null;\n  } else if (source !== null) {\n    return source;\n  } else {\n    return null;\n  }\n}\n\nexport default JSONFeature;\n","/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n  let x1 = flatCoordinates[offset];\n  let y1 =
  flatCoordinates[offset + 1];\n  let length = 0;\n  for (let i = offset + stride; i < end; i += stride) {\n    const x2 = flatCoordinates[i];\n    const y2 = flatCoordinates[i + 1];\n    length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n    x1 = x2;\n    y1 = y2;\n  }\n  return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n  let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n  const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n  const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n  perimeter += Math.sqrt(dx * dx + dy * dy);\n  return perimeter;\n}\n","/**\n * @module ol/geom/LineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType
  from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {extend} from '../array.js';\nimport {forEach as forEachSegment} from './flat/segments.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {interpolatePoint, lineStringCoordinateAtM} from './flat/interpolate.js';\nimport {intersectsLineString} from './flat/intersectsextent.js';\nimport {lineStringLength} from './flat/length.js';\n\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nclass LineString extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n   * @param {im
 port(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   */\n  constructor(coordinates, opt_layout) {\n    super();\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.flatMidpoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatMidpointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(\n        opt_layout,\n        /** @type {Array<number>} */ (coordinates)\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates),\n        opt_layout\n      );\n    }\n  }\n\n  /**\n   * Append the passed coordinate to the coordinates of the linestring.\n   * @param {import(\"../coordi
 nate.js\").Coordinate} coordinate Coordinate.\n   * @api\n   */\n  appendCoordinate(coordinate) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = coordinate.slice();\n    } else {\n      extend(this.flatCoordinates, coordinate);\n    }\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!LineString} Clone.\n   * @api\n   */\n  clone() {\n    return new LineString(this.flatCoordinates.slice(), this.layout);\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.max
 Delta_ = Math.sqrt(\n        maxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.flatCoordinates.length,\n          this.stride,\n          0\n        )\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      this.maxDelta_,\n      false,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance\n    );\n  }\n\n  /**\n   * Iterate over each segment, calling the provided callback.\n   * If the callback returns a truthy value the function returns that\n   * value immediately. Otherwise the function returns `false`.\n   *\n   * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n   *     called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n   * @return {T|boolean} Valu
 e.\n   * @template T,S\n   * @api\n   */\n  forEachSegment(callback) {\n    return forEachSegment(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      callback\n    );\n  }\n\n  /**\n   * Returns the coordinate at `m` using linear interpolation, or `null` if no\n   * such coordinate exists.\n   *\n   * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n   * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n   * M will return the first coordinate and Ms greater than the last M will\n   * return the last coordinate.\n   *\n   * @param {number} m M.\n   * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */\n  getCoordinateAtM(m, opt_extrapolate) {\n    if (\n      this.layout != GeometryLayout.XYM &&\n      this.layout != GeometryLayout.XYZM\n    ) {\n      return null;\n    }\n    const ex
 trapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n    return lineStringCoordinateAtM(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      m,\n      extrapolate\n    );\n  }\n\n  /**\n   * Return the coordinates of the linestring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   */\n  getCoordinates() {\n    return inflateCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride\n    );\n  }\n\n  /**\n   * Return the coordinate at the provided fraction along the linestring.\n   * The `fraction` is a number between 0 and 1, where 0 is the start of the\n   * linestring and 1 is the end.\n   * @param {number} fraction Fraction.\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_dest Optional coordinate whose values will\n   *     be modified. If not provided, a new coordinate will be returned.\n   * @return {import(\"..
 /coordinate.js\").Coordinate} Coordinate of the interpolated point.\n   * @api\n   */\n  getCoordinateAt(fraction, opt_dest) {\n    return interpolatePoint(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      fraction,\n      opt_dest,\n      this.stride\n    );\n  }\n\n  /**\n   * Return the length of the linestring on projected plane.\n   * @return {number} Length (on projected plane).\n   * @api\n   */\n  getLength() {\n    return lineStringLength(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride\n    );\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoint.\n   */\n  getFlatMidpoint() {\n    if (this.flatMidpointRevision_ != this.getRevision()) {\n      this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n      this.flatMidpointRevision_ = this.getRevision();\n    }\n    return this.flatMidpoint_;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared toleranc
 e.\n   * @return {LineString} Simplified LineString.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    const simplifiedFlatCoordinates = [];\n    simplifiedFlatCoordinates.length = douglasPeucker(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0\n    );\n    return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.LINE_STRING;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    return intersectsLineString(\n      this.flatCoordinates,\n      0,\n 
      this.flatCoordinates.length,\n      this.stride,\n      extent\n    );\n  }\n\n  /**\n   * Set the coordinates of the linestring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride\n    );\n    this.changed();\n  }\n}\n\nexport default LineString;\n","/**\n * @module ol/geom/MultiLineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/cl
 osest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {douglasPeuckerArray} from './flat/simplify.js';\nimport {extend} from '../array.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {\n  interpolatePoint,\n  lineStringsCoordinateAtM,\n} from './flat/interpolate.js';\nimport {intersectsLineStringArray} from './flat/intersectsextent.js';\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nclass MultiLineString extends SimpleGeometry {\n  /**\n   * @param {Array<Array<import(\"../coordinate.js\").Coordinate>|LineString>|Array<number>} coordinates\n   *     Coordinates or LineString geometries. (For internal use, flat coordinates in\n   *     combination with `opt_layout` and `opt_ends` are also accepted.)\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @param {Array<number>=} opt_ends Flat coordinate ends for internal use.\n   *
 /\n  constructor(coordinates, opt_layout, opt_ends) {\n    super();\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (Array.isArray(coordinates[0])) {\n      this.setCoordinates(\n        /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates),\n        opt_layout\n      );\n    } else if (opt_layout !== undefined && opt_ends) {\n      this.setFlatCoordinates(\n        opt_layout,\n        /** @type {Array<number>} */ (coordinates)\n      );\n      this.ends_ = opt_ends;\n    } else {\n      let layout = this.getLayout();\n      const lineStrings = /** @type {Array<LineString>} */ (coordinates);\n      const flatCoordinates = [];\n      const ends = [];\n      for (let i = 0, ii = lineStrings.length; i < ii; ++i) {\n        const 
 lineString = lineStrings[i];\n        if (i === 0) {\n          layout = lineString.getLayout();\n        }\n        extend(flatCoordinates, lineString.getFlatCoordinates());\n        ends.push(flatCoordinates.length);\n      }\n      this.setFlatCoordinates(layout, flatCoordinates);\n      this.ends_ = ends;\n    }\n  }\n\n  /**\n   * Append the passed linestring to the multilinestring.\n   * @param {LineString} lineString LineString.\n   * @api\n   */\n  appendLineString(lineString) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = lineString.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n    }\n    this.ends_.push(this.flatCoordinates.length);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiLineString} Clone.\n   * @api\n   */\n  clone() {\n    return new MultiLineString(\n      this.flatCoordinates.slice(),\n      this.layout,\n      thi
 s.ends_.slice()\n    );\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        arrayMaxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.ends_,\n          this.stride,\n          0\n        )\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestArrayPoint(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      this.maxDelta_,\n      false,\n      x,\n      y,\n      closestPoint,\n      minSqu
 aredDistance\n    );\n  }\n\n  /**\n   * Returns the coordinate at `m` using linear interpolation, or `null` if no\n   * such coordinate exists.\n   *\n   * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n   * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n   * M will return the first coordinate and Ms greater than the last M will\n   * return the last coordinate.\n   *\n   * `opt_interpolate` controls interpolation between consecutive LineStrings\n   * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n   * will be linearly interpolated between the last coordinate of one LineString\n   * and the first coordinate of the next LineString.  If `opt_interpolate` is\n   * `false` then the function will return `null` for Ms falling between\n   * LineStrings.\n   *\n   * @param {number} m M.\n   * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n   * @param {boolean=} opt_interpolate Interpola
 te. Default is `false`.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */\n  getCoordinateAtM(m, opt_extrapolate, opt_interpolate) {\n    if (\n      (this.layout != GeometryLayout.XYM &&\n        this.layout != GeometryLayout.XYZM) ||\n      this.flatCoordinates.length === 0\n    ) {\n      return null;\n    }\n    const extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n    const interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n    return lineStringsCoordinateAtM(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      m,\n      extrapolate,\n      interpolate\n    );\n  }\n\n  /**\n   * Return the coordinates of the multilinestring.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @api\n   */\n  getCoordinates() {\n    return inflateCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride\n    );
 \n  }\n\n  /**\n   * @return {Array<number>} Ends.\n   */\n  getEnds() {\n    return this.ends_;\n  }\n\n  /**\n   * Return the linestring at the specified index.\n   * @param {number} index Index.\n   * @return {LineString} LineString.\n   * @api\n   */\n  getLineString(index) {\n    if (index < 0 || this.ends_.length <= index) {\n      return null;\n    }\n    return new LineString(\n      this.flatCoordinates.slice(\n        index === 0 ? 0 : this.ends_[index - 1],\n        this.ends_[index]\n      ),\n      this.layout\n    );\n  }\n\n  /**\n   * Return the linestrings of this multilinestring.\n   * @return {Array<LineString>} LineStrings.\n   * @api\n   */\n  getLineStrings() {\n    const flatCoordinates = this.flatCoordinates;\n    const ends = this.ends_;\n    const layout = this.layout;\n    /** @type {Array<LineString>} */\n    const lineStrings = [];\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const lineStri
 ng = new LineString(\n        flatCoordinates.slice(offset, end),\n        layout\n      );\n      lineStrings.push(lineString);\n      offset = end;\n    }\n    return lineStrings;\n  }\n\n  /**\n   * @return {Array<number>} Flat midpoints.\n   */\n  getFlatMidpoints() {\n    const midpoints = [];\n    const flatCoordinates = this.flatCoordinates;\n    let offset = 0;\n    const ends = this.ends_;\n    const stride = this.stride;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const midpoint = interpolatePoint(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        0.5\n      );\n      extend(midpoints, midpoint);\n      offset = end;\n    }\n    return midpoints;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {MultiLineString} Simplified MultiLineString.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    const simplifiedFlatCoordinates = [];\n 
    const simplifiedEnds = [];\n    simplifiedFlatCoordinates.length = douglasPeuckerArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      squaredTolerance,\n      simplifiedFlatCoordinates,\n      0,\n      simplifiedEnds\n    );\n    return new MultiLineString(\n      simplifiedFlatCoordinates,\n      GeometryLayout.XY,\n      simplifiedEnds\n    );\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.MULTI_LINE_STRING;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    return intersectsLineStringArray(\n      this.flatCoordinates,\n      0,\n      this.ends_,\n      this.stride,\n      extent\n    );\n  }\n\n  /**
 \n   * Set the coordinates of the multilinestring.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 2);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    const ends = deflateCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n      this.ends_\n    );\n    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n    this.changed();\n  }\n}\n\nexport default MultiLineString;\n","/**\n * @module ol/geom/MultiPoint\n */\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {extend} from 
 '../array.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nclass MultiPoint extends SimpleGeometry {\n  /**\n   * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   */\n  constructor(coordinates, opt_layout) {\n    super();\n    if (opt_layout && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(\n        opt_layout,\n        /** @type {Array<number>} */ (coordinates)\n      );\n    } else {\n      this.setCoordinates(\n        /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates),\n        opt_layout\n      );\n    }\n  }\n\n  /**\n   * Append the passed point to this multipoint.\n   * @param {Po
 int} point Point.\n   * @api\n   */\n  appendPoint(point) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = point.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, point.getFlatCoordinates());\n    }\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiPoint} Clone.\n   * @api\n   */\n  clone() {\n    const multiPoint = new MultiPoint(\n      this.flatCoordinates.slice(),\n      this.layout\n    );\n    return multiPoint;\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    const flatCoordi
 nates = this.flatCoordinates;\n    const stride = this.stride;\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      const squaredDistance = squaredDx(\n        x,\n        y,\n        flatCoordinates[i],\n        flatCoordinates[i + 1]\n      );\n      if (squaredDistance < minSquaredDistance) {\n        minSquaredDistance = squaredDistance;\n        for (let j = 0; j < stride; ++j) {\n          closestPoint[j] = flatCoordinates[i + j];\n        }\n        closestPoint.length = stride;\n      }\n    }\n    return minSquaredDistance;\n  }\n\n  /**\n   * Return the coordinates of the multipoint.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @api\n   */\n  getCoordinates() {\n    return inflateCoordinates(\n      this.flatCoordinates,\n      0,\n      this.flatCoordinates.length,\n      this.stride\n    );\n  }\n\n  /**\n   * Return the point at the specified index.\n   * @param {number} index Index.\n   * @return {Point} P
 oint.\n   * @api\n   */\n  getPoint(index) {\n    const n = !this.flatCoordinates\n      ? 0\n      : this.flatCoordinates.length / this.stride;\n    if (index < 0 || n <= index) {\n      return null;\n    }\n    return new Point(\n      this.flatCoordinates.slice(\n        index * this.stride,\n        (index + 1) * this.stride\n      ),\n      this.layout\n    );\n  }\n\n  /**\n   * Return the points of this multipoint.\n   * @return {Array<Point>} Points.\n   * @api\n   */\n  getPoints() {\n    const flatCoordinates = this.flatCoordinates;\n    const layout = this.layout;\n    const stride = this.stride;\n    /** @type {Array<Point>} */\n    const points = [];\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      const point = new Point(flatCoordinates.slice(i, i + stride), layout);\n      points.push(point);\n    }\n    return points;\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\
 n   * @api\n   */\n  getType() {\n    return GeometryType.MULTI_POINT;\n  }\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    const flatCoordinates = this.flatCoordinates;\n    const stride = this.stride;\n    for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      const x = flatCoordinates[i];\n      const y = flatCoordinates[i + 1];\n      if (containsXY(extent, x, y)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Set the coordinates of the multipoint.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 1);\n   
  if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride\n    );\n    this.changed();\n  }\n}\n\nexport default MultiPoint;\n","/**\n * @module ol/geom/MultiPolygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {\n  assignClosestMultiArrayPoint,\n  multiArrayMaxSquaredDelta,\n} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateMultiCoordinatesArray} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {getInteriorPointsOfMultiArray} from './flat/interiorpoint.js';\nimport {inflateMultiCoordinatesArray} from './flat/inflate.js';\nimport {intersectsLinearRingMultiArray} from './flat/
 intersectsextent.js';\nimport {\n  linearRingssAreOriented,\n  orientLinearRingsArray,\n} from './flat/orient.js';\nimport {linearRingss as linearRingssArea} from './flat/area.js';\nimport {linearRingss as linearRingssCenter} from './flat/center.js';\nimport {linearRingssContainsXY} from './flat/contains.js';\nimport {quantizeMultiArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nclass MultiPolygon extends SimpleGeometry {\n  /**\n   * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n   *     For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @param {Array<Array<number>>=} opt_endss Array of ends for internal use with flat coordinates.\n   */\n  constructor(coordinates, opt_layout, opt_endss) {\n    super();\n\n    /**\n     * @type
  {Array<Array<number>>}\n     * @private\n     */\n    this.endss_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointsRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatInteriorPoints_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (!opt_endss && !Array.isArray(coordinates[0])) {\n      let layout = this.getLayout();\n      const polygons = /** @type {Array<Polygon>} */ (coordinates);\n      const flatCoordinates = [];\n      const endss = [];\n      for (let i = 0, ii = polygons.length; i < ii; ++i) {\n        const polygon = polygons[i];\n      
   if (i === 0) {\n          layout = polygon.getLayout();\n        }\n        const offset = flatCoordinates.length;\n        const ends = polygon.getEnds();\n        for (let j = 0, jj = ends.length; j < jj; ++j) {\n          ends[j] += offset;\n        }\n        extend(flatCoordinates, polygon.getFlatCoordinates());\n        endss.push(ends);\n      }\n      opt_layout = layout;\n      coordinates = flatCoordinates;\n      opt_endss = endss;\n    }\n    if (opt_layout !== undefined && opt_endss) {\n      this.setFlatCoordinates(\n        opt_layout,\n        /** @type {Array<number>} */ (coordinates)\n      );\n      this.endss_ = opt_endss;\n    } else {\n      this.setCoordinates(\n        /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates),\n        opt_layout\n      );\n    }\n  }\n\n  /**\n   * Append the passed polygon to this multipolygon.\n   * @param {Polygon} polygon Polygon.\n   * @api\n   */\n  appendPolygon(polygon) {\n    /** @t
 ype {Array<number>} */\n    let ends;\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = polygon.getFlatCoordinates().slice();\n      ends = polygon.getEnds().slice();\n      this.endss_.push();\n    } else {\n      const offset = this.flatCoordinates.length;\n      extend(this.flatCoordinates, polygon.getFlatCoordinates());\n      ends = polygon.getEnds().slice();\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        ends[i] += offset;\n      }\n    }\n    this.endss_.push(ends);\n    this.changed();\n  }\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiPolygon} Clone.\n   * @api\n   */\n  clone() {\n    const len = this.endss_.length;\n    const newEndss = new Array(len);\n    for (let i = 0; i < len; ++i) {\n      newEndss[i] = this.endss_[i].slice();\n    }\n\n    return new MultiPolygon(\n      this.flatCoordinates.slice(),\n      this.layout,\n      newEndss\n    );\n  }\n\n  /**\n   * @param {number} x X.\n   * @param {number} 
 y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  closestPointXY(x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(\n        multiArrayMaxSquaredDelta(\n          this.flatCoordinates,\n          0,\n          this.endss_,\n          this.stride,\n          0\n        )\n      );\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestMultiArrayPoint(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n      this.maxDelta_,\n      true,\n      x,\n      y,\n      closestPoint,\n      minSquaredDistance\n    );\n  }\n\n  /**\n   * @param {number} x X.\n
    * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */\n  containsXY(x, y) {\n    return linearRingssContainsXY(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n      x,\n      y\n    );\n  }\n\n  /**\n   * Return the area of the multipolygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  getArea() {\n    return linearRingssArea(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride\n    );\n  }\n\n  /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for multi-polygons.\n   *\n   * @param {boolean=} opt_right Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise 
 for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n   * @api\n   */\n  getCoordinates(opt_right) {\n    let flatCoordinates;\n    if (opt_right !== undefined) {\n      flatCoordinates = this.getOrientedFlatCoordinates().slice();\n      orientLinearRingsArray(\n        flatCoordinates,\n        0,\n        this.endss_,\n        this.stride,\n        opt_right\n      );\n    } else {\n      flatCoordinates = this.flatCoordinates;\n    }\n\n    return inflateMultiCoordinatesArray(\n      flatCoordinates,\n      0,\n      this.endss_,\n      this.stride\n    );\n  }\n\n  /**\n   * @return {Array<Array<number>>} Endss.\n   */\n  getEndss() {\n    return this.endss_;\n  }\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  getFlatInteriorPoints() {\n    if (this.flatInteriorPointsRevision_ != this.getRevisio
 n()) {\n      const flatCenters = linearRingssCenter(\n        this.flatCoordinates,\n        0,\n        this.endss_,\n        this.stride\n      );\n      this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n        this.getOrientedFlatCoordinates(),\n        0,\n        this.endss_,\n        this.stride,\n        flatCenters\n      );\n      this.flatInteriorPointsRevision_ = this.getRevision();\n    }\n    return this.flatInteriorPoints_;\n  }\n\n  /**\n   * Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.\n   * @return {MultiPoint} Interior points as XYM coordinates, where M is\n   * the length of the horizontal intersection that the point belongs to.\n   * @api\n   */\n  getInteriorPoints() {\n    return new MultiPoint(\n      this.getFlatInteriorPoints().slice(),\n      GeometryLayout.XYM\n    );\n  }\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  getOrientedFlatCoordinates() {\n    if (this.orientedRevision_ != th
 is.getRevision()) {\n      const flatCoordinates = this.flatCoordinates;\n      if (\n        linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)\n      ) {\n        this.orientedFlatCoordinates_ = flatCoordinates;\n      } else {\n        this.orientedFlatCoordinates_ = flatCoordinates.slice();\n        this.orientedFlatCoordinates_.length = orientLinearRingsArray(\n          this.orientedFlatCoordinates_,\n          0,\n          this.endss_,\n          this.stride\n        );\n      }\n      this.orientedRevision_ = this.getRevision();\n    }\n    return this.orientedFlatCoordinates_;\n  }\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {MultiPolygon} Simplified MultiPolygon.\n   * @protected\n   */\n  getSimplifiedGeometryInternal(squaredTolerance) {\n    const simplifiedFlatCoordinates = [];\n    const simplifiedEndss = [];\n    simplifiedFlatCoordinates.length = quantizeMultiArray(\n      this.flatCoordinates,\n      0,\n     
  this.endss_,\n      this.stride,\n      Math.sqrt(squaredTolerance),\n      simplifiedFlatCoordinates,\n      0,\n      simplifiedEndss\n    );\n    return new MultiPolygon(\n      simplifiedFlatCoordinates,\n      GeometryLayout.XY,\n      simplifiedEndss\n    );\n  }\n\n  /**\n   * Return the polygon at the specified index.\n   * @param {number} index Index.\n   * @return {Polygon} Polygon.\n   * @api\n   */\n  getPolygon(index) {\n    if (index < 0 || this.endss_.length <= index) {\n      return null;\n    }\n    let offset;\n    if (index === 0) {\n      offset = 0;\n    } else {\n      const prevEnds = this.endss_[index - 1];\n      offset = prevEnds[prevEnds.length - 1];\n    }\n    const ends = this.endss_[index].slice();\n    const end = ends[ends.length - 1];\n    if (offset !== 0) {\n      for (let i = 0, ii = ends.length; i < ii; ++i) {\n        ends[i] -= offset;\n      }\n    }\n    return new Polygon(\n      this.flatCoordinates.slice(offset, end),\n      this.layout,
 \n      ends\n    );\n  }\n\n  /**\n   * Return the polygons of this multipolygon.\n   * @return {Array<Polygon>} Polygons.\n   * @api\n   */\n  getPolygons() {\n    const layout = this.layout;\n    const flatCoordinates = this.flatCoordinates;\n    const endss = this.endss_;\n    const polygons = [];\n    let offset = 0;\n    for (let i = 0, ii = endss.length; i < ii; ++i) {\n      const ends = endss[i].slice();\n      const end = ends[ends.length - 1];\n      if (offset !== 0) {\n        for (let j = 0, jj = ends.length; j < jj; ++j) {\n          ends[j] -= offset;\n        }\n      }\n      const polygon = new Polygon(\n        flatCoordinates.slice(offset, end),\n        layout,\n        ends\n      );\n      polygons.push(polygon);\n      offset = end;\n    }\n    return polygons;\n  }\n\n  /**\n   * Get the type of this geometry.\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   * @api\n   */\n  getType() {\n    return GeometryType.MULTI_POLYGON;\n  }\n\
 n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   * @api\n   */\n  intersectsExtent(extent) {\n    return intersectsLinearRingMultiArray(\n      this.getOrientedFlatCoordinates(),\n      0,\n      this.endss_,\n      this.stride,\n      extent\n    );\n  }\n\n  /**\n   * Set the coordinates of the multipolygon.\n   * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  setCoordinates(coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 3);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    const endss = deflateMultiCoordinatesArray(\n      this.flatCoordinates,\n      0,\n      coordinates,\n      this.stride,\n      this.endss_\n    );\n    if (
 endss.length === 0) {\n      this.flatCoordinates.length = 0;\n    } else {\n      const lastEnds = endss[endss.length - 1];\n      this.flatCoordinates.length =\n        lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n    }\n    this.changed();\n  }\n}\n\nexport default MultiPolygon;\n","/**\n * @module ol/format/GeoJSON\n */\n\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {assert} from '../asserts.js';\nimport {assign, isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport {transformGeometryWi
 thOptions} from './Feature.js';\n\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for feat
 ures read or\n * written by the format.  Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @api\n */\nclass GeoJSON extends JSONFeature {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options ? opt_options : {};\n\n    super();\n\n    /**\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.dataProjection = getProjection(\n      options.dataProjection ? opti
 ons.dataProjection : 'EPSG:4326'\n    );\n\n    if (options.featureProjection) {\n      this.defaultFeatureProjection = getProjection(options.featureProjection);\n    }\n\n    /**\n     * Name of the geometry attribute for features.\n     * @type {string|undefined}\n     * @private\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * Look for the geometry name in the feature GeoJSON\n     * @type {boolean|undefined}\n     * @private\n     */\n    this.extractGeometryName_ = options.extractGeometryName;\n  }\n\n  /**\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../Feature.js\").default} Feature.\n   */\n  readFeatureFromObject(object, opt_options) {\n    /**\n     * @type {GeoJSONFeature}\n     */\n    let geoJSONFeature = null;\n    if (object['type'] === 'Feature') {\n      geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n    } else {\n    
   geoJSONFeature = {\n        'type': 'Feature',\n        'geometry': /** @type {GeoJSONGeometry} */ (object),\n        'properties': null,\n      };\n    }\n\n    const geometry = readGeometry(geoJSONFeature['geometry'], opt_options);\n    const feature = new Feature();\n    if (this.geometryName_) {\n      feature.setGeometryName(this.geometryName_);\n    } else if (\n      this.extractGeometryName_ &&\n      'geometry_name' in geoJSONFeature !== undefined\n    ) {\n      feature.setGeometryName(geoJSONFeature['geometry_name']);\n    }\n    feature.setGeometry(geometry);\n\n    if ('id' in geoJSONFeature) {\n      feature.setId(geoJSONFeature['id']);\n    }\n\n    if (geoJSONFeature['properties']) {\n      feature.setProperties(geoJSONFeature['properties'], true);\n    }\n    return feature;\n  }\n\n  /**\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {Array<Feature>} Features.\n   
 */\n  readFeaturesFromObject(object, opt_options) {\n    const geoJSONObject = /** @type {GeoJSONObject} */ (object);\n    /** @type {Array<import(\"../Feature.js\").default>} */\n    let features = null;\n    if (geoJSONObject['type'] === 'FeatureCollection') {\n      const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);\n      features = [];\n      const geoJSONFeatures = geoJSONFeatureCollection['features'];\n      for (let i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n        features.push(\n          this.readFeatureFromObject(geoJSONFeatures[i], opt_options)\n        );\n      }\n    } else {\n      features = [this.readFeatureFromObject(object, opt_options)];\n    }\n    return features;\n  }\n\n  /**\n   * @param {GeoJSONGeometry} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  readGeometryFromObject(obj
 ect, opt_options) {\n    return readGeometry(object, opt_options);\n  }\n\n  /**\n   * @param {Object} object Object.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  readProjectionFromObject(object) {\n    const crs = object['crs'];\n    let projection;\n    if (crs) {\n      if (crs['type'] == 'name') {\n        projection = getProjection(crs['properties']['name']);\n      } else if (crs['type'] === 'EPSG') {\n        projection = getProjection('EPSG:' + crs['properties']['code']);\n      } else {\n        assert(false, 36); // Unknown SRS type\n      }\n    } else {\n      projection = this.dataProjection;\n    }\n    return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n  }\n\n  /**\n   * Encode a feature as a GeoJSON Feature object.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {GeoJSONF
 eature} Object.\n   * @api\n   */\n  writeFeatureObject(feature, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n\n    /** @type {GeoJSONFeature} */\n    const object = {\n      'type': 'Feature',\n      geometry: null,\n      properties: null,\n    };\n\n    const id = feature.getId();\n    if (id !== undefined) {\n      object.id = id;\n    }\n\n    if (!feature.hasProperties()) {\n      return object;\n    }\n\n    const properties = feature.getProperties();\n    const geometry = feature.getGeometry();\n    if (geometry) {\n      object.geometry = writeGeometry(geometry, opt_options);\n\n      delete properties[feature.getGeometryName()];\n    }\n\n    if (!isEmpty(properties)) {\n      object.properties = properties;\n    }\n\n    return object;\n  }\n\n  /**\n   * Encode an array of features as a GeoJSON object.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Wr
 ite options.\n   * @return {GeoJSONFeatureCollection} GeoJSON Object.\n   * @api\n   */\n  writeFeaturesObject(features, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    const objects = [];\n    for (let i = 0, ii = features.length; i < ii; ++i) {\n      objects.push(this.writeFeatureObject(features[i], opt_options));\n    }\n    return {\n      type: 'FeatureCollection',\n      features: objects,\n    };\n  }\n\n  /**\n   * Encode a geometry as a GeoJSON object.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n   * @api\n   */\n  writeGeometryObject(geometry, opt_options) {\n    return writeGeometry(geometry, this.adaptOptions(opt_options));\n  }\n}\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_optio
 ns Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n  if (!object) {\n    return null;\n  }\n\n  /**\n   * @type {import(\"../geom/Geometry.js\").default}\n   */\n  let geometry;\n  switch (object['type']) {\n    case GeometryType.POINT: {\n      geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n      break;\n    }\n    case GeometryType.LINE_STRING: {\n      geometry = readLineStringGeometry(\n        /** @type {GeoJSONLineString} */ (object)\n      );\n      break;\n    }\n    case GeometryType.POLYGON: {\n      geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n      break;\n    }\n    case GeometryType.MULTI_POINT: {\n      geometry = readMultiPointGeometry(\n        /** @type {GeoJSONMultiPoint} */ (object)\n      );\n      break;\n    }\n    case GeometryType.MULTI_LINE_STRING: {\n      geometry = readMultiLineStringGeometry(\n        /** @type {GeoJSONMult
 iLineString} */ (object)\n      );\n      break;\n    }\n    case GeometryType.MULTI_POLYGON: {\n      geometry = readMultiPolygonGeometry(\n        /** @type {GeoJSONMultiPolygon} */ (object)\n      );\n      break;\n    }\n    case GeometryType.GEOMETRY_COLLECTION: {\n      geometry = readGeometryCollectionGeometry(\n        /** @type {GeoJSONGeometryCollection} */ (object)\n      );\n      break;\n    }\n    default: {\n      throw new Error('Unsupported GeoJSON type: ' + object.type);\n    }\n  }\n  return transformGeometryWithOptions(geometry, false, opt_options);\n}\n\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, opt_options) {\n  const geometries = object['geometries'].map(\n    /**\n     * @param {GeoJSONGeometry} geometry Geometry.\n     * @return {import(\"../geom/Geometry.js\")
 .default} geometry Geometry.\n     */\n    function (geometry) {\n      return readGeometry(geometry, opt_options);\n    }\n  );\n  return new GeometryCollection(geometries);\n}\n\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n  return new Point(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n  return new LineString(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n  return new MultiLineString(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n  return new MultiPoint(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * 
 @return {MultiPolygon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n  return new MultiPolygon(object['coordinates']);\n}\n\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n  return new Polygon(object['coordinates']);\n}\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n  geometry = transformGeometryWithOptions(geometry, true, opt_options);\n  const type = geometry.getType();\n\n  /** @type {GeoJSONGeometry} */\n  let geoJSON;\n  switch (type) {\n    case GeometryType.POINT: {\n      geoJSON = writePointGeometry(\n        /** @type {Point} */ (geometry),\n        opt_options\n      );\n      break;\n    }\n    case GeometryType.LINE_STRING: {\n      geoJSON = writeLineStringGeometry
 (\n        /** @type {LineString} */ (geometry),\n        opt_options\n      );\n      break;\n    }\n    case GeometryType.POLYGON: {\n      geoJSON = writePolygonGeometry(\n        /** @type {Polygon} */ (geometry),\n        opt_options\n      );\n      break;\n    }\n    case GeometryType.MULTI_POINT: {\n      geoJSON = writeMultiPointGeometry(\n        /** @type {MultiPoint} */ (geometry),\n        opt_options\n      );\n      break;\n    }\n    case GeometryType.MULTI_LINE_STRING: {\n      geoJSON = writeMultiLineStringGeometry(\n        /** @type {MultiLineString} */ (geometry),\n        opt_options\n      );\n      break;\n    }\n    case GeometryType.MULTI_POLYGON: {\n      geoJSON = writeMultiPolygonGeometry(\n        /** @type {MultiPolygon} */ (geometry),\n        opt_options\n      );\n      break;\n    }\n    case GeometryType.GEOMETRY_COLLECTION: {\n      geoJSON = writeGeometryCollectionGeometry(\n        /** @type {GeometryCollection} */ (geometry),\n        opt_opti
 ons\n      );\n      break;\n    }\n    case GeometryType.CIRCLE: {\n      geoJSON = {\n        type: 'GeometryCollection',\n        geometries: [],\n      };\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return geoJSON;\n}\n\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, opt_options) {\n  const geometries = geometry.getGeometriesArray().map(function (geometry) {\n    const options = assign({}, opt_options);\n    delete options.featureProjection;\n    return writeGeometry(geometry, options);\n  });\n  return {\n    type: 'GeometryCollection',\n    geometries: geometries,\n  };\n}\n\n/**\n * @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.
 \n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n  return {\n    type: 'LineString',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, opt_options) {\n  return {\n    type: 'MultiLineString',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n  return {\n    type: 'MultiPoint',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_option
 s Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n  let right;\n  if (opt_options) {\n    right = opt_options.rightHanded;\n  }\n  return {\n    type: 'MultiPolygon',\n    coordinates: geometry.getCoordinates(right),\n  };\n}\n\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n  return {\n    type: 'Point',\n    coordinates: geometry.getCoordinates(),\n  };\n}\n\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, opt_options) {\n  let right;\n  if (opt_options) {\n    right = opt_options.rightHanded;\n  }\n  return {\n    type: 'Polygon',\n    coordinates: geomet
 ry.getCoordinates(right),\n  };\n}\n\nexport default GeoJSON;\n","/**\n * @module ol/format/MVT\n */\n//FIXME Implement projection handling\n\nimport FeatureFormat, {transformGeometryWithOptions} from './Feature.js';\nimport FormatType from './FormatType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport PBF from 'pbf';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Projection from '../proj/Projection.js';\nimport RenderFeature from '../render/Feature.js';\nimport Units from '../proj/Units.js';\nimport {assert} from '../asserts.js';\nimport {get} from '../proj.js';\nimport {linearRingIsClockwise} from '../geom/flat/orient.js';\n\n/**\n * @typedef {Object} Options\
 n * @property {import(\"../Feature.js\").FeatureClass} [featureClass] Class for features returned by\n * {@link module:ol/format/MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry\n * support at the cost of decreased rendering performance. The default is\n * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.\n * @property {string} [geometryName='geometry'] Geometry name to use when creating features.\n * @property {string} [layerName='layer'] Name of the feature attribute that holds the layer name.\n * @property {Array<string>} [layers] Layers to read features from. If not provided, features will be read from all\n * @property {string} [idProperty] Optional property that will be assigned as the feature id and removed from the properties.\n * layers.\n */\n\n/**\n * @classdesc\n * Feature format for reading data in the Mapbox MVT format.\n *\n * @param {Options=} opt_options Options.\n * @api\n
  */\nclass MVT extends FeatureFormat {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    super();\n\n    const options = opt_options ? opt_options : {};\n\n    /**\n     * @type {Projection}\n     */\n    this.dataProjection = new Projection({\n      code: '',\n      units: Units.TILE_PIXELS,\n    });\n\n    /**\n     * @private\n     * @type {import(\"../Feature.js\").FeatureClass}\n     */\n    this.featureClass_ = options.featureClass\n      ? options.featureClass\n      : RenderFeature;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.layerName_ = options.layerName ? options.layerName : 'layer';\n\n    /**\n     * @private\n     * @type {Array<string>}\n     */\n    this.layers_ = options.layers ? options.layers : null;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.idProperty
 _ = options.idProperty;\n  }\n\n  /**\n   * Read the raw geometry from the pbf offset stored in a raw feature's geometry\n   * property.\n   * @param {PBF} pbf PBF.\n   * @param {Object} feature Raw feature.\n   * @param {Array<number>} flatCoordinates Array to store flat coordinates in.\n   * @param {Array<number>} ends Array to store ends in.\n   * @private\n   */\n  readRawGeometry_(pbf, feature, flatCoordinates, ends) {\n    pbf.pos = feature.geometry;\n\n    const end = pbf.readVarint() + pbf.pos;\n    let cmd = 1;\n    let length = 0;\n    let x = 0;\n    let y = 0;\n    let coordsLen = 0;\n    let currentEnd = 0;\n\n    while (pbf.pos < end) {\n      if (!length) {\n        const cmdLen = pbf.readVarint();\n        cmd = cmdLen & 0x7;\n        length = cmdLen >> 3;\n      }\n\n      length--;\n\n      if (cmd === 1 || cmd === 2) {\n        x += pbf.readSVarint();\n        y += pbf.readSVarint();\n\n        if (cmd === 1) {\n          // moveTo\n          if (coordsLen > curre
 ntEnd) {\n            ends.push(coordsLen);\n            currentEnd = coordsLen;\n          }\n        }\n\n        flatCoordinates.push(x, y);\n        coordsLen += 2;\n      } else if (cmd === 7) {\n        if (coordsLen > currentEnd) {\n          // close polygon\n          flatCoordinates.push(\n            flatCoordinates[currentEnd],\n            flatCoordinates[currentEnd + 1]\n          );\n          coordsLen += 2;\n        }\n      } else {\n        assert(false, 59); // Invalid command found in the PBF\n      }\n    }\n\n    if (coordsLen > currentEnd) {\n      ends.push(coordsLen);\n      currentEnd = coordsLen;\n    }\n  }\n\n  /**\n   * @private\n   * @param {PBF} pbf PBF\n   * @param {Object} rawFeature Raw Mapbox feature.\n   * @param {import(\"./Feature.js\").ReadOptions} options Read options.\n   * @return {import(\"../Feature.js\").FeatureLike} Feature.\n   */\n  createFeature_(pbf, rawFeature, options) {\n    const type = rawFeature.type;\n    if (type === 0) {\n
       return null;\n    }\n\n    let feature;\n    const values = rawFeature.properties;\n\n    let id;\n    if (!this.idProperty_) {\n      id = rawFeature.id;\n    } else {\n      id = values[this.idProperty_];\n      delete values[this.idProperty_];\n    }\n\n    values[this.layerName_] = rawFeature.layer.name;\n\n    const flatCoordinates = [];\n    const ends = [];\n    this.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);\n\n    const geometryType = getGeometryType(type, ends.length);\n\n    if (this.featureClass_ === RenderFeature) {\n      feature = new this.featureClass_(\n        geometryType,\n        flatCoordinates,\n        ends,\n        values,\n        id\n      );\n      feature.transform(options.dataProjection, options.featureProjection);\n    } else {\n      let geom;\n      if (geometryType == GeometryType.POLYGON) {\n        const endss = [];\n        let offset = 0;\n        let prevEndIndex = 0;\n        for (let i = 0, ii = ends.length; i < ii; ++i)
  {\n          const end = ends[i];\n          // classifies an array of rings into polygons with outer rings and holes\n          if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n            endss.push(ends.slice(prevEndIndex, i + 1));\n          } else {\n            if (endss.length === 0) {\n              continue;\n            }\n            endss[endss.length - 1].push(ends[prevEndIndex]);\n          }\n          prevEndIndex = i + 1;\n          offset = end;\n        }\n        if (endss.length > 1) {\n          geom = new MultiPolygon(flatCoordinates, GeometryLayout.XY, endss);\n        } else {\n          geom = new Polygon(flatCoordinates, GeometryLayout.XY, ends);\n        }\n      } else {\n        geom =\n          geometryType === GeometryType.POINT\n            ? new Point(flatCoordinates, GeometryLayout.XY)\n            : geometryType === GeometryType.LINE_STRING\n            ? new LineString(flatCoordinates, GeometryLayout.XY)\n            : geometryTy
 pe === GeometryType.POLYGON\n            ? new Polygon(flatCoordinates, GeometryLayout.XY, ends)\n            : geometryType === GeometryType.MULTI_POINT\n            ? new MultiPoint(flatCoordinates, GeometryLayout.XY)\n            : geometryType === GeometryType.MULTI_LINE_STRING\n            ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends)\n            : null;\n      }\n      const ctor = /** @type {typeof import(\"../Feature.js\").default} */ (this\n        .featureClass_);\n      feature = new ctor();\n      if (this.geometryName_) {\n        feature.setGeometryName(this.geometryName_);\n      }\n      const geometry = transformGeometryWithOptions(geom, false, options);\n      feature.setGeometry(geometry);\n      feature.setId(id);\n      feature.setProperties(values, true);\n    }\n\n    return feature;\n  }\n\n  /**\n   * @return {import(\"./FormatType.js\").default} Format.\n   */\n  getType() {\n    return FormatType.ARRAY_BUFFER;\n  }\n\n  /**\n   * Read al
 l features.\n   *\n   * @param {ArrayBuffer} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n   * @api\n   */\n  readFeatures(source, opt_options) {\n    const layers = this.layers_;\n    const options = /** @type {import(\"./Feature.js\").ReadOptions} */ (this.adaptOptions(\n      opt_options\n    ));\n    const dataProjection = get(options.dataProjection);\n    dataProjection.setWorldExtent(options.extent);\n    options.dataProjection = dataProjection;\n\n    const pbf = new PBF(/** @type {ArrayBuffer} */ (source));\n    const pbfLayers = pbf.readFields(layersPBFReader, {});\n    const features = [];\n    for (const name in pbfLayers) {\n      if (layers && layers.indexOf(name) == -1) {\n        continue;\n      }\n      const pbfLayer = pbfLayers[name];\n\n      const extent = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;\n      dataProjection.setExt
 ent(extent);\n\n      for (let i = 0, ii = pbfLayer.length; i < ii; ++i) {\n        const rawFeature = readRawFeature(pbf, pbfLayer, i);\n        features.push(this.createFeature_(pbf, rawFeature, options));\n      }\n    }\n\n    return features;\n  }\n\n  /**\n   * Read the projection from the source.\n   *\n   * @param {Document|Element|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   */\n  readProjection(source) {\n    return this.dataProjection;\n  }\n\n  /**\n   * Sets the layers that features will be read from.\n   * @param {Array<string>} layers Layers.\n   * @api\n   */\n  setLayers(layers) {\n    this.layers_ = layers;\n  }\n}\n\n/**\n * Reader callback for parsing layers.\n * @param {number} tag The tag.\n * @param {Object} layers The layers object.\n * @param {PBF} pbf The PBF.\n */\nfunction layersPBFReader(tag, layers, pbf) {\n  if (tag === 3) {\n    const layer = {\n      keys: [],\n      values: [],\n 
      features: [],\n    };\n    const end = pbf.readVarint() + pbf.pos;\n    pbf.readFields(layerPBFReader, layer, end);\n    layer.length = layer.features.length;\n    if (layer.length) {\n      layers[layer.name] = layer;\n    }\n  }\n}\n\n/**\n * Reader callback for parsing layer.\n * @param {number} tag The tag.\n * @param {Object} layer The layer object.\n * @param {PBF} pbf The PBF.\n */\nfunction layerPBFReader(tag, layer, pbf) {\n  if (tag === 15) {\n    layer.version = pbf.readVarint();\n  } else if (tag === 1) {\n    layer.name = pbf.readString();\n  } else if (tag === 5) {\n    layer.extent = pbf.readVarint();\n  } else if (tag === 2) {\n    layer.features.push(pbf.pos);\n  } else if (tag === 3) {\n    layer.keys.push(pbf.readString());\n  } else if (tag === 4) {\n    let value = null;\n    const end = pbf.readVarint() + pbf.pos;\n    while (pbf.pos < end) {\n      tag = pbf.readVarint() >> 3;\n      value =\n        tag === 1\n          ? pbf.readString()\n          : ta
 g === 2\n          ? pbf.readFloat()\n          : tag === 3\n          ? pbf.readDouble()\n          : tag === 4\n          ? pbf.readVarint64()\n          : tag === 5\n          ? pbf.readVarint()\n          : tag === 6\n          ? pbf.readSVarint()\n          : tag === 7\n          ? pbf.readBoolean()\n          : null;\n    }\n    layer.values.push(value);\n  }\n}\n\n/**\n * Reader callback for parsing feature.\n * @param {number} tag The tag.\n * @param {Object} feature The feature object.\n * @param {PBF} pbf The PBF.\n */\nfunction featurePBFReader(tag, feature, pbf) {\n  if (tag == 1) {\n    feature.id = pbf.readVarint();\n  } else if (tag == 2) {\n    const end = pbf.readVarint() + pbf.pos;\n    while (pbf.pos < end) {\n      const key = feature.layer.keys[pbf.readVarint()];\n      const value = feature.layer.values[pbf.readVarint()];\n      feature.properties[key] = value;\n    }\n  } else if (tag == 3) {\n    feature.type = pbf.readVarint();\n  } else if (tag == 4) {\n   
  feature.geometry = pbf.pos;\n  }\n}\n\n/**\n * Read a raw feature from the pbf offset stored at index `i` in the raw layer.\n * @param {PBF} pbf PBF.\n * @param {Object} layer Raw layer.\n * @param {number} i Index of the feature in the raw layer's `features` array.\n * @return {Object} Raw feature.\n */\nfunction readRawFeature(pbf, layer, i) {\n  pbf.pos = layer.features[i];\n  const end = pbf.readVarint() + pbf.pos;\n\n  const feature = {\n    layer: layer,\n    type: 0,\n    properties: {},\n  };\n  pbf.readFields(featurePBFReader, feature, end);\n  return feature;\n}\n\n/**\n * @param {number} type The raw feature's geometry type\n * @param {number} numEnds Number of ends of the flat coordinates of the\n * geometry.\n * @return {import(\"../geom/GeometryType.js\").default} The geometry type.\n */\nfunction getGeometryType(type, numEnds) {\n  /** @type {import(\"../geom/GeometryType.js\").default} */\n  let geometryType;\n  if (type === 1) {\n    geometryType =\n      numEnds =
 == 1 ? GeometryType.POINT : GeometryType.MULTI_POINT;\n  } else if (type === 2) {\n    geometryType =\n      numEnds === 1 ? GeometryType.LINE_STRING : GeometryType.MULTI_LINE_STRING;\n  } else if (type === 3) {\n    geometryType = GeometryType.POLYGON;\n    // MultiPolygon not relevant for rendering - winding order determines\n    // outer rings of polygons.\n  }\n  return geometryType;\n}\n\nexport default MVT;\n","/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  PRELOAD: 'preload',\n  USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n","/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport SourceState from '../source/State.js';\nimport {abstract} from '../util.js';\n\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nclass LayerRenderer extends Observable {\n  /**\n   * @par
 am {LayerType} layer Layer.\n   */\n  constructor(layer) {\n    super();\n\n    /** @private */\n    this.boundHandleImageChange_ = this.handleImageChange_.bind(this);\n\n    /**\n     * @protected\n     * @type {LayerType}\n     */\n    this.layer_ = layer;\n  }\n\n  /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n   * an array of features.\n   */\n  getFeatures(pixel) {\n    return abstract();\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @abstract\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */\n  prepareFrame(frameState) {\n    return abstract();\n  }\n\n  /**\n   * Render the layer.\n   * @abstract\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Ta
 rget that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */\n  renderFrame(frameState, target) {\n    return abstract();\n  }\n\n  /**\n   * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n   * @param {number} zoom Zoom level.\n   * @param {import(\"../Tile.js\").default} tile Tile.\n   * @return {boolean|void} If `false`, the tile will not be considered loaded.\n   */\n  loadedTileCallback(tiles, zoom, tile) {\n    if (!tiles[zoom]) {\n      tiles[zoom] = {};\n    }\n    tiles[zoom][tile.tileCoord.toString()] = tile;\n    return undefined;\n  }\n\n  /**\n   * Create a function that adds loaded tiles to the tile lookup.\n   * @param {import(\"../source/Tile.js\").default} source Tile source.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n   * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of
  loaded tiles by zoom level.\n   * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n   *     called with a zoom level and a tile range to add loaded tiles to the lookup.\n   * @protected\n   */\n  createLoadedTileFinder(source, projection, tiles) {\n    return (\n      /**\n       * @param {number} zoom Zoom level.\n       * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n       * @return {boolean} The tile range is fully loaded.\n       * @this {LayerRenderer}\n       */\n      function (zoom, tileRange) {\n        const callback = this.loadedTileCallback.bind(this, tiles, zoom);\n        return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n      }.bind(this)\n    );\n  }\n  /**\n   * @abstract\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit toleran
 ce in pixels.\n   * @param {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default): T} callback Feature callback.\n   * @param {Array<import(\"../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n   * @return {T|void} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    callback,\n    declutteredFeatures\n  ) {}\n\n  /**\n   * @abstract\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n   *    location, null will be returned.  If there is data, but pixel values cannot be\n   *    returned, and empty array will be returned.\n   */\n  getDataAtPixel(pixel, frameState, hitTolerance) {\n    return abstract();\n  }\n\n  /**
 \n   * @return {LayerType} Layer.\n   */\n  getLayer() {\n    return this.layer_;\n  }\n\n  /**\n   * Perform action necessary to get the layer rendered after new fonts have loaded\n   * @abstract\n   */\n  handleFontsChanged() {}\n\n  /**\n   * Handle changes in image state.\n   * @param {import(\"../events/Event.js\").default} event Image change event.\n   * @private\n   */\n  handleImageChange_(event) {\n    const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n    if (image.getState() === ImageState.LOADED) {\n      this.renderIfReadyAndVisible();\n    }\n  }\n\n  /**\n   * Load the image if not already loaded, and register the image change\n   * listener if needed.\n   * @param {import(\"../ImageBase.js\").default} image Image.\n   * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n   * @protected\n   */\n  loadImage(image) {\n    let imageState = image.getState();\n    if (imageState != ImageState.LOADED && imageState != Imag
 eState.ERROR) {\n      image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n    }\n    if (imageState == ImageState.IDLE) {\n      image.load();\n      imageState = image.getState();\n    }\n    return imageState == ImageState.LOADED;\n  }\n\n  /**\n   * @protected\n   */\n  renderIfReadyAndVisible() {\n    const layer = this.getLayer();\n    if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n      layer.changed();\n    }\n  }\n}\n\nexport default LayerRenderer;\n","/**\n * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n  create as createTransform,\n} from '../../transform.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {\n  getBottomLeft,\n  getBottomRight,\n  getTopLeft,\n  getTopRight,\n} from '../../extent.js';
 \nimport {rotateAtOffset} from '../../render/canvas.js';\n\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nclass CanvasLayerRenderer extends LayerRenderer {\n  /**\n   * @param {LayerType} layer Layer.\n   */\n  constructor(layer) {\n    super(layer);\n\n    /**\n     * @protected\n     * @type {HTMLElement}\n     */\n    this.container = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedResolution;\n\n    /**\n     * A temporary transform.  The values in this transform should only be used in a\n     * function that sets the values.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tempTransform = createTransform();\n\n    /**\n     * The transform for rendered pixels to viewport CSS pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.j
 s\").Transform}\n     */\n    this.pixelTransform = createTransform();\n\n    /**\n     * The transform for viewport CSS pixels to rendered pixels.  This transform must\n     * be set when rendering a frame and may be used by other functions after rendering.\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.inversePixelTransform = createTransform();\n\n    /**\n     * @type {CanvasRenderingContext2D}\n     */\n    this.context = null;\n\n    /**\n     * @type {boolean}\n     */\n    this.containerReused = false;\n  }\n\n  /**\n   * Get a rendering container from an existing target, if compatible.\n   * @param {HTMLElement} target Potential render target.\n   * @param {string} transform CSS Transform.\n   * @param {number} opacity Opacity.\n   */\n  useContainer(target, transform, opacity) {\n    const layerClassName = this.getLayer().getClassName();\n    let container, context;\n    if (\n      target &&\n      target.style.opacity === ''
  &&\n      target.className === layerClassName\n    ) {\n      const canvas = target.firstElementChild;\n      if (canvas instanceof HTMLCanvasElement) {\n        context = canvas.getContext('2d');\n      }\n    }\n    if (\n      context &&\n      (context.canvas.width === 0 ||\n        context.canvas.style.transform === transform)\n    ) {\n      // Container of the previous layer renderer can be used.\n      this.container = target;\n      this.context = context;\n      this.containerReused = true;\n    } else if (this.containerReused) {\n      // Previously reused container cannot be used any more.\n      this.container = null;\n      this.context = null;\n      this.containerReused = false;\n    }\n    if (!this.container) {\n      container = document.createElement('div');\n      container.className = layerClassName;\n      let style = container.style;\n      style.position = 'absolute';\n      style.width = '100%';\n      style.height = '100%';\n      context = createCanvasCo
 ntext2D();\n      const canvas = context.canvas;\n      container.appendChild(canvas);\n      style = canvas.style;\n      style.position = 'absolute';\n      style.left = '0';\n      style.transformOrigin = 'top left';\n      this.container = container;\n      this.context = context;\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n   * @protected\n   */\n  clip(context, frameState, extent) {\n    const pixelRatio = frameState.pixelRatio;\n    const halfWidth = (frameState.size[0] * pixelRatio) / 2;\n    const halfHeight = (frameState.size[1] * pixelRatio) / 2;\n    const rotation = frameState.viewState.rotation;\n    const topLeft = getTopLeft(extent);\n    const topRight = getTopRight(extent);\n    const bottomRight = getBottomRight(extent);\n    const bottomLeft = getBottomLeft(extent);\n\n    appl
 yTransform(frameState.coordinateToPixelTransform, topLeft);\n    applyTransform(frameState.coordinateToPixelTransform, topRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n    context.save();\n    rotateAtOffset(context, -rotation, halfWidth, halfHeight);\n    context.beginPath();\n    context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);\n    context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);\n    context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);\n    context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);\n    context.clip();\n    rotateAtOffset(context, rotation, halfWidth, halfHeight);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent Clip extent.\
 n   * @protected\n   */\n  clipUnrotated(context, frameState, extent) {\n    const topLeft = getTopLeft(extent);\n    const topRight = getTopRight(extent);\n    const bottomRight = getBottomRight(extent);\n    const bottomLeft = getBottomLeft(extent);\n\n    applyTransform(frameState.coordinateToPixelTransform, topLeft);\n    applyTransform(frameState.coordinateToPixelTransform, topRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n    const inverted = this.inversePixelTransform;\n    applyTransform(inverted, topLeft);\n    applyTransform(inverted, topRight);\n    applyTransform(inverted, bottomRight);\n    applyTransform(inverted, bottomLeft);\n\n    context.save();\n    context.beginPath();\n    context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n    context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n    context.lineTo(Math.round(bottomRight[0]), Ma
 th.round(bottomRight[1]));\n    context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n    context.clip();\n  }\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  dispatchRenderEvent_(type, context, frameState) {\n    const layer = this.getLayer();\n    if (layer.hasListener(type)) {\n      const event = new RenderEvent(\n        type,\n        this.inversePixelTransform,\n        frameState,\n        context\n      );\n      layer.dispatchEvent(event);\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  preRender(context, frameState) {\n    this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n  }\n\n  /**\n   *
  @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  postRender(context, frameState) {\n    this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n  }\n\n  /**\n   * Creates a transform for rendering to an element that will be rotated after rendering.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} width Width of the rendered element (in pixels).\n   * @param {number} height Height of the rendered element (in pixels).\n   * @param {number} offsetX Offset on the x-axis in view coordinates.\n   * @protected\n   * @return {!import(\"../../transform.js\").Transform} Transform.\n   */\n  getRenderTransform(\n    center,\n    resolution,\n    rotation,\n    pixelRatio,\n    width,\n 
    height,\n    offsetX\n  ) {\n    const dx1 = width / 2;\n    const dy1 = height / 2;\n    const sx = pixelRatio / resolution;\n    const sy = -sx;\n    const dx2 = -center[0] + offsetX;\n    const dy2 = -center[1];\n    return composeTransform(\n      this.tempTransform,\n      dx1,\n      dy1,\n      sx,\n      sy,\n      -rotation,\n      dx2,\n      dy2\n    );\n  }\n\n  /**\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n   *    location, null will be returned.  If there is data, but pixel values cannot be\n   *    returned, and empty array will be returned.\n   */\n  getDataAtPixel(pixel, frameState, hitTolerance) {\n    const renderPixel = applyTransform(\n      this.inversePixelTransform,\n      pixel.slice()\n    );\n    const c
 ontext = this.context;\n\n    let data;\n    try {\n      const x = Math.round(renderPixel[0]);\n      const y = Math.round(renderPixel[1]);\n      const newCanvas = document.createElement('canvas');\n      const newContext = newCanvas.getContext('2d');\n      newCanvas.width = 1;\n      newCanvas.height = 1;\n      newContext.clearRect(0, 0, 1, 1);\n      newContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n      data = newContext.getImageData(0, 0, 1, 1).data;\n    } catch (err) {\n      if (err.name === 'SecurityError') {\n        // tainted canvas, we assume there is data at the given pixel (although there might not be)\n        return new Uint8Array();\n      }\n      return data;\n    }\n\n    if (data[3] === 0) {\n      return null;\n    }\n    return data;\n  }\n}\n\nexport default CanvasLayerRenderer;\n","/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport TileRange from '../../TileRange.js';\nimport TileState f
 rom '../../TileState.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n  makeInverse,\n} from '../../transform.js';\nimport {assign} from '../../obj.js';\nimport {\n  createEmpty,\n  equals,\n  getIntersection,\n  getTopLeft,\n} from '../../extent.js';\nimport {createTransformString} from '../../render/canvas.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {getUid} from '../../util.js';\nimport {numberSafeCompareFunction} from '../../array.js';\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nclass CanvasTileLayerRenderer extends CanvasLayerRenderer {\n  /**\n   * @param {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} tileLayer Tile layer.\n   */\n  constructor(tileLayer) {\n    super(tileLayer);\n\n    /**\n     * Rendered extent has changed since the previous `renderFrame()` call\n     * @type {boolean}\n     */\n    this.extentChanged = true;\n\n    /**\n     * @private\n     * 
 @type {?import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedPixelRatio;\n\n    /**\n     * @protected\n     * @type {import(\"../../proj/Projection.js\").default}\n     */\n    this.renderedProjection = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedRevision;\n\n    /**\n     * @protected\n     * @type {!Array<import(\"../../Tile.js\").default>}\n     */\n    this.renderedTiles = [];\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.newTiles_ = false;\n\n    /**\n     * @protected\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.tmpExtent = createEmpty();\n\n    /**\n     * @private\n     * @type {import(\"../../TileRange.js\").default}\n     */\n    this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n  }\n\n  /**\n   * @protected\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @retu
 rn {boolean} Tile is drawable.\n   */\n  isDrawableTile(tile) {\n    const tileLayer = this.getLayer();\n    const tileState = tile.getState();\n    const useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n    return (\n      tileState == TileState.LOADED ||\n      tileState == TileState.EMPTY ||\n      (tileState == TileState.ERROR && !useInterimTilesOnError)\n    );\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {!import(\"../../Tile.js\").default} Tile.\n   */\n  getTile(z, x, y, frameState) {\n    const pixelRatio = frameState.pixelRatio;\n    const projection = frameState.viewState.projection;\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getSource();\n    let tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n    if (tile.getState() ==
  TileState.ERROR) {\n      if (!tileLayer.getUseInterimTilesOnError()) {\n        // When useInterimTilesOnError is false, we consider the error tile as loaded.\n        tile.setState(TileState.LOADED);\n      } else if (tileLayer.getPreload() > 0) {\n        // Preloaded tiles for lower resolutions might have finished loading.\n        this.newTiles_ = true;\n      }\n    }\n    if (!this.isDrawableTile(tile)) {\n      tile = tile.getInterimTile();\n    }\n    return tile;\n  }\n\n  /**\n   * @param {Object<number, Object<string, import(\"../../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n   * @param {number} zoom Zoom level.\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @return {boolean|void} If `false`, the tile will not be considered loaded.\n   */\n  loadedTileCallback(tiles, zoom, tile) {\n    if (this.isDrawableTile(tile)) {\n      return super.loadedTileCallback(tiles, zoom, tile);\n    }\n    return false;\n  }\n\n  /**\n   * Determ
 ine whether render should be called.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */\n  prepareFrame(frameState) {\n    return !!this.getLayer().getSource();\n  }\n\n  /**\n   * Render the layer.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */\n  renderFrame(frameState, target) {\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n    const viewState = frameState.viewState;\n    const projection = viewState.projection;\n    const viewResolution = viewState.resolution;\n    const viewCenter = viewState.center;\n    const rotation = viewState.rotation;\n    const pixelRatio = frameState.pixelRatio;\n\n    const tileLayer = this.getLayer();\n    const tileSource = tileLayer.getSource();\n    con
 st sourceRevision = tileSource.getRevision();\n    const tileGrid = tileSource.getTileGridForProjection(projection);\n    const z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n    const tileResolution = tileGrid.getResolution(z);\n\n    let extent = frameState.extent;\n    const layerExtent =\n      layerState.extent && fromUserExtent(layerState.extent, projection);\n    if (layerExtent) {\n      extent = getIntersection(\n        extent,\n        fromUserExtent(layerState.extent, projection)\n      );\n    }\n\n    const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n\n    // desired dimensions of the canvas in pixels\n    let width = Math.round(frameState.size[0] * tilePixelRatio);\n    let height = Math.round(frameState.size[1] * tilePixelRatio);\n\n    if (rotation) {\n      const size = Math.round(Math.sqrt(width * width + height * height));\n      width = size;\n      height = size;\n    }\n\n    const dx = (tileResolution * width) / 2 / ti
 lePixelRatio;\n    const dy = (tileResolution * height) / 2 / tilePixelRatio;\n    const canvasExtent = [\n      viewCenter[0] - dx,\n      viewCenter[1] - dy,\n      viewCenter[0] + dx,\n      viewCenter[1] + dy,\n    ];\n\n    const tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n\n    /**\n     * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n     */\n    const tilesToDrawByZ = {};\n    tilesToDrawByZ[z] = {};\n\n    const findLoadedTiles = this.createLoadedTileFinder(\n      tileSource,\n      projection,\n      tilesToDrawByZ\n    );\n\n    const tmpExtent = this.tmpExtent;\n    const tmpTileRange = this.tmpTileRange_;\n    this.newTiles_ = false;\n    for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n      for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n        const tile = this.getTile(z, x, y, frameState);\n        if (this.isDrawableTile(tile)) {\n          const uid = getUid(this);\n          if (tile.getState() == 
 TileState.LOADED) {\n            tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n            const inTransition = tile.inTransition(uid);\n            if (\n              !this.newTiles_ &&\n              (inTransition || this.renderedTiles.indexOf(tile) === -1)\n            ) {\n              this.newTiles_ = true;\n            }\n          }\n          if (tile.getAlpha(uid, frameState.time) === 1) {\n            // don't look for alt tiles if alpha is 1\n            continue;\n          }\n        }\n\n        const childTileRange = tileGrid.getTileCoordChildTileRange(\n          tile.tileCoord,\n          tmpTileRange,\n          tmpExtent\n        );\n\n        let covered = false;\n        if (childTileRange) {\n          covered = findLoadedTiles(z + 1, childTileRange);\n        }\n        if (!covered) {\n          tileGrid.forEachTileCoordParentTileRange(\n            tile.tileCoord,\n            findLoadedTiles,\n            tmpTileRange,\n            tmpExtent\n    
       );\n        }\n      }\n    }\n\n    const canvasScale = tileResolution / viewResolution;\n\n    // set forward and inverse pixel transforms\n    composeTransform(\n      this.pixelTransform,\n      frameState.size[0] / 2,\n      frameState.size[1] / 2,\n      1 / tilePixelRatio,\n      1 / tilePixelRatio,\n      rotation,\n      -width / 2,\n      -height / 2\n    );\n\n    const canvasTransform = createTransformString(this.pixelTransform);\n\n    this.useContainer(target, canvasTransform, layerState.opacity);\n    const context = this.context;\n    const canvas = context.canvas;\n\n    makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n    // set scale transform for calculating tile positions on the canvas\n    composeTransform(\n      this.tempTransform,\n      width / 2,\n      height / 2,\n      canvasScale,\n      canvasScale,\n      0,\n      -width / 2,\n      -height / 2\n    );\n\n    if (canvas.width != width || canvas.height != height) {\n      canvas
 .width = width;\n      canvas.height = height;\n    } else if (!this.containerReused) {\n      context.clearRect(0, 0, width, height);\n    }\n\n    if (layerExtent) {\n      this.clipUnrotated(context, frameState, layerExtent);\n    }\n\n    assign(context, tileSource.getContextOptions());\n    this.preRender(context, frameState);\n\n    this.renderedTiles.length = 0;\n    /** @type {Array<number>} */\n    let zs = Object.keys(tilesToDrawByZ).map(Number);\n    zs.sort(numberSafeCompareFunction);\n\n    let clips, clipZs, currentClip;\n    if (\n      layerState.opacity === 1 &&\n      (!this.containerReused ||\n        tileSource.getOpaque(frameState.viewState.projection))\n    ) {\n      zs = zs.reverse();\n    } else {\n      clips = [];\n      clipZs = [];\n    }\n    for (let i = zs.length - 1; i >= 0; --i) {\n      const currentZ = zs[i];\n      const currentTilePixelSize = tileSource.getTilePixelSize(\n        currentZ,\n        pixelRatio,\n        projection\n      );\n    
   const currentResolution = tileGrid.getResolution(currentZ);\n      const currentScale = currentResolution / tileResolution;\n      const dx = currentTilePixelSize[0] * currentScale * canvasScale;\n      const dy = currentTilePixelSize[1] * currentScale * canvasScale;\n      const originTileCoord = tileGrid.getTileCoordForCoordAndZ(\n        getTopLeft(canvasExtent),\n        currentZ\n      );\n      const originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n      const origin = applyTransform(this.tempTransform, [\n        (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n          tileResolution,\n        (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n          tileResolution,\n      ]);\n      const tileGutter =\n        tilePixelRatio * tileSource.getGutterForProjection(projection);\n      const tilesToDraw = tilesToDrawByZ[currentZ];\n      for (const tileCoordKey in tilesToDraw) {\n        const tile = /** @type {import(\"../../ImageTi
 le.js\").default} */ (tilesToDraw[\n          tileCoordKey\n        ]);\n        const tileCoord = tile.tileCoord;\n\n        // Calculate integer positions and sizes so that tiles align\n        const floatX = origin[0] - (originTileCoord[1] - tileCoord[1]) * dx;\n        const nextX = Math.round(floatX + dx);\n        const floatY = origin[1] - (originTileCoord[2] - tileCoord[2]) * dy;\n        const nextY = Math.round(floatY + dy);\n        const x = Math.round(floatX);\n        const y = Math.round(floatY);\n        const w = nextX - x;\n        const h = nextY - y;\n        const transition = z === currentZ;\n\n        const inTransition =\n          transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n        if (!inTransition) {\n          if (clips) {\n            // Clip mask for regions in this tile that already filled by a higher z tile\n            context.save();\n            currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n            for (let i =
  0, ii = clips.length; i < ii; ++i) {\n              if (z !== currentZ && currentZ < clipZs[i]) {\n                const clip = clips[i];\n                context.beginPath();\n                // counter-clockwise (outer ring) for current tile\n                context.moveTo(currentClip[0], currentClip[1]);\n                context.lineTo(currentClip[2], currentClip[3]);\n                context.lineTo(currentClip[4], currentClip[5]);\n                context.lineTo(currentClip[6], currentClip[7]);\n                // clockwise (inner ring) for higher z tile\n                context.moveTo(clip[6], clip[7]);\n                context.lineTo(clip[4], clip[5]);\n                context.lineTo(clip[2], clip[3]);\n                context.lineTo(clip[0], clip[1]);\n                context.clip();\n              }\n            }\n            clips.push(currentClip);\n            clipZs.push(currentZ);\n          } else {\n            context.clearRect(x, y, w, h);\n          }\n        }\
 n        this.drawTileImage(\n          tile,\n          frameState,\n          x,\n          y,\n          w,\n          h,\n          tileGutter,\n          transition,\n          layerState.opacity\n        );\n        if (clips && !inTransition) {\n          context.restore();\n        }\n        this.renderedTiles.push(tile);\n        this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n      }\n    }\n\n    this.renderedRevision = sourceRevision;\n    this.renderedResolution = tileResolution;\n    this.extentChanged =\n      !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n    this.renderedExtent_ = canvasExtent;\n    this.renderedPixelRatio = pixelRatio;\n    this.renderedProjection = projection;\n\n    this.manageTilePyramid(\n      frameState,\n      tileSource,\n      tileGrid,\n      pixelRatio,\n      projection,\n      extent,\n      z,\n      tileLayer.getPreload()\n    );\n    this.scheduleExpireCache(frameState, tileSource);\n\n    thi
 s.postRender(context, frameState);\n\n    if (layerState.extent) {\n      context.restore();\n    }\n\n    if (canvasTransform !== canvas.style.transform) {\n      canvas.style.transform = canvasTransform;\n    }\n\n    return this.container;\n  }\n\n  /**\n   * @param {import(\"../../ImageTile.js\").default} tile Tile.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} x Left of the tile.\n   * @param {number} y Top of the tile.\n   * @param {number} w Width of the tile.\n   * @param {number} h Height of the tile.\n   * @param {number} gutter Tile gutter.\n   * @param {boolean} transition Apply an alpha transition.\n   * @param {number} opacity Opacity.\n   */\n  drawTileImage(tile, frameState, x, y, w, h, gutter, transition, opacity) {\n    const image = this.getTileImage(tile);\n    if (!image) {\n      return;\n    }\n    const uid = getUid(this);\n    const tileAlpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n
     const alpha = opacity * tileAlpha;\n    const alphaChanged = alpha !== this.context.globalAlpha;\n    if (alphaChanged) {\n      this.context.save();\n      this.context.globalAlpha = alpha;\n    }\n    this.context.drawImage(\n      image,\n      gutter,\n      gutter,\n      image.width - 2 * gutter,\n      image.height - 2 * gutter,\n      x,\n      y,\n      w,\n      h\n    );\n\n    if (alphaChanged) {\n      this.context.restore();\n    }\n    if (tileAlpha !== 1) {\n      frameState.animate = true;\n    } else if (transition) {\n      tile.endTransition(uid);\n    }\n  }\n\n  /**\n   * @return {HTMLCanvasElement} Image\n   */\n  getImage() {\n    const context = this.context;\n    return context ? context.canvas : null;\n  }\n\n  /**\n   * Get the image from a tile.\n   * @param {import(\"../../ImageTile.js\").default} tile Tile.\n   * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n   * @protected\n   */\n  getTileImage(tile) {\n    return tile.get
 Image();\n  }\n\n  /**\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n   * @protected\n   */\n  scheduleExpireCache(frameState, tileSource) {\n    if (tileSource.canExpireCache()) {\n      /**\n       * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n       * @param {import(\"../../PluggableMap.js\").default} map Map.\n       * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n       */\n      const postRenderFunction = function (tileSource, map, frameState) {\n        const tileSourceKey = getUid(tileSource);\n        if (tileSourceKey in frameState.usedTiles) {\n          tileSource.expireCache(\n            frameState.viewState.projection,\n            frameState.usedTiles[tileSourceKey]\n          );\n        }\n      }.bind(null, tileSource);\n\n      frameState.postRenderFunctions.push(\n        /** @type 
 {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n      );\n    }\n  }\n\n  /**\n   * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n   * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n   * @param {import('../../Tile.js').default} tile Tile.\n   * @protected\n   */\n  updateUsedTiles(usedTiles, tileSource, tile) {\n    // FIXME should we use tilesToDrawByZ instead?\n    const tileSourceKey = getUid(tileSource);\n    if (!(tileSourceKey in usedTiles)) {\n      usedTiles[tileSourceKey] = {};\n    }\n    usedTiles[tileSourceKey][tile.getKey()] = true;\n  }\n\n  /**\n   * Manage tile pyramid.\n   * This function performs a number of functions related to the tiles at the\n   * current zoom and lower zoom levels:\n   * - registers idle tiles in frameState.wantedTiles so that they are not\n   *   discarded by the tile queue\n   * - enqueues missing tiles\n   * @param {import(\"../../PluggableMap.js\").Fram
 eState} frameState Frame state.\n   * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n   * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../../extent.js\").Extent} extent Extent.\n   * @param {number} currentZ Current Z.\n   * @param {number} preload Load low resolution tiles up to 'preload' levels.\n   * @param {function(import(\"../../Tile.js\").default)=} opt_tileCallback Tile callback.\n   * @protected\n   */\n  manageTilePyramid(\n    frameState,\n    tileSource,\n    tileGrid,\n    pixelRatio,\n    projection,\n    extent,\n    currentZ,\n    preload,\n    opt_tileCallback\n  ) {\n    const tileSourceKey = getUid(tileSource);\n    if (!(tileSourceKey in frameState.wantedTiles)) {\n      frameState.wantedTiles[tileSourceKey] = {};\n    }\n    const wantedTiles = frameState
 .wantedTiles[tileSourceKey];\n    const tileQueue = frameState.tileQueue;\n    const minZoom = tileGrid.getMinZoom();\n    let tileCount = 0;\n    let tile, tileRange, tileResolution, x, y, z;\n    for (z = minZoom; z <= currentZ; ++z) {\n      tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n      tileResolution = tileGrid.getResolution(z);\n      for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n        for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n          if (currentZ - z <= preload) {\n            ++tileCount;\n            tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n            if (tile.getState() == TileState.IDLE) {\n              wantedTiles[tile.getKey()] = true;\n              if (!tileQueue.isKeyQueued(tile.getKey())) {\n                tileQueue.enqueue([\n                  tile,\n                  tileSourceKey,\n                  tileGrid.getTileCoordCenter(tile.tileCoord),\n                  tileResolution,\n        
         ]);\n              }\n            }\n            if (opt_tileCallback !== undefined) {\n              opt_tileCallback(tile);\n            }\n          } else {\n            tileSource.useTile(z, x, y, projection);\n          }\n        }\n      }\n    }\n    tileSource.updateCacheSize(tileCount, projection);\n  }\n}\n\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\n\nexport default CanvasTileLayerRenderer;\n","/**\n * @module ol/layer/BaseVector\n */\nimport Layer from './Layer.js';\nimport {assign} from '../obj.js';\nimport {\n  createDefaultStyle,\n  toFunction as toStyleFunction,\n} from '../style/Style.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {i
 mport(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderO
 rder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Declut
 tering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style} for default style\n * which will be used if this is not set.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInt
 eracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n  RENDER_ORDER: 'renderOrder',\n};\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @extends {Layer<VectorSourceType>}\n * @api\n */\nclass BaseVectorLayer extends Layer {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options ? opt_options : {};\n\n    const baseOptions = assign({}, options);\n\n    delete baseOptions.style;\n    delete
  baseOptions.renderBuffer;\n    delete baseOptions.updateWhileAnimating;\n    delete baseOptions.updateWhileInteracting;\n    super(baseOptions);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.declutter_ =\n      options.declutter !== undefined ? options.declutter : false;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.renderBuffer_ =\n      options.renderBuffer !== undefined ? options.renderBuffer : 100;\n\n    /**\n     * User provided style.\n     * @type {import(\"../style/Style.js\").StyleLike}\n     * @private\n     */\n    this.style_ = null;\n\n    /**\n     * Style function for use within the library.\n     * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n     * @private\n     */\n    this.styleFunction_ = undefined;\n\n    this.setStyle(options.style);\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.updateWhileAnimating_ =\n      options.updateWhileAnimating !== undefined\n        ? optio
 ns.updateWhileAnimating\n        : false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.updateWhileInteracting_ =\n      options.updateWhileInteracting !== undefined\n        ? options.updateWhileInteracting\n        : false;\n  }\n\n  /**\n   * @return {boolean} Declutter.\n   */\n  getDeclutter() {\n    return this.declutter_;\n  }\n\n  /**\n   * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n   * that resolves with an array of features. The array will either contain the topmost feature\n   * when a hit was detected, or it will be empty.\n   *\n   * The hit detection algorithm used for this method is optimized for performance, but is less\n   * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n   * is not considered, and icons are only represented by their bounding box instead of the exact\n   * image.\n   *\n   * @param {import(\"../pixel.js\").Pixel} pixel P
 ixel.\n   * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n   * @api\n   */\n  getFeatures(pixel) {\n    return super.getFeatures(pixel);\n  }\n\n  /**\n   * @return {number|undefined} Render buffer.\n   */\n  getRenderBuffer() {\n    return this.renderBuffer_;\n  }\n\n  /**\n   * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): number|null|undefined} Render\n   *     order.\n   */\n  getRenderOrder() {\n    return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(\n      Property.RENDER_ORDER\n    ));\n  }\n\n  /**\n   * Get the style for features.  This returns whatever was passed to the `style`\n   * option at construction or to the `setStyle` method.\n   * @return {import(\"../style/Style.js\").StyleLike|null|undefined} Layer style.\n   * @api\n   */\n  getStyle() {\n    return this.style_;\n  }\n\n  /**\n   * Get the style function.\n   * @return {imp
 ort(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n   * @api\n   */\n  getStyleFunction() {\n    return this.styleFunction_;\n  }\n\n  /**\n   * @return {boolean} Whether the rendered layer should be updated while\n   *     animating.\n   */\n  getUpdateWhileAnimating() {\n    return this.updateWhileAnimating_;\n  }\n\n  /**\n   * @return {boolean} Whether the rendered layer should be updated while\n   *     interacting.\n   */\n  getUpdateWhileInteracting() {\n    return this.updateWhileInteracting_;\n  }\n\n  /**\n   * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n   *     Render order.\n   */\n  setRenderOrder(renderOrder) {\n    this.set(Property.RENDER_ORDER, renderOrder);\n  }\n\n  /**\n   * Set the style for features.  This can be a single style object, an array\n   * of styles, or a function that takes a feature and resolution and returns\n   * an array of styles. If set to `null`, the layer has no style (a `null` style),
 \n   * so only features that have their own styles will be rendered in the layer. Call\n   * `setStyle()` without arguments to reset to the default style. See\n   * {@link module:ol/style} for information on the default style.\n   * @param {(import(\"../style/Style.js\").StyleLike|null)=} opt_style Layer style.\n   * @api\n   */\n  setStyle(opt_style) {\n    this.style_ = opt_style !== undefined ? opt_style : createDefaultStyle;\n    this.styleFunction_ =\n      opt_style === null ? undefined : toStyleFunction(this.style_);\n    this.changed();\n  }\n}\n\nexport default BaseVectorLayer;\n","/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nconst Instruction = {\n  BEGIN_GEOMETRY: 0,\n  BEGIN_PATH: 1,\n  CIRCLE: 2,\n  CLOSE_PATH: 3,\n  CUSTOM: 4,\n  DRAW_CHARS: 5,\n  DRAW_IMAGE: 6,\n  END_GEOMETRY: 7,\n  FILL: 8,\n  MOVE_TO_LINE_TO: 9,\n  SET_FILL_STYLE: 10,\n  SET_STROKE_STYLE: 11,\n  STROKE: 12,\n};\n\n/**\n * @type {Array<Instruction>}\n */\nexport 
 const fillInstruction = [Instruction.FILL];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const strokeInstruction = [Instruction.STROKE];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const beginPathInstruction = [Instruction.BEGIN_PATH];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const closePathInstruction = [Instruction.CLOSE_PATH];\n\nexport default Instruction;\n","/**\n * @module ol/render/canvas/Builder\n */\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport Relationship from '../../extent/Relationship.js';\nimport VectorContext from '../VectorContext.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {buffer, clone, coordinateRelationship} from '../../extent.js';\nimport {\n  defaultFillStyle,\n  defaultLineCap,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultStrokeStyle,\n} from '../canvas.js';\nimport {equals, re
 verseSubArray} from '../../array.js';\nimport {\n  inflateCoordinates,\n  inflateCoordinatesArray,\n  inflateMultiCoordinatesArray,\n} from '../../geom/flat/inflate.js';\n\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, import(\"../canvas.js\").TextState>} [textStates] The text states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").StrokeState>} [strokeStates] The stroke states (decluttering).\n */\n\nclass CanvasBuilder extends VectorContext {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number
 } resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super();\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.tolerance = tolerance;\n\n    /**\n     * @protected\n     * @const\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent = maxExtent;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.pixelRatio = pixelRatio;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.maxLineWidth = 0;\n\n    /**\n     * @protected\n     * @const\n     * @type {number}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @private\n     * @type {Array<*>}\n     */\n    this.beginGeometryInstruction1_ = null;\n\n    /**\n     * @private\n     * @type {Array<*>}\n     */\n    this.beginGeometryInstruction2_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    thi
 s.bufferedMaxExtent_ = null;\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.instructions = [];\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.coordinates = [];\n\n    /**\n     * @private\n     * @type {import(\"../../coordinate.js\").Coordinate}\n     */\n    this.tmpCoordinate_ = [];\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.hitDetectionInstructions = [];\n\n    /**\n     * @protected\n     * @type {import(\"../canvas.js\").FillStrokeState}\n     */\n    this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n  }\n\n  /**\n   * @protected\n   * @param {Array<number>} dashArray Dash array.\n   * @return {Array<number>} Dash array with pixel ratio applied\n   */\n  applyPixelRatio(dashArray) {\n    const pixelRatio = this.pixelRatio;\n    return pixelRatio == 1\n      ? dashArray\n      : dashArray.map(function (dash) {\n          return dash * pixelRatio;\n        });\n  }
 \n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {boolean} closed Last input coordinate equals first.\n   * @param {boolean} skipFirst Skip first coordinate.\n   * @protected\n   * @return {number} My end.\n   */\n  appendFlatCoordinates(\n    flatCoordinates,\n    offset,\n    end,\n    stride,\n    closed,\n    skipFirst\n  ) {\n    let myEnd = this.coordinates.length;\n    const extent = this.getBufferedMaxExtent();\n    if (skipFirst) {\n      offset += stride;\n    }\n    let lastXCoord = flatCoordinates[offset];\n    let lastYCoord = flatCoordinates[offset + 1];\n    const nextCoord = this.tmpCoordinate_;\n    let skipped = true;\n\n    let i, lastRel, nextRel;\n    for (i = offset + stride; i < end; i += stride) {\n      nextCoord[0] = flatCoordinates[i];\n      nextCoord[1] = flatCoordinates[i + 1];\n      nextRel = coordinateRelations
 hip(extent, nextCoord);\n      if (nextRel !== lastRel) {\n        if (skipped) {\n          this.coordinates[myEnd++] = lastXCoord;\n          this.coordinates[myEnd++] = lastYCoord;\n        }\n        this.coordinates[myEnd++] = nextCoord[0];\n        this.coordinates[myEnd++] = nextCoord[1];\n        skipped = false;\n      } else if (nextRel === Relationship.INTERSECTING) {\n        this.coordinates[myEnd++] = nextCoord[0];\n        this.coordinates[myEnd++] = nextCoord[1];\n        skipped = false;\n      } else {\n        skipped = true;\n      }\n      lastXCoord = nextCoord[0];\n      lastYCoord = nextCoord[1];\n      lastRel = nextRel;\n    }\n\n    // Last coordinate equals first or only one point to append:\n    if ((closed && skipped) || i === offset + stride) {\n      this.coordinates[myEnd++] = lastXCoord;\n      this.coordinates[myEnd++] = lastYCoord;\n    }\n    return myEnd;\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {
 number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @param {Array<number>} builderEnds Builder ends.\n   * @return {number} Offset.\n   */\n  drawCustomCoordinates_(flatCoordinates, offset, ends, stride, builderEnds) {\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      const end = ends[i];\n      const builderEnd = this.appendFlatCoordinates(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        false,\n        false\n      );\n      builderEnds.push(builderEnd);\n      offset = end;\n    }\n    return offset;\n  }\n\n  /**\n   * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {Function} renderer Renderer.\n   */\n  drawCustom(geometry, feature, renderer) {\n    this.beginGeometry(geometry, feature);\n    const type = geometry.getType();\n    const stride = geometry.getStride();
 \n    const builderBegin = this.coordinates.length;\n    let flatCoordinates, builderEnd, builderEnds, builderEndss;\n    let offset;\n    if (type == GeometryType.MULTI_POLYGON) {\n      flatCoordinates = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getOrientedFlatCoordinates();\n      builderEndss = [];\n      const endss = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n      offset = 0;\n      for (let i = 0, ii = endss.length; i < ii; ++i) {\n        const myEnds = [];\n        offset = this.drawCustomCoordinates_(\n          flatCoordinates,\n          offset,\n          endss[i],\n          stride,\n          myEnds\n        );\n        builderEndss.push(myEnds);\n      }\n      this.instructions.push([\n        CanvasInstruction.CUSTOM,\n        builderBegin,\n        builderEndss,\n        geometry,\n        renderer,\n        inflateMultiCoordinatesArray,\n      ]);\n    } else if (\n      type == GeometryTy
 pe.POLYGON ||\n      type == GeometryType.MULTI_LINE_STRING\n    ) {\n      builderEnds = [];\n      flatCoordinates =\n        type == GeometryType.POLYGON\n          ? /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates()\n          : geometry.getFlatCoordinates();\n      offset = this.drawCustomCoordinates_(\n        flatCoordinates,\n        0,\n        /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(),\n        stride,\n        builderEnds\n      );\n      this.instructions.push([\n        CanvasInstruction.CUSTOM,\n        builderBegin,\n        builderEnds,\n        geometry,\n        renderer,\n        inflateCoordinatesArray,\n      ]);\n    } else if (\n      type == GeometryType.LINE_STRING ||\n      type == GeometryType.MULTI_POINT\n    ) {\n      flatCoordinates = geometry.getFlatCoordinates();\n      builderEnd = this.appendFlatCoordinates(\n        
 flatCoordinates,\n        0,\n        flatCoordinates.length,\n        stride,\n        false,\n        false\n      );\n      this.instructions.push([\n        CanvasInstruction.CUSTOM,\n        builderBegin,\n        builderEnd,\n        geometry,\n        renderer,\n        inflateCoordinates,\n      ]);\n    } else if (type == GeometryType.POINT) {\n      flatCoordinates = geometry.getFlatCoordinates();\n      this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n      builderEnd = this.coordinates.length;\n      this.instructions.push([\n        CanvasInstruction.CUSTOM,\n        builderBegin,\n        builderEnd,\n        geometry,\n        renderer,\n      ]);\n    }\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @protected\n   * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  beginGeometry(geometry, feature) {\n    const 
 extent = geometry.getExtent();\n    this.beginGeometryInstruction1_ = [\n      CanvasInstruction.BEGIN_GEOMETRY,\n      feature,\n      0,\n      extent,\n    ];\n    this.instructions.push(this.beginGeometryInstruction1_);\n    this.beginGeometryInstruction2_ = [\n      CanvasInstruction.BEGIN_GEOMETRY,\n      feature,\n      0,\n      extent,\n    ];\n    this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n  }\n\n  /**\n   * @return {SerializableInstructions} the serializable instructions.\n   */\n  finish() {\n    return {\n      instructions: this.instructions,\n      hitDetectionInstructions: this.hitDetectionInstructions,\n      coordinates: this.coordinates,\n    };\n  }\n\n  /**\n   * Reverse the hit detection instructions.\n   */\n  reverseHitDetectionInstructions() {\n    const hitDetectionInstructions = this.hitDetectionInstructions;\n    // step 1 - reverse array\n    hitDetectionInstructions.reverse();\n    // step 2 - reverse instructions within geome
 try blocks\n    let i;\n    const n = hitDetectionInstructions.length;\n    let instruction;\n    let type;\n    let begin = -1;\n    for (i = 0; i < n; ++i) {\n      instruction = hitDetectionInstructions[i];\n      type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n      if (type == CanvasInstruction.END_GEOMETRY) {\n        begin = i;\n      } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n        instruction[2] = i;\n        reverseSubArray(this.hitDetectionInstructions, begin, i);\n        begin = -1;\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n   */\n  setFillStrokeStyle(fillStyle, strokeStyle) {\n    const state = this.state;\n    if (fillStyle) {\n      const fillStyleColor = fillStyle.getColor();\n      state.fillStyle = asColorLike(\n        fillStyleColor ? fillStyleColor : defaultFillStyle\n  
     );\n    } else {\n      state.fillStyle = undefined;\n    }\n    if (strokeStyle) {\n      const strokeStyleColor = strokeStyle.getColor();\n      state.strokeStyle = asColorLike(\n        strokeStyleColor ? strokeStyleColor : defaultStrokeStyle\n      );\n      const strokeStyleLineCap = strokeStyle.getLineCap();\n      state.lineCap =\n        strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n      const strokeStyleLineDash = strokeStyle.getLineDash();\n      state.lineDash = strokeStyleLineDash\n        ? strokeStyleLineDash.slice()\n        : defaultLineDash;\n      const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      state.lineDashOffset = strokeStyleLineDashOffset\n        ? strokeStyleLineDashOffset\n        : defaultLineDashOffset;\n      const strokeStyleLineJoin = strokeStyle.getLineJoin();\n      state.lineJoin =\n        strokeStyleLineJoin !== undefined\n          ? strokeStyleLineJoin\n          : defaultLineJoin;\n      
 const strokeStyleWidth = strokeStyle.getWidth();\n      state.lineWidth =\n        strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n      const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n      state.miterLimit =\n        strokeStyleMiterLimit !== undefined\n          ? strokeStyleMiterLimit\n          : defaultMiterLimit;\n\n      if (state.lineWidth > this.maxLineWidth) {\n        this.maxLineWidth = state.lineWidth;\n        // invalidate the buffered max extent cache\n        this.bufferedMaxExtent_ = null;\n      }\n    } else {\n      state.strokeStyle = undefined;\n      state.lineCap = undefined;\n      state.lineDash = null;\n      state.lineDashOffset = undefined;\n      state.lineJoin = undefined;\n      state.lineWidth = undefined;\n      state.miterLimit = undefined;\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @return {Array<*>} Fill instruction.\n   */\n  createFill(state) {\n    const 
 fillStyle = state.fillStyle;\n    /** @type {Array<*>} */\n    const fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n    if (typeof fillStyle !== 'string') {\n      // Fill is a pattern or gradient - align it!\n      fillInstruction.push(true);\n    }\n    return fillInstruction;\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   */\n  applyStroke(state) {\n    this.instructions.push(this.createStroke(state));\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @return {Array<*>} Stroke instruction.\n   */\n  createStroke(state) {\n    return [\n      CanvasInstruction.SET_STROKE_STYLE,\n      state.strokeStyle,\n      state.lineWidth * this.pixelRatio,\n      state.lineCap,\n      state.lineJoin,\n      state.miterLimit,\n      this.applyPixelRatio(state.lineDash),\n      state.lineDashOffset * this.pixelRatio,\n    ];\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} stat
 e State.\n   * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n   */\n  updateFillStyle(state, createFill) {\n    const fillStyle = state.fillStyle;\n    if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n      if (fillStyle !== undefined) {\n        this.instructions.push(createFill.call(this, state));\n      }\n      state.currentFillStyle = fillStyle;\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n   */\n  updateStrokeStyle(state, applyStroke) {\n    const strokeStyle = state.strokeStyle;\n    const lineCap = state.lineCap;\n    const lineDash = state.lineDash;\n    const lineDashOffset = state.lineDashOffset;\n    const lineJoin = state.lineJoin;\n    const lineWidth = state.lineWidth;\n    const miterLimit = state.miterLimit;\n 
    if (\n      state.currentStrokeStyle != strokeStyle ||\n      state.currentLineCap != lineCap ||\n      (lineDash != state.currentLineDash &&\n        !equals(state.currentLineDash, lineDash)) ||\n      state.currentLineDashOffset != lineDashOffset ||\n      state.currentLineJoin != lineJoin ||\n      state.currentLineWidth != lineWidth ||\n      state.currentMiterLimit != miterLimit\n    ) {\n      if (strokeStyle !== undefined) {\n        applyStroke.call(this, state);\n      }\n      state.currentStrokeStyle = strokeStyle;\n      state.currentLineCap = lineCap;\n      state.currentLineDash = lineDash;\n      state.currentLineDashOffset = lineDashOffset;\n      state.currentLineJoin = lineJoin;\n      state.currentLineWidth = lineWidth;\n      state.currentMiterLimit = miterLimit;\n    }\n  }\n\n  /**\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  endGeometry(feature) {\n    this.beginGeometryInstruction1_[2] = this.instructions.length;\n    
 this.beginGeometryInstruction1_ = null;\n    this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n    this.beginGeometryInstruction2_ = null;\n    const endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n    this.instructions.push(endGeometryInstruction);\n    this.hitDetectionInstructions.push(endGeometryInstruction);\n  }\n\n  /**\n   * Get the buffered rendering extent.  Rendering will be clipped to the extent\n   * provided to the constructor.  To account for symbolizers that may intersect\n   * this extent, we calculate a buffered extent (e.g. based on stroke width).\n   * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n   * @protected\n   */\n  getBufferedMaxExtent() {\n    if (!this.bufferedMaxExtent_) {\n      this.bufferedMaxExtent_ = clone(this.maxExtent);\n      if (this.maxLineWidth > 0) {\n        const width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n        buffer(this.bufferedMaxExtent_, w
 idth, this.bufferedMaxExtent_);\n      }\n    }\n    return this.bufferedMaxExtent_;\n  }\n}\n\nexport default CanvasBuilder;\n","/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n  beginPathInstruction,\n  closePathInstruction,\n  fillInstruction,\n  strokeInstruction,\n} from './Instruction.js';\nimport {defaultFillStyle} from '../canvas.js';\nimport {snap} from '../../geom/flat/simplify.js';\n\nclass CanvasPolygonBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @par
 am {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} End.\n   */\n  drawFlatCoordinatess_(flatCoordinates, offset, ends, stride) {\n    const state = this.state;\n    const fill = state.fillStyle !== undefined;\n    const stroke = state.strokeStyle !== undefined;\n    const numEnds = ends.length;\n    this.instructions.push(beginPathInstruction);\n    this.hitDetectionInstructions.push(beginPathInstruction);\n    for (let i = 0; i < numEnds; ++i) {\n      const end = ends[i];\n      const myBegin = this.coordinates.length;\n      const myEnd = this.appendFlatCoordinates(\n        flatCoordinates,\n        offset,\n        end,\n        stride,\n        true,\n        !stroke\n      );\n      const moveToLineToInstruction = [\n        CanvasInstruction.MOVE_TO_LINE_TO,\n        myBegin,\n        myEnd,\n      ];\n      this.instructions.push(moveToLineToInstruction);\n      this.hitDetectionInstructions.push(moveToLineToInstruction)
 ;\n      if (stroke) {\n        // Performance optimization: only call closePath() when we have a stroke.\n        // Otherwise the ring is closed already (see appendFlatCoordinates above).\n        this.instructions.push(closePathInstruction);\n        this.hitDetectionInstructions.push(closePathInstruction);\n      }\n      offset = end;\n    }\n    if (fill) {\n      this.instructions.push(fillInstruction);\n      this.hitDetectionInstructions.push(fillInstruction);\n    }\n    if (stroke) {\n      this.instructions.push(strokeInstruction);\n      this.hitDetectionInstructions.push(strokeInstruction);\n    }\n    return offset;\n  }\n\n  /**\n   * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   */\n  drawCircle(circleGeometry, feature) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    if (fillStyle === u
 ndefined && strokeStyle === undefined) {\n      return;\n    }\n    this.setFillStrokeStyles_();\n    this.beginGeometry(circleGeometry, feature);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        defaultFillStyle,\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        state.lineDash,\n        state.lineDashOffset,\n      ]);\n    }\n    const flatCoordinates = circleGeometry.getFlatCoordinates();\n    const stride = circleGeometry.getStride();\n    const myBegin = this.coordinates.length;\n    this.appendFlatCoordinates(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride,\n      false,\n      false\n    );\n    const circleInstruction = 
 [CanvasInstruction.CIRCLE, myBegin];\n    this.instructions.push(beginPathInstruction, circleInstruction);\n    this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n    if (state.fillStyle !== undefined) {\n      this.instructions.push(fillInstruction);\n      this.hitDetectionInstructions.push(fillInstruction);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.instructions.push(strokeInstruction);\n      this.hitDetectionInstructions.push(strokeInstruction);\n    }\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawPolygon(polygonGeometry, feature) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;
 \n    }\n    this.setFillStrokeStyles_();\n    this.beginGeometry(polygonGeometry, feature);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        defaultFillStyle,\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        state.lineDash,\n        state.lineDashOffset,\n      ]);\n    }\n    const ends = polygonGeometry.getEnds();\n    const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n    const stride = polygonGeometry.getStride();\n    this.drawFlatCoordinatess_(\n      flatCoordinates,\n      0,\n      /** @type {Array<number>} */ (ends),\n      stride\n    );\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/MultiPolygo
 n.js\").default} multiPolygonGeometry MultiPolygon geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawMultiPolygon(multiPolygonGeometry, feature) {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    const strokeStyle = state.strokeStyle;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n    this.setFillStrokeStyles_();\n    this.beginGeometry(multiPolygonGeometry, feature);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        defaultFillStyle,\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        state.lineDash,\n        state.lineDashOffset,\n      ]);\n    }\
 n    const endss = multiPolygonGeometry.getEndss();\n    const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n    const stride = multiPolygonGeometry.getStride();\n    let offset = 0;\n    for (let i = 0, ii = endss.length; i < ii; ++i) {\n      offset = this.drawFlatCoordinatess_(\n        flatCoordinates,\n        offset,\n        endss[i],\n        stride\n      );\n    }\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n   */\n  finish() {\n    this.reverseHitDetectionInstructions();\n    this.state = null;\n    // We want to preserve topology when drawing polygons.  Polygons are\n    // simplified using quantization and point elimination. However, we might\n    // have received a mix of quantized and non-quantized geometries, so ensure\n    // that all are quantized by quantizing all coordinates in the batch.\n    const tolerance = this.tolerance;\n    if (tolera
 nce !== 0) {\n      const coordinates = this.coordinates;\n      for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n        coordinates[i] = snap(coordinates[i], tolerance);\n      }\n    }\n    return super.finish();\n  }\n\n  /**\n   * @private\n   */\n  setFillStrokeStyles_() {\n    const state = this.state;\n    const fillStyle = state.fillStyle;\n    if (fillStyle !== undefined) {\n      this.updateFillStyle(state, this.createFill);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.updateStrokeStyle(state, this.applyStroke);\n    }\n  }\n}\n\nexport default CanvasPolygonBuilder;\n","/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `fl
 atCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n  let chunkStart = offset;\n  let chunkEnd = offset;\n  let chunkM = 0;\n  let m = 0;\n  let start = offset;\n  let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n  for (i = offset; i < end; i += stride) {\n    const x2 = flatCoordinates[i];\n    const y2 = flatCoordinates[i + 1];\n    if (x1 !== undefined) {\n      x23 = x2 - x1;\n      y23 = y2 - y1;\n      m23 = Math.sqrt(x23 * x23 + y23 * y23);\n      if (x12 !== undefined) {\n        m += m12;\n        acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n        if (acos > maxAngle) {\n          if (m > chunkM) {\n            chunkM = m;\n            chunkStart = start;\n            chunkEnd = i;\n          }\n          m = 0;\n          start = i - stride;\n        }\n      }\n      m12 = m23;\n      x12 = x23;\n      y12 = y23;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  m += m23;\n  return m > chunkM ? [start, i] : [ch
 unkStart, chunkEnd];\n}\n","/**\n * @module ol/render/canvas/TextBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport TextPlacement from '../../style/TextPlacement.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n  defaultFillStyle,\n  defaultFont,\n  defaultLineCap,\n  defaultLineDash,\n  defaultLineDashOffset,\n  defaultLineJoin,\n  defaultLineWidth,\n  defaultMiterLimit,\n  defaultPadding,\n  defaultStrokeStyle,\n  defaultTextAlign,\n  defaultTextBaseline,\n  registerFont,\n} from '../canvas.js';\nimport {getUid} from '../../util.js';\nimport {intersects} from '../../extent.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\n/**\n * @const\n * @enum {number}\n */\nexport const TEXT_ALIGN = {\n  'left': 0,\n  'end': 0,\n  'center': 0.5,\n  'right': 1,\n  'start': 1,\n  'top': 0,\n  'middle': 0.5,\n  'hanging': 0.2,\n  'alphabetic'
 : 0.8,\n  'ideographic': 0.8,\n  'bottom': 1,\n};\n\nclass CanvasTextBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").DeclutterGroups}\n     */\n    this.declutterGroups_;\n\n    /**\n     * @private\n     * @type {Array<HTMLCanvasElement>}\n     */\n    this.labels_ = null;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n    
  */\n    this.textRotateWithView_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textRotation_ = 0;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.textFillState_ = null;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").FillState>}\n     */\n    this.fillStates = {};\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.textStrokeState_ = null;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n     */\n    this.strokeStates = {};\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").TextState}\n     */\n    this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").TextState>}\n     */\n    this.textStates = {};\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.textKey_ = '';\n\n    /**\n
      * @private\n     * @type {string}\n     */\n    this.fillKey_ = '';\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.strokeKey_ = '';\n  }\n\n  /**\n   * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n   */\n  finish() {\n    const instructions = super.finish();\n    instructions.textStates = this.textStates;\n    instructions.fillStates = this.fillStates;\n    instructions.strokeStates = this.strokeStates;\n    return instructions;\n  }\n\n  /**\n   * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawText(geometry, feature) {\n    const fillState = this.textFillState_;\n    const strokeState = this.textStrokeState_;\n    const textState = this.textState_;\n    if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n      return;\n    }\n\n    let begi
 n = this.coordinates.length;\n\n    const geometryType = geometry.getType();\n    let flatCoordinates = null;\n    let end = 2;\n    let stride = 2;\n    let i, ii;\n\n    if (textState.placement === TextPlacement.LINE) {\n      if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n        return;\n      }\n      let ends;\n      flatCoordinates = geometry.getFlatCoordinates();\n      stride = geometry.getStride();\n      if (geometryType == GeometryType.LINE_STRING) {\n        ends = [flatCoordinates.length];\n      } else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n        ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds();\n      } else if (geometryType == GeometryType.POLYGON) {\n        ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n          .getEnds()\n          .slice(0, 1);\n      } else if (geometryType == GeometryType.MULTI_POLYGON) {\n        const endss = /** @type {import
 (\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n        ends = [];\n        for (i = 0, ii = endss.length; i < ii; ++i) {\n          ends.push(endss[i][0]);\n        }\n      }\n      this.beginGeometry(geometry, feature);\n      const textAlign = textState.textAlign;\n      let flatOffset = 0;\n      let flatEnd;\n      for (let o = 0, oo = ends.length; o < oo; ++o) {\n        if (textAlign == undefined) {\n          const range = matchingChunk(\n            textState.maxAngle,\n            flatCoordinates,\n            flatOffset,\n            ends[o],\n            stride\n          );\n          flatOffset = range[0];\n          flatEnd = range[1];\n        } else {\n          flatEnd = ends[o];\n        }\n        for (i = flatOffset; i < flatEnd; i += stride) {\n          this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n        }\n        end = this.coordinates.length;\n        flatOffset = ends[o];\n        const declutterGroup = this.de
 clutterGroups_\n          ? o === 0\n            ? this.declutterGroups_[0]\n            : [].concat(this.declutterGroups_[0])\n          : null;\n        this.drawChars_(begin, end, declutterGroup);\n        begin = end;\n      }\n      this.endGeometry(feature);\n    } else {\n      let geometryWidths = null;\n      if (!textState.overflow) {\n        geometryWidths = [];\n      }\n      switch (geometryType) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n          flatCoordinates = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry).getFlatCoordinates();\n          end = flatCoordinates.length;\n          break;\n        case GeometryType.LINE_STRING:\n          flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n          break;\n        case GeometryType.CIRCLE:\n          flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n   
        break;\n        case GeometryType.MULTI_LINE_STRING:\n          flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n          end = flatCoordinates.length;\n          break;\n        case GeometryType.POLYGON:\n          flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n          if (!textState.overflow) {\n            geometryWidths.push(flatCoordinates[2] / this.resolution);\n          }\n          stride = 3;\n          break;\n        case GeometryType.MULTI_POLYGON:\n          const interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n          flatCoordinates = [];\n          for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n            if (!textState.overflow) {\n              geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n            }\n            flatCoordin
 ates.push(interiorPoints[i], interiorPoints[i + 1]);\n          }\n          end = flatCoordinates.length;\n          if (end == 0) {\n            return;\n          }\n          break;\n        default:\n      }\n      end = this.appendFlatCoordinates(\n        flatCoordinates,\n        0,\n        end,\n        stride,\n        false,\n        false\n      );\n\n      this.saveTextStates_();\n\n      if (textState.backgroundFill || textState.backgroundStroke) {\n        this.setFillStrokeStyle(\n          textState.backgroundFill,\n          textState.backgroundStroke\n        );\n        if (textState.backgroundFill) {\n          this.updateFillStyle(this.state, this.createFill);\n          this.hitDetectionInstructions.push(this.createFill(this.state));\n        }\n        if (textState.backgroundStroke) {\n          this.updateStrokeStyle(this.state, this.applyStroke);\n          this.hitDetectionInstructions.push(this.createStroke(this.state));\n        }\n      }\n\n      thi
 s.beginGeometry(geometry, feature);\n\n      // adjust padding for negative scale\n      let padding = textState.padding;\n      if (\n        padding != defaultPadding &&\n        (textState.scale[0] < 0 || textState.scale[1] < 0)\n      ) {\n        let p0 = textState.padding[0];\n        let p1 = textState.padding[1];\n        let p2 = textState.padding[2];\n        let p3 = textState.padding[3];\n        if (textState.scale[0] < 0) {\n          p1 = -p1;\n          p3 = -p3;\n        }\n        if (textState.scale[1] < 0) {\n          p0 = -p0;\n          p2 = -p2;\n        }\n        padding = [p0, p1, p2, p3];\n      }\n\n      // The image is unknown at this stage so we pass null; it will be computed at render time.\n      // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n      // render time.\n      const pixelRatio = this.pixelRatio;\n      this.instructions.push([\n        CanvasInstruction.DRAW_IMAGE,\n        begin,\n        e
 nd,\n        null,\n        NaN,\n        NaN,\n        this.declutterGroups_,\n        NaN,\n        1,\n        0,\n        0,\n        this.textRotateWithView_,\n        this.textRotation_,\n        [1, 1],\n        NaN,\n        padding == defaultPadding\n          ? defaultPadding\n          : padding.map(function (p) {\n              return p * pixelRatio;\n            }),\n        !!textState.backgroundFill,\n        !!textState.backgroundStroke,\n        this.text_,\n        this.textKey_,\n        this.strokeKey_,\n        this.fillKey_,\n        this.textOffsetX_,\n        this.textOffsetY_,\n        geometryWidths,\n      ]);\n      const scale = 1 / pixelRatio;\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.DRAW_IMAGE,\n        begin,\n        end,\n        null,\n        NaN,\n        NaN,\n        this.declutterGroups_,\n        NaN,\n        1,\n        0,\n        0,\n        this.textRotateWithView_,\n        this.textRotation_,\n        [sca
 le, scale],\n        NaN,\n        padding,\n        !!textState.backgroundFill,\n        !!textState.backgroundStroke,\n        this.text_,\n        this.textKey_,\n        this.strokeKey_,\n        this.fillKey_,\n        this.textOffsetX_,\n        this.textOffsetY_,\n        geometryWidths,\n      ]);\n\n      this.endGeometry(feature);\n    }\n  }\n\n  /**\n   * @private\n   */\n  saveTextStates_() {\n    const strokeState = this.textStrokeState_;\n    const textState = this.textState_;\n    const fillState = this.textFillState_;\n\n    const strokeKey = this.strokeKey_;\n    if (strokeState) {\n      if (!(strokeKey in this.strokeStates)) {\n        this.strokeStates[strokeKey] = {\n          strokeStyle: strokeState.strokeStyle,\n          lineCap: strokeState.lineCap,\n          lineDashOffset: strokeState.lineDashOffset,\n          lineWidth: strokeState.lineWidth,\n          lineJoin: strokeState.lineJoin,\n          miterLimit: strokeState.miterLimit,\n          lineDash:
  strokeState.lineDash,\n        };\n      }\n    }\n    const textKey = this.textKey_;\n    if (!(textKey in this.textStates)) {\n      this.textStates[textKey] = {\n        font: textState.font,\n        textAlign: textState.textAlign || defaultTextAlign,\n        textBaseline: textState.textBaseline || defaultTextBaseline,\n        scale: textState.scale,\n      };\n    }\n    const fillKey = this.fillKey_;\n    if (fillState) {\n      if (!(fillKey in this.fillStates)) {\n        this.fillStates[fillKey] = {\n          fillStyle: fillState.fillStyle,\n        };\n      }\n    }\n  }\n\n  /**\n   * @private\n   * @param {number} begin Begin.\n   * @param {number} end End.\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n   */\n  drawChars_(begin, end, declutterGroup) {\n    const strokeState = this.textStrokeState_;\n    const textState = this.textState_;\n\n    const strokeKey = this.strokeKey_;\n    const textKey = this.textKey_;\n    const
  fillKey = this.fillKey_;\n    this.saveTextStates_();\n\n    const pixelRatio = this.pixelRatio;\n    const baseline = TEXT_ALIGN[textState.textBaseline];\n\n    const offsetY = this.textOffsetY_ * pixelRatio;\n    const text = this.text_;\n    const strokeWidth = strokeState\n      ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n      : 0;\n\n    this.instructions.push([\n      CanvasInstruction.DRAW_CHARS,\n      begin,\n      end,\n      baseline,\n      declutterGroup,\n      textState.overflow,\n      fillKey,\n      textState.maxAngle,\n      pixelRatio,\n      offsetY,\n      strokeKey,\n      strokeWidth * pixelRatio,\n      text,\n      textKey,\n      1,\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_CHARS,\n      begin,\n      end,\n      baseline,\n      declutterGroup,\n      textState.overflow,\n      fillKey,\n      textState.maxAngle,\n      1,\n      offsetY,\n      strokeKey,\n      strokeWidth,\n      text,\n      t
 extKey,\n      1 / pixelRatio,\n    ]);\n  }\n\n  /**\n   * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n   * @param {import(\"../canvas.js\").DeclutterGroups} declutterGroups Declutter.\n   */\n  setTextStyle(textStyle, declutterGroups) {\n    let textState, fillState, strokeState;\n    if (!textStyle) {\n      this.text_ = '';\n    } else {\n      this.declutterGroups_ = declutterGroups;\n\n      const textFillStyle = textStyle.getFill();\n      if (!textFillStyle) {\n        fillState = null;\n        this.textFillState_ = fillState;\n      } else {\n        fillState = this.textFillState_;\n        if (!fillState) {\n          fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n          this.textFillState_ = fillState;\n        }\n        fillState.fillStyle = asColorLike(\n          textFillStyle.getColor() || defaultFillStyle\n        );\n      }\n\n      const textStrokeStyle = textStyle.getStroke();\n      if (!textStrokeStyle) {\
 n        strokeState = null;\n        this.textStrokeState_ = strokeState;\n      } else {\n        strokeState = this.textStrokeState_;\n        if (!strokeState) {\n          strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n          this.textStrokeState_ = strokeState;\n        }\n        const lineDash = textStrokeStyle.getLineDash();\n        const lineDashOffset = textStrokeStyle.getLineDashOffset();\n        const lineWidth = textStrokeStyle.getWidth();\n        const miterLimit = textStrokeStyle.getMiterLimit();\n        strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n        strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n        strokeState.lineDashOffset =\n          lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n        strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n        strokeState.lineWidth =\n          lineWidth === undefined ? defaultLineWidth 
 : lineWidth;\n        strokeState.miterLimit =\n          miterLimit === undefined ? defaultMiterLimit : miterLimit;\n        strokeState.strokeStyle = asColorLike(\n          textStrokeStyle.getColor() || defaultStrokeStyle\n        );\n      }\n\n      textState = this.textState_;\n      const font = textStyle.getFont() || defaultFont;\n      registerFont(font);\n      const textScale = textStyle.getScaleArray();\n      textState.overflow = textStyle.getOverflow();\n      textState.font = font;\n      textState.maxAngle = textStyle.getMaxAngle();\n      textState.placement = textStyle.getPlacement();\n      textState.textAlign = textStyle.getTextAlign();\n      textState.textBaseline =\n        textStyle.getTextBaseline() || defaultTextBaseline;\n      textState.backgroundFill = textStyle.getBackgroundFill();\n      textState.backgroundStroke = textStyle.getBackgroundStroke();\n      textState.padding = textStyle.getPadding() || defaultPadding;\n      textState.scale = textScale =
 == undefined ? [1, 1] : textScale;\n\n      const textOffsetX = textStyle.getOffsetX();\n      const textOffsetY = textStyle.getOffsetY();\n      const textRotateWithView = textStyle.getRotateWithView();\n      const textRotation = textStyle.getRotation();\n      this.text_ = textStyle.getText() || '';\n      this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n      this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n      this.textRotateWithView_ =\n        textRotateWithView === undefined ? false : textRotateWithView;\n      this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n      this.strokeKey_ = strokeState\n        ? (typeof strokeState.strokeStyle == 'string'\n            ? strokeState.strokeStyle\n            : getUid(strokeState.strokeStyle)) +\n          strokeState.lineCap +\n          strokeState.lineDashOffset +\n          '|' +\n          strokeState.lineWidth +\n          strokeState.lineJoin +\n          strokeState.mit
 erLimit +\n          '[' +\n          strokeState.lineDash.join() +\n          ']'\n        : '';\n      this.textKey_ =\n        textState.font +\n        textState.scale +\n        (textState.textAlign || '?') +\n        (textState.textBaseline || '?');\n      this.fillKey_ = fillState\n        ? typeof fillState.fillStyle == 'string'\n          ? fillState.fillStyle\n          : '|' + getUid(fillState.fillStyle)\n        : '';\n    }\n  }\n}\n\nexport default CanvasTextBuilder;\n","/**\n * @module ol/render/canvas/BuilderGroup\n */\n\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n\n/**\n * @type {Object<import(\"./BuilderType\").default, typeof Builder>}\n */\nconst BATCH_CONSTRUCTORS = {\n  'Circle': PolygonBuilder,\n  'Default': Builder,\n  'Image': ImageBuilder,\n  'LineString': LineString
 Builder,\n  'Polygon': PolygonBuilder,\n  'Text': TextBuilder,\n};\n\nclass BuilderGroup {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {boolean} declutter Decluttering enabled.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio, declutter) {\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.declutter_ = declutter;\n\n    /**\n     * @type {import(\"../canvas.js\").DeclutterGroups}\n     * @private\n     */\n    this.declutterGroups_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tolerance_ = tolerance;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent_ = maxExtent;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @pri
 vate\n     * @type {number}\n     */\n    this.resolution_ = resolution;\n\n    /**\n     * @private\n     * @type {!Object<string, !Object<import(\"./BuilderType\").default, Builder>>}\n     */\n    this.buildersByZIndex_ = {};\n  }\n\n  /**\n   * @param {boolean} group Group with previous builder.\n   * @return {import(\"../canvas\").DeclutterGroups} The resulting instruction groups.\n   */\n  addDeclutter(group) {\n    /** @type {Array<*>} */\n    let declutter = null;\n    if (this.declutter_) {\n      if (group) {\n        declutter = this.declutterGroups_;\n        /** @type {number} */ (declutter[0][0])++;\n      } else {\n        declutter = [[1]];\n        this.declutterGroups_ = declutter;\n      }\n    }\n    return declutter;\n  }\n\n  /**\n   * @return {!Object<string, !Object<import(\"./BuilderType\").default, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n   */\n  finish() {\n    const builderInstructions = {};\n    for (const zKey
  in this.buildersByZIndex_) {\n      builderInstructions[zKey] = builderInstructions[zKey] || {};\n      const builders = this.buildersByZIndex_[zKey];\n      for (const builderKey in builders) {\n        const builderInstruction = builders[builderKey].finish();\n        builderInstructions[zKey][builderKey] = builderInstruction;\n      }\n    }\n    return builderInstructions;\n  }\n\n  /**\n   * @param {number|undefined} zIndex Z index.\n   * @param {import(\"./BuilderType.js\").default} builderType Replay type.\n   * @return {import(\"../VectorContext.js\").default} Replay.\n   */\n  getBuilder(zIndex, builderType) {\n    const zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n    let replays = this.buildersByZIndex_[zIndexKey];\n    if (replays === undefined) {\n      replays = {};\n      this.buildersByZIndex_[zIndexKey] = replays;\n    }\n    let replay = replays[builderType];\n    if (replay === undefined) {\n      const Constructor = BATCH_CONSTRUCTORS[builderType
 ];\n      replay = new Constructor(\n        this.tolerance_,\n        this.maxExtent_,\n        this.resolution_,\n        this.pixelRatio_\n      );\n      replays[builderType] = replay;\n    }\n    return replay;\n  }\n}\n\nexport default BuilderGroup;\n","/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasImageBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").DeclutterGroups}\n     */\n    this.declutterGroups_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLV
 ideoElement|HTMLImageElement}\n     */\n    this.hitDetectionImage_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.imagePixelRatio_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.anchorX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.anchorY_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.height_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.opacity_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.originX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.originY_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */
 \n    this.rotateWithView_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = undefined;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size|undefined}\n     */\n    this.scale_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.width_ = undefined;\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} My end.\n   */\n  drawCoordinates_(flatCoordinates, offset, end, stride) {\n    return this.appendFlatCoordinates(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      false,\n      false\n    );\n  }\n\n  /**\n   * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} featu
 re Feature.\n   */\n  drawPoint(pointGeometry, feature) {\n    if (!this.image_) {\n      return;\n    }\n    this.beginGeometry(pointGeometry, feature);\n    const flatCoordinates = pointGeometry.getFlatCoordinates();\n    const stride = pointGeometry.getStride();\n    const myBegin = this.coordinates.length;\n    const myEnd = this.drawCoordinates_(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride\n    );\n    this.instructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.image_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_ * this.imagePixelRatio_,\n      this.anchorY_ * this.imagePixelRatio_,\n      this.declutterGroups_,\n      Math.ceil(this.height_ * this.imagePixelRatio_),\n      this.opacity_,\n      this.originX_,\n      this.originY_,\n      this.rotateWithView_,\n      this.rotation_,\n      [\n        (this.scale_[0] * this.pixelRatio) / this.imagePixelRat
 io_,\n        (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n      ],\n      Math.ceil(this.width_ * this.imagePixelRatio_),\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.hitDetectionImage_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_ * this.imagePixelRatio_,\n      this.anchorY_ * this.imagePixelRatio_,\n      this.declutterGroups_,\n      Math.ceil(this.height_ * this.imagePixelRatio_),\n      this.opacity_,\n      this.originX_,\n      this.originY_,\n      this.rotateWithView_,\n      this.rotation_,\n      [\n        (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n        (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n      ],\n      Math.ceil(this.width_ * this.imagePixelRatio_),\n    ]);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feat
 ure.js\").default} multiPointGeometry MultiPoint geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawMultiPoint(multiPointGeometry, feature) {\n    if (!this.image_) {\n      return;\n    }\n    this.beginGeometry(multiPointGeometry, feature);\n    const flatCoordinates = multiPointGeometry.getFlatCoordinates();\n    const stride = multiPointGeometry.getStride();\n    const myBegin = this.coordinates.length;\n    const myEnd = this.drawCoordinates_(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride\n    );\n    this.instructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.image_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_ * this.imagePixelRatio_,\n      this.anchorY_ * this.imagePixelRatio_,\n      this.declutterGroups_,\n      Math.ceil(this.height_ * this.imagePixelRatio_),\n      this.opacity_,\n      this.originX_,\n 
      this.originY_,\n      this.rotateWithView_,\n      this.rotation_,\n      [\n        (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n        (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n      ],\n      Math.ceil(this.width_ * this.imagePixelRatio_),\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_IMAGE,\n      myBegin,\n      myEnd,\n      this.hitDetectionImage_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_ * this.imagePixelRatio_,\n      this.anchorY_ * this.imagePixelRatio_,\n      this.declutterGroups_,\n      Math.ceil(this.height_ * this.imagePixelRatio_),\n      this.opacity_,\n      this.originX_,\n      this.originY_,\n      this.rotateWithView_,\n      this.rotation_,\n      [\n        (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n        (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n      ],\n      Math.ceil(this.width_ * this.imag
 ePixelRatio_),\n    ]);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @return {import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n   */\n  finish() {\n    this.reverseHitDetectionInstructions();\n    // FIXME this doesn't really protect us against further calls to draw*Geometry\n    this.anchorX_ = undefined;\n    this.anchorY_ = undefined;\n    this.hitDetectionImage_ = null;\n    this.image_ = null;\n    this.imagePixelRatio_ = undefined;\n    this.height_ = undefined;\n    this.scale_ = undefined;\n    this.opacity_ = undefined;\n    this.originX_ = undefined;\n    this.originY_ = undefined;\n    this.rotateWithView_ = undefined;\n    this.rotation_ = undefined;\n    this.width_ = undefined;\n    return super.finish();\n  }\n\n  /**\n   * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroups Declutter.\n   */\n  setImageStyle(imageStyle, declutterGroups
 ) {\n    const anchor = imageStyle.getAnchor();\n    const size = imageStyle.getSize();\n    const hitDetectionImage = imageStyle.getHitDetectionImage(this.pixelRatio);\n    const image = imageStyle.getImage(this.pixelRatio);\n    const origin = imageStyle.getOrigin();\n    this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n    this.anchorX_ = anchor[0];\n    this.anchorY_ = anchor[1];\n    this.declutterGroups_ = declutterGroups;\n    this.hitDetectionImage_ = hitDetectionImage;\n    this.image_ = image;\n    this.height_ = size[1];\n    this.opacity_ = imageStyle.getOpacity();\n    this.originX_ = origin[0];\n    this.originY_ = origin[1];\n    this.rotateWithView_ = imageStyle.getRotateWithView();\n    this.rotation_ = imageStyle.getRotation();\n    this.scale_ = imageStyle.getScaleArray();\n    this.width_ = size[0];\n  }\n}\n\nexport default CanvasImageBuilder;\n","/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport CanvasBuilder from './Builder.js'
 ;\nimport CanvasInstruction, {\n  beginPathInstruction,\n  strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasLineStringBuilder extends CanvasBuilder {\n  /**\n   * @param {number} tolerance Tolerance.\n   * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   */\n  constructor(tolerance, maxExtent, resolution, pixelRatio) {\n    super(tolerance, maxExtent, resolution, pixelRatio);\n  }\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} end.\n   */\n  drawFlatCoordinates_(flatCoordinates, offset, end, stride) {\n    const myBegin = this.coordinates.length;\n    const myEnd = this.appendFlatCoordinates(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      false,\n      false\n    );
 \n    const moveToLineToInstruction = [\n      CanvasInstruction.MOVE_TO_LINE_TO,\n      myBegin,\n      myEnd,\n    ];\n    this.instructions.push(moveToLineToInstruction);\n    this.hitDetectionInstructions.push(moveToLineToInstruction);\n    return end;\n  }\n\n  /**\n   * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawLineString(lineStringGeometry, feature) {\n    const state = this.state;\n    const strokeStyle = state.strokeStyle;\n    const lineWidth = state.lineWidth;\n    if (strokeStyle === undefined || lineWidth === undefined) {\n      return;\n    }\n    this.updateStrokeStyle(state, this.applyStroke);\n    this.beginGeometry(lineStringGeometry, feature);\n    this.hitDetectionInstructions.push(\n      [\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle,\n        state.lineWidth,\n  
       state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        state.lineDash,\n        state.lineDashOffset,\n      ],\n      beginPathInstruction\n    );\n    const flatCoordinates = lineStringGeometry.getFlatCoordinates();\n    const stride = lineStringGeometry.getStride();\n    this.drawFlatCoordinates_(\n      flatCoordinates,\n      0,\n      flatCoordinates.length,\n      stride\n    );\n    this.hitDetectionInstructions.push(strokeInstruction);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   */\n  drawMultiLineString(multiLineStringGeometry, feature) {\n    const state = this.state;\n    const strokeStyle = state.strokeStyle;\n    const lineWidth = state.lineWidth;\n    if (strokeStyle === undefined || lineWidth === undefined) {\n      
 return;\n    }\n    this.updateStrokeStyle(state, this.applyStroke);\n    this.beginGeometry(multiLineStringGeometry, feature);\n    this.hitDetectionInstructions.push(\n      [\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle,\n        state.lineWidth,\n        state.lineCap,\n        state.lineJoin,\n        state.miterLimit,\n        state.lineDash,\n        state.lineDashOffset,\n      ],\n      beginPathInstruction\n    );\n    const ends = multiLineStringGeometry.getEnds();\n    const flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n    const stride = multiLineStringGeometry.getStride();\n    let offset = 0;\n    for (let i = 0, ii = ends.length; i < ii; ++i) {\n      offset = this.drawFlatCoordinates_(\n        flatCoordinates,\n        offset,\n        /** @type {number} */ (ends[i]),\n        stride\n      );\n    }\n    this.hitDetectionInstructions.push(strokeInstruction);\n    this.endGeometry(feature);\n  }\n\n  /**\n   * @return {
 import(\"./Builder.js\").SerializableInstructions} the serializable instructions.\n   */\n  finish() {\n    const state = this.state;\n    if (\n      state.lastStroke != undefined &&\n      state.lastStroke != this.coordinates.length\n    ) {\n      this.instructions.push(strokeInstruction);\n    }\n    this.reverseHitDetectionInstructions();\n    this.state = null;\n    return super.finish();\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   */\n  applyStroke(state) {\n    if (\n      state.lastStroke != undefined &&\n      state.lastStroke != this.coordinates.length\n    ) {\n      this.instructions.push(strokeInstruction);\n      state.lastStroke = this.coordinates.length;\n    }\n    state.lastStroke = 0;\n    super.applyStroke(state);\n    this.instructions.push(beginPathInstruction);\n  }\n}\n\nexport default CanvasLineStringBuilder;\n","/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\nimport {rotate} from '
 ./transform.js';\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @return {Array<Array<*>>} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anc
 horX, angle, chunk.\n */\nexport function drawTextOnPath(\n  flatCoordinates,\n  offset,\n  end,\n  stride,\n  text,\n  startM,\n  maxAngle,\n  scale,\n  measureAndCacheTextWidth,\n  font,\n  cache,\n  rotation\n) {\n  const result = [];\n\n  // Keep text upright\n  let reverse;\n  if (rotation) {\n    const rotatedCoordinates = rotate(\n      flatCoordinates,\n      offset,\n      end,\n      stride,\n      rotation,\n      [flatCoordinates[offset], flatCoordinates[offset + 1]]\n    );\n    reverse =\n      rotatedCoordinates[0] >\n      rotatedCoordinates[rotatedCoordinates.length - stride];\n  } else {\n    reverse = flatCoordinates[offset] > flatCoordinates[end - stride];\n  }\n\n  const numChars = text.length;\n\n  let x1 = flatCoordinates[offset];\n  let y1 = flatCoordinates[offset + 1];\n  offset += stride;\n  let x2 = flatCoordinates[offset];\n  let y2 = flatCoordinates[offset + 1];\n  let segmentM = 0;\n  let segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1
 , 2));\n  let angleChanged = false;\n\n  let index, previousAngle;\n  for (let i = 0; i < numChars; ++i) {\n    index = reverse ? numChars - i - 1 : i;\n    const char = text[index];\n    const charLength = scale * measureAndCacheTextWidth(font, char, cache);\n    const charM = startM + charLength / 2;\n    while (offset < end - stride && segmentM + segmentLength < charM) {\n      x1 = x2;\n      y1 = y2;\n      offset += stride;\n      x2 = flatCoordinates[offset];\n      y2 = flatCoordinates[offset + 1];\n      segmentM += segmentLength;\n      segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n    }\n    const segmentPos = charM - segmentM;\n    let angle = Math.atan2(y2 - y1, x2 - x1);\n    if (reverse) {\n      angle += angle > 0 ? -Math.PI : Math.PI;\n    }\n    if (previousAngle !== undefined) {\n      let delta = angle - previousAngle;\n      angleChanged = angleChanged || delta !== 0;\n      delta +=\n        delta > Math.PI ? -2 * Math.PI : delta < -M
 ath.PI ? 2 * Math.PI : 0;\n      if (Math.abs(delta) > maxAngle) {\n        return null;\n      }\n    }\n    previousAngle = angle;\n    const interpolate = segmentPos / segmentLength;\n    const x = lerp(x1, x2, interpolate);\n    const y = lerp(y1, y2, interpolate);\n    result[index] = [x, y, charLength / 2, angle, char];\n    startM += charLength;\n  }\n  return angleChanged\n    ? result\n    : [[result[0][0], result[0][1], result[0][2], result[0][3], text]];\n}\n","/**\n * @module ol/render/canvas/Executor\n */\nimport CanvasInstruction from './Instruction.js';\nimport RBush from 'rbush/rbush.js';\nimport {TEXT_ALIGN} from './TextBuilder.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../../has.js';\nimport {\n  apply as applyTransform,\n  compose as composeTransform,\n  create as createTransform,\n  setFromArray as transformSetFromArray,\n} from '../../transform.js';\nimport {\n  createEmpty,\n  createOrUpdate,\n  getHeight,\n  getWidth,\n  intersects,\n} from '../../extent.js'
 ;\nimport {\n  defaultPadding,\n  defaultTextBaseline,\n  drawImageOrLabel,\n} from '../canvas.js';\nimport {\n  defaultTextAlign,\n  measureAndCacheTextWidth,\n  measureTextHeight,\n  measureTextWidths,\n} from '../canvas.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {equals} from '../../array.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {transform2D} from '../../geom/flat/transform.js';\n\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, import(\"../canvas.js\").TextState>} textStates The text states (decluttering).\n * @property {!Object<string, import(\"../canvas.js\").FillState>} fillStates The fill states (decluttering).\n * @property {!Object<string, import(\"..
 /canvas.js\").StrokeState>} strokeStates The stroke states (decluttering).\n */\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nconst tmpExtent = createEmpty();\n\n/**\n * @type {!import(\"../../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p4 = [];\n\nclass Executor {\n  /**\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {boolean} overlaps The replay can have overlapping geometries.\n   * @param {SerializableInstructions} instructions The serializable instructions\n   * @param {import(\"../../size.js\").Size} renderBuffer Render buffer (width/height) in pixels.\n   */\n  constructor(resolution, pixel
 Ratio, overlaps, instructions, renderBuffer) {\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.overlaps = overlaps;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.pixelRatio = pixelRatio;\n\n    /**\n     * @protected\n     * @const\n     * @type {number}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.alignFill_;\n\n    /**\n     * @type {Array<*>}\n     */\n    this.declutterItems = [];\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.instructions = instructions.instructions;\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.coordinates = instructions.coordinates;\n\n    /**\n     * @private\n     * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n     */\n    this.coordinateCache_ = {};\n\n
     /**\n     * @private\n     * @type {import(\"../../size.js\").Size}\n     */\n    this.renderBuffer_ = renderBuffer;\n\n    /**\n     * @private\n     * @type {!import(\"../../transform.js\").Transform}\n     */\n    this.renderedTransform_ = createTransform();\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.pixelCoordinates_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.viewRotation_ = 0;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").FillState>}\n     */\n    this.fillStates = instructions.fillStates || {};\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n     */\n    this.strokeStates = instructions.strokeStates || {};\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").TextState>}\n     */\n    this.textStates 
 = instructions.textStates || {};\n\n    /**\n     * @private\n     * @type {Object<string, Object<string, number>>}\n     */\n    this.widths_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, import(\"../canvas.js\").Label>}\n     */\n    this.labels_ = {};\n  }\n\n  /**\n   * @param {string} text Text.\n   * @param {string} textKey Text style key.\n   * @param {string} fillKey Fill style key.\n   * @param {string} strokeKey Stroke style key.\n   * @return {import(\"../canvas.js\").Label} Label.\n   */\n  createLabel(text, textKey, fillKey, strokeKey) {\n    const key = text + textKey + fillKey + strokeKey;\n    if (this.labels_[key]) {\n      return this.labels_[key];\n    }\n    const strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n    const fillState = fillKey ? this.fillStates[fillKey] : null;\n    const textState = this.textStates[textKey];\n    const pixelRatio = this.pixelRatio;\n    const scale = [\n      textState.scale[0] * pixelRatio,\n     
  textState.scale[1] * pixelRatio,\n    ];\n    const align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n    const strokeWidth =\n      strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n    const lines = text.split('\\n');\n    const numLines = lines.length;\n    const widths = [];\n    const width = measureTextWidths(textState.font, lines, widths);\n    const lineHeight = measureTextHeight(textState.font);\n    const height = lineHeight * numLines;\n    const renderWidth = width + strokeWidth;\n    const contextInstructions = [];\n    // make canvas 2 pixels wider to account for italic text width measurement errors\n    const w = (renderWidth + 2) * scale[0];\n    const h = (height + strokeWidth) * scale[1];\n    /** @type {import(\"../canvas.js\").Label} */\n    const label = {\n      width: w < 0 ? Math.floor(w) : Math.ceil(w),\n      height: h < 0 ? Math.floor(h) : Math.ceil(h),\n      contextInstructions: contextInstructions,\n    };\n    if (scale[0]
  != 1 || scale[1] != 1) {\n      contextInstructions.push('scale', scale);\n    }\n    contextInstructions.push('font', textState.font);\n    if (strokeKey) {\n      contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n      contextInstructions.push('lineWidth', strokeWidth);\n      contextInstructions.push('lineCap', strokeState.lineCap);\n      contextInstructions.push('lineJoin', strokeState.lineJoin);\n      contextInstructions.push('miterLimit', strokeState.miterLimit);\n      // eslint-disable-next-line\n      const Context = WORKER_OFFSCREEN_CANVAS ? OffscreenCanvasRenderingContext2D : CanvasRenderingContext2D;\n      if (Context.prototype.setLineDash) {\n        contextInstructions.push('setLineDash', [strokeState.lineDash]);\n        contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n      }\n    }\n    if (fillKey) {\n      contextInstructions.push('fillStyle', fillState.fillStyle);\n    }\n    contextInstructions.push('textBaseline', 'm
 iddle');\n    contextInstructions.push('textAlign', 'center');\n    const leftRight = 0.5 - align;\n    const x = align * renderWidth + leftRight * strokeWidth;\n    let i;\n    if (strokeKey) {\n      for (i = 0; i < numLines; ++i) {\n        contextInstructions.push('strokeText', [\n          lines[i],\n          x + leftRight * widths[i],\n          0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n        ]);\n      }\n    }\n    if (fillKey) {\n      for (i = 0; i < numLines; ++i) {\n        contextInstructions.push('fillText', [\n          lines[i],\n          x + leftRight * widths[i],\n          0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n        ]);\n      }\n    }\n    this.labels_[key] = label;\n    return label;\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background
  box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n   * @param {Array<*>} fillInstruction Fill instruction.\n   * @param {Array<*>} strokeInstruction Stroke instruction.\n   * @param {boolean} declutter Declutter.\n   */\n  replayTextBackground_(\n    context,\n    p1,\n    p2,\n    p3,\n    p4,\n    fillInstruction,\n    strokeInstruction,\n    declutter\n  ) {\n    context.beginPath();\n    context.moveTo.apply(context, p1);\n    context.lineTo.apply(context, p2);\n    context.lineTo.apply(context, p3);\n    context.lineTo.apply(context, p4);\n    context.lineTo.apply(context, p1);\n    if (fillInstruction) {\n      this.alignFill_ = /** @type {boolean} */ (fillInstruction[2]);\n      if (declutter) {\n        context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (fillInstruction[1]);\n      }\n      this.fill_(contex
 t);\n    }\n    if (strokeInstruction) {\n      this.setStrokeStyle_(\n        context,\n        /** @type {Array<*>} */ (strokeInstruction)\n      );\n      context.stroke();\n    }\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {number} contextScale Scale of the context.\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n   * @param {number} anchorX Anchor X.\n   * @param {number} anchorY Anchor Y.\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n   * @param {number} height Height.\n   * @param {number} opacity Opacity.\n   * @param {number} originX Origin X.\n   * @param {number} originY Origin Y.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} scale Scale.\n   * @param {boolean} snapToPixel Snap to pixel.\n   * @param {number} width Width.\n   * 
 @param {Array<number>} padding Padding.\n   * @param {Array<*>} fillInstruction Fill instruction.\n   * @param {Array<*>} strokeInstruction Stroke instruction.\n   * @return {boolean} The image or label was rendered.\n   */\n  replayImageOrLabel_(\n    context,\n    contextScale,\n    x,\n    y,\n    imageOrLabel,\n    anchorX,\n    anchorY,\n    declutterGroup,\n    height,\n    opacity,\n    originX,\n    originY,\n    rotation,\n    scale,\n    snapToPixel,\n    width,\n    padding,\n    fillInstruction,\n    strokeInstruction\n  ) {\n    const fillStroke = fillInstruction || strokeInstruction;\n    anchorX *= scale[0];\n    anchorY *= scale[1];\n    x -= anchorX;\n    y -= anchorY;\n\n    const w =\n      width + originX > imageOrLabel.width\n        ? imageOrLabel.width - originX\n        : width;\n    const h =\n      height + originY > imageOrLabel.height\n        ? imageOrLabel.height - originY\n        : height;\n    const boxW = padding[3] + w * scale[0] + padding[1];\n   
  const boxH = padding[0] + h * scale[1] + padding[2];\n    const boxX = x - padding[3];\n    const boxY = y - padding[0];\n\n    if (fillStroke || rotation !== 0) {\n      p1[0] = boxX;\n      p4[0] = boxX;\n      p1[1] = boxY;\n      p2[1] = boxY;\n      p2[0] = boxX + boxW;\n      p3[0] = p2[0];\n      p3[1] = boxY + boxH;\n      p4[1] = p3[1];\n    }\n\n    let transform = null;\n    if (rotation !== 0) {\n      const centerX = x + anchorX;\n      const centerY = y + anchorY;\n      transform = composeTransform(\n        tmpTransform,\n        centerX,\n        centerY,\n        1,\n        1,\n        rotation,\n        -centerX,\n        -centerY\n      );\n\n      applyTransform(tmpTransform, p1);\n      applyTransform(tmpTransform, p2);\n      applyTransform(tmpTransform, p3);\n      applyTransform(tmpTransform, p4);\n      createOrUpdate(\n        Math.min(p1[0], p2[0], p3[0], p4[0]),\n        Math.min(p1[1], p2[1], p3[1], p4[1]),\n        Math.max(p1[0], p2[0], p3[0], p4[0]
 ),\n        Math.max(p1[1], p2[1], p3[1], p4[1]),\n        tmpExtent\n      );\n    } else {\n      createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);\n    }\n    this.renderBuffer_[0] = Math.max(\n      this.renderBuffer_[0],\n      getWidth(tmpExtent)\n    );\n    this.renderBuffer_[1] = Math.max(\n      this.renderBuffer_[1],\n      getHeight(tmpExtent)\n    );\n    const canvas = context.canvas;\n    const strokePadding = strokeInstruction\n      ? (strokeInstruction[2] * scale[0]) / 2\n      : 0;\n    const renderBuffer = this.renderBuffer_;\n    const intersects =\n      tmpExtent[0] - strokePadding <=\n        (canvas.width + renderBuffer[0]) / contextScale &&\n      tmpExtent[2] + strokePadding >= -renderBuffer[0] / contextScale &&\n      tmpExtent[1] - strokePadding <=\n        (canvas.height + renderBuffer[1]) / contextScale &&\n      tmpExtent[3] + strokePadding >= -renderBuffer[1] / contextScale;\n\n    if (snapToPixel) {\n      x = Math.round(x);\n      y 
 = Math.round(y);\n    }\n\n    if (declutterGroup) {\n      if (!intersects && declutterGroup[0] == 1) {\n        return false;\n      }\n      const declutterArgs = intersects\n        ? [\n            context,\n            transform ? transform.slice(0) : null,\n            opacity,\n            imageOrLabel,\n            originX,\n            originY,\n            w,\n            h,\n            x,\n            y,\n            scale,\n            tmpExtent.slice(),\n          ]\n        : null;\n      if (declutterArgs) {\n        if (fillStroke) {\n          declutterArgs.push(\n            fillInstruction,\n            strokeInstruction,\n            p1.slice(0),\n            p2.slice(0),\n            p3.slice(0),\n            p4.slice(0)\n          );\n        }\n        declutterGroup.push(declutterArgs);\n      }\n    } else if (intersects) {\n      if (fillStroke) {\n        this.replayTextBackground_(\n          context,\n          p1,\n          p2,\n          p3,\n      
     p4,\n          /** @type {Array<*>} */ (fillInstruction),\n          /** @type {Array<*>} */ (strokeInstruction),\n          false\n        );\n      }\n      drawImageOrLabel(\n        context,\n        transform,\n        opacity,\n        imageOrLabel,\n        originX,\n        originY,\n        w,\n        h,\n        x,\n        y,\n        scale\n      );\n    }\n    return true;\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D} context Context.\n   */\n  fill_(context) {\n    if (this.alignFill_) {\n      const origin = applyTransform(this.renderedTransform_, [0, 0]);\n      const repeatSize = 512 * this.pixelRatio;\n      context.save();\n      context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n      context.rotate(this.viewRotation_);\n    }\n    context.fill();\n    if (this.alignFill_) {\n      context.restore();\n    }\n  }\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {Array<*>} ins
 truction Instruction.\n   */\n  setStrokeStyle_(context, instruction) {\n    context.strokeStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n    context.lineWidth = /** @type {number} */ (instruction[2]);\n    context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n    context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n    context.miterLimit = /** @type {number} */ (instruction[5]);\n    if (context.setLineDash) {\n      context.lineDashOffset = /** @type {number} */ (instruction[7]);\n      context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n    }\n  }\n\n  /**\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} opacity Layer opacity.\n   * @param {?} declutterTree Declutter tree.\n   * @return {?} Declutter tree.\n   */\n  renderDeclutter(declutterGroup, feature, opacity, declu
 tterTree) {\n    /** @type {Array<import(\"../../structs/RBush.js\").Entry>} */\n    const boxes = [];\n    for (let i = 1, ii = declutterGroup.length; i < ii; ++i) {\n      const declutterData = declutterGroup[i];\n      const box = declutterData[11];\n      boxes.push({\n        minX: box[0],\n        minY: box[1],\n        maxX: box[2],\n        maxY: box[3],\n        value: feature,\n      });\n    }\n    if (!declutterTree) {\n      declutterTree = new RBush(9);\n    }\n    let collides = false;\n    for (let i = 0, ii = boxes.length; i < ii; ++i) {\n      if (declutterTree.collides(boxes[i])) {\n        collides = true;\n        break;\n      }\n    }\n    if (!collides) {\n      declutterTree.load(boxes);\n      for (let j = 1, jj = declutterGroup.length; j < jj; ++j) {\n        const declutterData = /** @type {Array} */ (declutterGroup[j]);\n        const context = declutterData[0];\n        const currentAlpha = context.globalAlpha;\n        if (currentAlpha !== opacity) {\n
           context.globalAlpha = opacity;\n        }\n        if (declutterData.length > 12) {\n          this.replayTextBackground_(\n            declutterData[0],\n            declutterData[14],\n            declutterData[15],\n            declutterData[16],\n            declutterData[17],\n            declutterData[12],\n            declutterData[13],\n            true\n          );\n        }\n        drawImageOrLabel.apply(undefined, declutterData);\n        if (currentAlpha !== opacity) {\n          context.globalAlpha = currentAlpha;\n        }\n      }\n    }\n    declutterGroup.length = 1;\n    return declutterTree;\n  }\n\n  /**\n   * @private\n   * @param {string} text The text to draw.\n   * @param {string} textKey The key of the text state.\n   * @param {string} strokeKey The key for the stroke state.\n   * @param {string} fillKey The key for the fill state.\n   * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its a
 nchor.\n   */\n  drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey) {\n    const textState = this.textStates[textKey];\n\n    const label = this.createLabel(text, textKey, fillKey, strokeKey);\n\n    const strokeState = this.strokeStates[strokeKey];\n    const pixelRatio = this.pixelRatio;\n    const align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n    const baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n    const strokeWidth =\n      strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n    // Remove the 2 pixels we added in createLabel() for the anchor\n    const width = label.width / pixelRatio - 2 * textState.scale[0];\n    const anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n    const anchorY =\n      (baseline * label.height) / pixelRatio +\n      2 * (0.5 - baseline) * strokeWidth;\n\n    return {\n      label: label,\n      anchorX: anchorX,\n      anchorY: anchorY,\n    };\n  }\n\n  /**\n   * @pri
 vate\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {number} contextScale Scale of the context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {Array<*>} instructions Instructions array.\n   * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n   * @param {function(import(\"../../Feature.js\").FeatureLike): T|undefined} featureCallback Feature callback.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n   *     extent.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  execute_(\n    context,\n    contextScale,\n    transform,\n    instructions,\n    snapToPixel,\n    featureCallback,\n    opt_hitExtent\n  ) {\n    this.declutterItems.length = 0;\n    /** @type {Array<number>} */\n    let pixelCoordinates;\n    if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n      pixelCoordinates = this
 .pixelCoordinates_;\n    } else {\n      if (!this.pixelCoordinates_) {\n        this.pixelCoordinates_ = [];\n      }\n      pixelCoordinates = transform2D(\n        this.coordinates,\n        0,\n        this.coordinates.length,\n        2,\n        transform,\n        this.pixelCoordinates_\n      );\n      transformSetFromArray(this.renderedTransform_, transform);\n    }\n    let i = 0; // instruction index\n    const ii = instructions.length; // end of instructions\n    let d = 0; // data index\n    let dd; // end of per-instruction data\n    let anchorX,\n      anchorY,\n      prevX,\n      prevY,\n      roundX,\n      roundY,\n      declutterGroup,\n      declutterGroups,\n      image,\n      text,\n      textKey;\n    let strokeKey, fillKey;\n    let pendingFill = 0;\n    let pendingStroke = 0;\n    let lastFillInstruction = null;\n    let lastStrokeInstruction = null;\n    const coordinateCache = this.coordinateCache_;\n    const viewRotation = this.viewRotation_;\n    cons
 t viewRotationFromTransform =\n      Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n\n    const state = /** @type {import(\"../../render.js\").State} */ ({\n      context: context,\n      pixelRatio: this.pixelRatio,\n      resolution: this.resolution,\n      rotation: viewRotation,\n    });\n\n    // When the batch size gets too big, performance decreases. 200 is a good\n    // balance between batch size and number of fill/stroke instructions.\n    const batchSize =\n      this.instructions != instructions || this.overlaps ? 0 : 200;\n    let /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n    let x, y;\n    while (i < ii) {\n      const instruction = instructions[i];\n      const type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n      switch (type) {\n        case CanvasInstruction.BEGIN_GEOMETRY:\n          feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n          if (!feature.
 getGeometry()) {\n            i = /** @type {number} */ (instruction[2]);\n          } else if (\n            opt_hitExtent !== undefined &&\n            !intersects(opt_hitExtent, instruction[3])\n          ) {\n            i = /** @type {number} */ (instruction[2]) + 1;\n          } else {\n            ++i;\n          }\n          break;\n        case CanvasInstruction.BEGIN_PATH:\n          if (pendingFill > batchSize) {\n            this.fill_(context);\n            pendingFill = 0;\n          }\n          if (pendingStroke > batchSize) {\n            context.stroke();\n            pendingStroke = 0;\n          }\n          if (!pendingFill && !pendingStroke) {\n            context.beginPath();\n            prevX = NaN;\n            prevY = NaN;\n          }\n          ++i;\n          break;\n        case CanvasInstruction.CIRCLE:\n          d = /** @type {number} */ (instruction[1]);\n          const x1 = pixelCoordinates[d];\n          const y1 = pixelCoordinates[d + 1];\n    
       const x2 = pixelCoordinates[d + 2];\n          const y2 = pixelCoordinates[d + 3];\n          const dx = x2 - x1;\n          const dy = y2 - y1;\n          const r = Math.sqrt(dx * dx + dy * dy);\n          context.moveTo(x1 + r, y1);\n          context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n          ++i;\n          break;\n        case CanvasInstruction.CLOSE_PATH:\n          context.closePath();\n          ++i;\n          break;\n        case CanvasInstruction.CUSTOM:\n          d = /** @type {number} */ (instruction[1]);\n          dd = instruction[2];\n          const geometry = /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n          const renderer = instruction[4];\n          const fn = instruction.length == 6 ? instruction[5] : undefined;\n          state.geometry = geometry;\n          state.feature = feature;\n          if (!(i in coordinateCache)) {\n            coordinateCache[i] = [];\n          }\n          const coords = coord
 inateCache[i];\n          if (fn) {\n            fn(pixelCoordinates, d, dd, 2, coords);\n          } else {\n            coords[0] = pixelCoordinates[d];\n            coords[1] = pixelCoordinates[d + 1];\n            coords.length = 2;\n          }\n          renderer(coords, state);\n          ++i;\n          break;\n        case CanvasInstruction.DRAW_IMAGE:\n          d = /** @type {number} */ (instruction[1]);\n          dd = /** @type {number} */ (instruction[2]);\n          image = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (instruction[3]);\n\n          // Remaining arguments in DRAW_IMAGE are in alphabetical order\n          anchorX = /** @type {number} */ (instruction[4]);\n          anchorY = /** @type {number} */ (instruction[5]);\n          declutterGroups = featureCallback ? null : instruction[6];\n          let height = /** @type {number} */ (instruction[7]);\n          const opacity = /** @type {number} */ (instruction[8]);\n          const or
 iginX = /** @type {number} */ (instruction[9]);\n          const originY = /** @type {number} */ (instruction[10]);\n          const rotateWithView = /** @type {boolean} */ (instruction[11]);\n          let rotation = /** @type {number} */ (instruction[12]);\n          const scale = /** @type {import(\"../../size.js\").Size} */ (instruction[13]);\n          let width = /** @type {number} */ (instruction[14]);\n\n          if (!image && instruction.length >= 19) {\n            // create label images\n            text = /** @type {string} */ (instruction[18]);\n            textKey = /** @type {string} */ (instruction[19]);\n            strokeKey = /** @type {string} */ (instruction[20]);\n            fillKey = /** @type {string} */ (instruction[21]);\n            const labelWithAnchor = this.drawLabelWithPointPlacement_(\n              text,\n              textKey,\n              strokeKey,\n              fillKey\n            );\n            image = labelWithAnchor.label;\n           
  instruction[3] = image;\n            const textOffsetX = /** @type {number} */ (instruction[22]);\n            anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n            instruction[4] = anchorX;\n            const textOffsetY = /** @type {number} */ (instruction[23]);\n            anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n            instruction[5] = anchorY;\n            height = image.height;\n            instruction[7] = height;\n            width = image.width;\n            instruction[14] = width;\n          }\n\n          let geometryWidths;\n          if (instruction.length > 24) {\n            geometryWidths = /** @type {number} */ (instruction[24]);\n          }\n\n          let padding, backgroundFill, backgroundStroke;\n          if (instruction.length > 16) {\n            padding = /** @type {Array<number>} */ (instruction[15]);\n            backgroundFill = /** @type {boolean} */ (instruction[16]);\n            backgr
 oundStroke = /** @type {boolean} */ (instruction[17]);\n          } else {\n            padding = defaultPadding;\n            backgroundFill = false;\n            backgroundStroke = false;\n          }\n\n          if (rotateWithView && viewRotationFromTransform) {\n            // Canvas is expected to be rotated to reverse view rotation.\n            rotation += viewRotation;\n          } else if (!rotateWithView && !viewRotationFromTransform) {\n            // Canvas is not rotated, images need to be rotated back to be north-up.\n            rotation -= viewRotation;\n          }\n          let widthIndex = 0;\n          let declutterGroupIndex = 0;\n          for (; d < dd; d += 2) {\n            if (\n              geometryWidths &&\n              geometryWidths[widthIndex++] < width / this.pixelRatio\n            ) {\n              continue;\n            }\n            if (declutterGroups) {\n              const index = Math.floor(declutterGroupIndex);\n              declutter
 Group =\n                declutterGroups.length < index + 1\n                  ? [declutterGroups[0][0]]\n                  : declutterGroups[index];\n            }\n            const rendered = this.replayImageOrLabel_(\n              context,\n              contextScale,\n              pixelCoordinates[d],\n              pixelCoordinates[d + 1],\n              image,\n              anchorX,\n              anchorY,\n              declutterGroup,\n              height,\n              opacity,\n              originX,\n              originY,\n              rotation,\n              scale,\n              snapToPixel,\n              width,\n              padding,\n              backgroundFill\n                ? /** @type {Array<*>} */ (lastFillInstruction)\n                : null,\n              backgroundStroke\n                ? /** @type {Array<*>} */ (lastStrokeInstruction)\n                : null\n            );\n            if (\n              rendered &&\n              declutterGr
 oup &&\n              declutterGroups[declutterGroups.length - 1] !== declutterGroup\n            ) {\n              declutterGroups.push(declutterGroup);\n            }\n            if (declutterGroup) {\n              if (declutterGroup.length - 1 === declutterGroup[0]) {\n                this.declutterItems.push(this, declutterGroup, feature);\n              }\n              declutterGroupIndex += 1 / declutterGroup[0];\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.DRAW_CHARS:\n          const begin = /** @type {number} */ (instruction[1]);\n          const end = /** @type {number} */ (instruction[2]);\n          const baseline = /** @type {number} */ (instruction[3]);\n          declutterGroup = featureCallback ? null : instruction[4];\n          const overflow = /** @type {number} */ (instruction[5]);\n          fillKey = /** @type {string} */ (instruction[6]);\n          const maxAngle = /** @type {number} */ (instruction[7]);\n 
          const measurePixelRatio = /** @type {number} */ (instruction[8]);\n          const offsetY = /** @type {number} */ (instruction[9]);\n          strokeKey = /** @type {string} */ (instruction[10]);\n          const strokeWidth = /** @type {number} */ (instruction[11]);\n          text = /** @type {string} */ (instruction[12]);\n          textKey = /** @type {string} */ (instruction[13]);\n          const pixelRatioScale = [\n            /** @type {number} */ (instruction[14]),\n            /** @type {number} */ (instruction[14]),\n          ];\n\n          const textState = this.textStates[textKey];\n          const font = textState.font;\n          const textScale = [\n            textState.scale[0] * measurePixelRatio,\n            textState.scale[1] * measurePixelRatio,\n          ];\n\n          let cachedWidths;\n          if (font in this.widths_) {\n            cachedWidths = this.widths_[font];\n          } else {\n            cachedWidths = {};\n            this.wid
 ths_[font] = cachedWidths;\n          }\n\n          const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n          const textLength =\n            Math.abs(textScale[0]) *\n            measureAndCacheTextWidth(font, text, cachedWidths);\n          if (overflow || textLength <= pathLength) {\n            const textAlign = this.textStates[textKey].textAlign;\n            const startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n            const parts = drawTextOnPath(\n              pixelCoordinates,\n              begin,\n              end,\n              2,\n              text,\n              startM,\n              maxAngle,\n              Math.abs(textScale[0]),\n              measureAndCacheTextWidth,\n              font,\n              cachedWidths,\n              viewRotationFromTransform ? 0 : this.viewRotation_\n            );\n            if (parts) {\n              let rendered = false;\n              let c, cc, chars, label, part;\n             
  if (strokeKey) {\n                for (c = 0, cc = parts.length; c < cc; ++c) {\n                  part = parts[c]; // x, y, anchorX, rotation, chunk\n                  chars = /** @type {string} */ (part[4]);\n                  label = this.createLabel(chars, textKey, '', strokeKey);\n                  anchorX = /** @type {number} */ (part[2]) + strokeWidth;\n                  anchorY =\n                    baseline * label.height +\n                    ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n                      textScale[0] -\n                    offsetY;\n                  rendered =\n                    this.replayImageOrLabel_(\n                      context,\n                      contextScale,\n                      /** @type {number} */ (part[0]),\n                      /** @type {number} */ (part[1]),\n                      label,\n                      anchorX,\n                      anchorY,\n                      declutterGroup,\n                      l
 abel.height,\n                      1,\n                      0,\n                      0,\n                      /** @type {number} */ (part[3]),\n                      pixelRatioScale,\n                      false,\n                      label.width,\n                      defaultPadding,\n                      null,\n                      null\n                    ) || rendered;\n                }\n              }\n              if (fillKey) {\n                for (c = 0, cc = parts.length; c < cc; ++c) {\n                  part = parts[c]; // x, y, anchorX, rotation, chunk\n                  chars = /** @type {string} */ (part[4]);\n                  label = this.createLabel(chars, textKey, fillKey, '');\n                  anchorX = /** @type {number} */ (part[2]);\n                  anchorY = baseline * label.height - offsetY;\n                  rendered =\n                    this.replayImageOrLabel_(\n                      context,\n                      contextScale,\n      
                 /** @type {number} */ (part[0]),\n                      /** @type {number} */ (part[1]),\n                      label,\n                      anchorX,\n                      anchorY,\n                      declutterGroup,\n                      label.height,\n                      1,\n                      0,\n                      0,\n                      /** @type {number} */ (part[3]),\n                      pixelRatioScale,\n                      false,\n                      label.width,\n                      defaultPadding,\n                      null,\n                      null\n                    ) || rendered;\n                }\n              }\n              if (rendered) {\n                this.declutterItems.push(this, declutterGroup, feature);\n              }\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.END_GEOMETRY:\n          if (featureCallback !== undefined) {\n            feature = /** @type {im
 port(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n            const result = featureCallback(feature);\n            if (result) {\n              return result;\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.FILL:\n          if (batchSize) {\n            pendingFill++;\n          } else {\n            this.fill_(context);\n          }\n          ++i;\n          break;\n        case CanvasInstruction.MOVE_TO_LINE_TO:\n          d = /** @type {number} */ (instruction[1]);\n          dd = /** @type {number} */ (instruction[2]);\n          x = pixelCoordinates[d];\n          y = pixelCoordinates[d + 1];\n          roundX = (x + 0.5) | 0;\n          roundY = (y + 0.5) | 0;\n          if (roundX !== prevX || roundY !== prevY) {\n            context.moveTo(x, y);\n            prevX = roundX;\n            prevY = roundY;\n          }\n          for (d += 2; d < dd; d += 2) {\n            x = pixelCoordinates[d];\n            y = pixe
 lCoordinates[d + 1];\n            roundX = (x + 0.5) | 0;\n            roundY = (y + 0.5) | 0;\n            if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n              context.lineTo(x, y);\n              prevX = roundX;\n              prevY = roundY;\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.SET_FILL_STYLE:\n          lastFillInstruction = instruction;\n          this.alignFill_ = instruction[2];\n\n          if (pendingFill) {\n            this.fill_(context);\n            pendingFill = 0;\n            if (pendingStroke) {\n              context.stroke();\n              pendingStroke = 0;\n            }\n          }\n\n          context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n          ++i;\n          break;\n        case CanvasInstruction.SET_STROKE_STYLE:\n          lastStrokeInstruction = instruction;\n          if (pendingStroke) {\n            context.stroke();\n  
           pendingStroke = 0;\n          }\n          this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n          ++i;\n          break;\n        case CanvasInstruction.STROKE:\n          if (batchSize) {\n            pendingStroke++;\n          } else {\n            context.stroke();\n          }\n          ++i;\n          break;\n        default:\n          ++i; // consume the instruction anyway, to avoid an infinite loop\n          break;\n      }\n    }\n    if (pendingFill) {\n      this.fill_(context);\n    }\n    if (pendingStroke) {\n      context.stroke();\n    }\n    return undefined;\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {number} contextScale Scale of the context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n   */\n  execute(context, contextScal
 e, transform, viewRotation, snapToPixel) {\n    this.viewRotation_ = viewRotation;\n    this.execute_(\n      context,\n      contextScale,\n      transform,\n      this.instructions,\n      snapToPixel,\n      undefined,\n      undefined\n    );\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {function(import(\"../../Feature.js\").FeatureLike): T=} opt_featureCallback\n   *     Feature callback.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n   *     extent.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  executeHitDetection(\n    context,\n    transform,\n    viewRotation,\n    opt_featureCallback,\n    opt_hitExtent\n  ) {\n    this.viewRotation_ = viewRotation;\n    return this.execute_(\n      context,\n      1,\n      transform,\n    
   this.hitDetectionInstructions,\n      true,\n      opt_featureCallback,\n      opt_hitExtent\n    );\n  }\n}\n\nexport default Executor;\n","/**\n * @module ol/render/canvas/ExecutorGroup\n */\n\nimport BuilderType from './BuilderType.js';\nimport Executor from './Executor.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {\n  compose as composeTransform,\n  create as createTransform,\n} from '../../transform.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {isEmpty} from '../../obj.js';\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {transform2D} from '../../geom/flat/transform.js';\n\n/**\n * @const\n * @type {Array<import(\"./BuilderType.js\").default>}\n */\nconst ORDER = [\n  BuilderType.POLYGON,\n  BuilderType.CIRCLE,\n  BuilderType.LINE_STRING,\n  BuilderType.IMAGE,\n  BuilderType.TEXT,\n  BuilderType.DEFAULT,\n];\n\nclass ExecutorGroup {\n  /**\n   * @param {import(\"../../extent.js\").Extent} maxExten
 t Max extent for clipping. When a\n   * `maxExtent` was set on the Buillder for this executor group, the same `maxExtent`\n   * should be set here, unless the target context does not exceet that extent (which\n   * can be the case when rendering to tiles).\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {boolean} overlaps The executor group can have overlapping geometries.\n   * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Builder.js\").SerializableInstructions>>} allInstructions\n   * The serializable instructions.\n   * @param {number=} opt_renderBuffer Optional rendering buffer.\n   */\n  constructor(\n    maxExtent,\n    resolution,\n    pixelRatio,\n    overlaps,\n    allInstructions,\n    opt_renderBuffer\n  ) {\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent_ = maxExtent;\n\n    /**\n     * @private\n     * @type {boolean}\n    
  */\n    this.overlaps_ = overlaps;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.resolution_ = resolution;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.renderBuffer_ = opt_renderBuffer;\n\n    /**\n     * @private\n     * @type {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Executor\").default>>}\n     */\n    this.executorsByZIndex_ = {};\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.hitDetectionContext_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.hitDetectionTransform_ = createTransform();\n\n    this.createExecutors_(allInstructions);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   */\n  cl
 ip(context, transform) {\n    const flatClipCoords = this.getClipCoords(transform);\n    context.beginPath();\n    context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n    context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n    context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n    context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n    context.clip();\n  }\n\n  /**\n   * Create executors and populate them using the provided instructions.\n   * @private\n   * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Builder.js\").SerializableInstructions>>} allInstructions The serializable instructions\n   */\n  createExecutors_(allInstructions) {\n    for (const zIndex in allInstructions) {\n      let executors = this.executorsByZIndex_[zIndex];\n      if (executors === undefined) {\n        executors = {};\n        this.executorsByZIndex_[zIndex] = executors;\n      }\n      const instructionByZindex = allInstructions[zIndex];\n      const render
 Buffer = [this.renderBuffer_ || 0, this.renderBuffer_ || 0];\n      for (const builderType in instructionByZindex) {\n        const instructions = instructionByZindex[builderType];\n        executors[builderType] = new Executor(\n          this.resolution_,\n          this.pixelRatio_,\n          this.overlaps_,\n          instructions,\n          renderBuffer\n        );\n      }\n    }\n  }\n\n  /**\n   * @param {Array<import(\"./BuilderType.js\").default>} executors Executors.\n   * @return {boolean} Has executors of the provided types.\n   */\n  hasExecutors(executors) {\n    for (const zIndex in this.executorsByZIndex_) {\n      const candidates = this.executorsByZIndex_[zIndex];\n      for (let i = 0, ii = executors.length; i < ii; ++i) {\n        if (executors[i] in candidates) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution R
 esolution.\n   * @param {number} rotation Rotation.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(import(\"../../Feature.js\").FeatureLike): T} callback Feature callback.\n   * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    resolution,\n    rotation,\n    hitTolerance,\n    callback,\n    declutteredFeatures\n  ) {\n    hitTolerance = Math.round(hitTolerance);\n    const contextSize = hitTolerance * 2 + 1;\n    const transform = composeTransform(\n      this.hitDetectionTransform_,\n      hitTolerance + 0.5,\n      hitTolerance + 0.5,\n      1 / resolution,\n      -1 / resolution,\n      -rotation,\n      -coordinate[0],\n      -coordinate[1]\n    );\n\n    if (!this.hitDetectionContext_) {\n      this.hitDetectionContext_ = createCanvasContext2D(\n        contextSize,\n    
     contextSize\n      );\n    }\n    const context = this.hitDetectionContext_;\n\n    if (\n      context.canvas.width !== contextSize ||\n      context.canvas.height !== contextSize\n    ) {\n      context.canvas.width = contextSize;\n      context.canvas.height = contextSize;\n    } else {\n      context.clearRect(0, 0, contextSize, contextSize);\n    }\n\n    /**\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    let hitExtent;\n    if (this.renderBuffer_ !== undefined) {\n      hitExtent = createEmpty();\n      extendCoordinate(hitExtent, coordinate);\n      buffer(\n        hitExtent,\n        resolution * (this.renderBuffer_ + hitTolerance),\n        hitExtent\n      );\n    }\n\n    const mask = getCircleArray(hitTolerance);\n\n    let builderType;\n\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @return {?} Callback result.\n     */\n    function featureCallback(feature) {\n      const imageData = context.getImageD
 ata(0, 0, contextSize, contextSize)\n        .data;\n      for (let i = 0; i < contextSize; i++) {\n        for (let j = 0; j < contextSize; j++) {\n          if (mask[i][j]) {\n            if (imageData[(j * contextSize + i) * 4 + 3] > 0) {\n              let result;\n              if (\n                !(\n                  declutteredFeatures &&\n                  (builderType == BuilderType.IMAGE ||\n                    builderType == BuilderType.TEXT)\n                ) ||\n                declutteredFeatures.indexOf(feature) !== -1\n              ) {\n                result = callback(feature);\n              }\n              if (result) {\n                return result;\n              } else {\n                context.clearRect(0, 0, contextSize, contextSize);\n                return undefined;\n              }\n            }\n          }\n        }\n      }\n    }\n\n    /** @type {Array<number>} */\n    const zs = Object.keys(this.executorsByZIndex_).map(Number);\n    zs.so
 rt(numberSafeCompareFunction);\n\n    let i, j, executors, executor, result;\n    for (i = zs.length - 1; i >= 0; --i) {\n      const zIndexKey = zs[i].toString();\n      executors = this.executorsByZIndex_[zIndexKey];\n      for (j = ORDER.length - 1; j >= 0; --j) {\n        builderType = ORDER[j];\n        executor = executors[builderType];\n        if (executor !== undefined) {\n          result = executor.executeHitDetection(\n            context,\n            transform,\n            rotation,\n            featureCallback,\n            hitExtent\n          );\n          if (result) {\n            return result;\n          }\n        }\n      }\n    }\n    return undefined;\n  }\n\n  /**\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @return {Array<number>} Clip coordinates.\n   */\n  getClipCoords(transform) {\n    const maxExtent = this.maxExtent_;\n    if (!maxExtent) {\n      return null;\n    }\n    const minX = maxExtent[0];\n    const mi
 nY = maxExtent[1];\n    const maxX = maxExtent[2];\n    const maxY = maxExtent[3];\n    const flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n    transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n    return flatClipCoords;\n  }\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  isEmpty() {\n    return isEmpty(this.executorsByZIndex_);\n  }\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {number} contextScale Scale of the context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n   * @param {Array<import(\"./BuilderType.js\").default>=} opt_builderTypes Ordered replay types to replay.\n   *     Default is {@link module:ol/render/replay~ORDER}\n   * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>=} opt_declutterReplays Declutter replays.\n   */
 \n  execute(\n    context,\n    contextScale,\n    transform,\n    viewRotation,\n    snapToPixel,\n    opt_builderTypes,\n    opt_declutterReplays\n  ) {\n    /** @type {Array<number>} */\n    const zs = Object.keys(this.executorsByZIndex_).map(Number);\n    zs.sort(numberSafeCompareFunction);\n\n    // setup clipping so that the parts of over-simplified geometries are not\n    // visible outside the current extent when panning\n    if (this.maxExtent_) {\n      context.save();\n      this.clip(context, transform);\n    }\n\n    const builderTypes = opt_builderTypes ? opt_builderTypes : ORDER;\n    let i, ii, j, jj, replays, replay;\n    for (i = 0, ii = zs.length; i < ii; ++i) {\n      const zIndexKey = zs[i].toString();\n      replays = this.executorsByZIndex_[zIndexKey];\n      for (j = 0, jj = builderTypes.length; j < jj; ++j) {\n        const builderType = builderTypes[j];\n        replay = replays[builderType];\n        if (replay !== undefined) {\n          if (\n           
  opt_declutterReplays &&\n            (builderType == BuilderType.IMAGE ||\n              builderType == BuilderType.TEXT)\n          ) {\n            const declutter = opt_declutterReplays[zIndexKey];\n            if (!declutter) {\n              opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n            } else {\n              declutter.push(replay, transform.slice(0));\n            }\n          } else {\n            replay.execute(\n              context,\n              contextScale,\n              transform,\n              viewRotation,\n              snapToPixel\n            );\n          }\n        }\n      }\n    }\n\n    if (this.maxExtent_) {\n      context.restore();\n    }\n  }\n}\n\n/**\n * This cache is used for storing calculated pixel circles for increasing performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<Array<(boolean|undefined)>>>}\n */\nconst circleArrayCache = {\n  0: [[true]],\n};\
 n\n/**\n * This method fills a row in the array from the given coordinate to the\n * middle with `true`.\n * @param {Array<Array<(boolean|undefined)>>} array The array that will be altered.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n */\nfunction fillCircleArrayRowToMiddle(array, x, y) {\n  let i;\n  const radius = Math.floor(array.length / 2);\n  if (x >= radius) {\n    for (i = radius; i < x; i++) {\n      array[i][y] = true;\n    }\n  } else if (x < radius) {\n    for (i = x + 1; i < radius; i++) {\n      array[i][y] = true;\n    }\n  }\n}\n\n/**\n * This methods creates a circle inside a fitting array. Points inside the\n * circle are marked by true, points on the outside are undefined.\n * It uses the midpoint circle algorithm.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<Array<(boolean|undefined)>>} An array with marked circle points.\n */\nexport function getCircleArray(radius) {\n  if (circl
 eArrayCache[radius] !== undefined) {\n    return circleArrayCache[radius];\n  }\n\n  const arraySize = radius * 2 + 1;\n  const arr = new Array(arraySize);\n  for (let i = 0; i < arraySize; i++) {\n    arr[i] = new Array(arraySize);\n  }\n\n  let x = radius;\n  let y = 0;\n  let error = 0;\n\n  while (x >= y) {\n    fillCircleArrayRowToMiddle(arr, radius + x, radius + y);\n    fillCircleArrayRowToMiddle(arr, radius + y, radius + x);\n    fillCircleArrayRowToMiddle(arr, radius - y, radius + x);\n    fillCircleArrayRowToMiddle(arr, radius - x, radius + y);\n    fillCircleArrayRowToMiddle(arr, radius - x, radius - y);\n    fillCircleArrayRowToMiddle(arr, radius - y, radius - x);\n    fillCircleArrayRowToMiddle(arr, radius + y, radius - x);\n    fillCircleArrayRowToMiddle(arr, radius + x, radius - y);\n\n    y++;\n    error += 1 + 2 * y;\n    if (2 * (error - x) + 1 > 0) {\n      x -= 1;\n      error += 1 - 2 * x;\n    }\n  }\n\n  circleArrayCache[radius] = arr;\n  return arr;\n}\n\n/**
 \n * @param {!Object<string, Array<*>>} declutterReplays Declutter replays.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} opacity Opacity.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {Array<import(\"../../PluggableMap.js\").DeclutterItems>} declutterItems Declutter items.\n */\nexport function replayDeclutter(\n  declutterReplays,\n  context,\n  rotation,\n  opacity,\n  snapToPixel,\n  declutterItems\n) {\n  const zs = Object.keys(declutterReplays)\n    .map(Number)\n    .sort(numberSafeCompareFunction);\n  for (let z = 0, zz = zs.length; z < zz; ++z) {\n    const executorData = declutterReplays[zs[z].toString()];\n    let currentExecutor;\n    for (let i = 0, ii = executorData.length; i < ii; ) {\n      const executor = executorData[i++];\n      const transform = executorData[i++];\n      executor.execute(context, 1, transform, rotation, snapToPixel);\n      if (execut
 or !== currentExecutor && executor.declutterItems.length > 0) {\n        currentExecutor = executor;\n        declutterItems.push({\n          items: executor.declutterItems,\n          opacity: opacity,\n        });\n      }\n    }\n  }\n}\n\nexport default ExecutorGroup;\n","/**\n * @module ol/render/canvas/hitdetet\n */\n\nimport CanvasImmediateRenderer from './Immediate.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport IconAnchorUnits from '../../style/IconAnchorUnits.js';\nimport {Icon} from '../../style.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {numberSafeCompareFunction} from '../../array.js';\n\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.
 js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(\n  size,\n  transforms,\n  features,\n  styleFunction,\n  extent,\n  resolution,\n  rotation\n) {\n  const width = size[0] / 2;\n  const height = size[1] / 2;\n  const context = createCanvasContext2D(width, height);\n  context.imageSmoothingEnabled = false;\n  const canvas = context.canvas;\n  const renderer = new CanvasImmediateRenderer(\n    context,\n    0.5,\n    extent,\n    null,\n    rotation\n  );\n  const featureCount = features.length;\n  // Stretch hit detection index to use the whole available color range\n  const indexFactor = Math.floor((256 * 256 
 * 256 - 1) / featureCount);\n  const featuresByZIndex = {};\n  for (let i = 1; i <= featureCount; ++i) {\n    const feature = features[i - 1];\n    const featureStyleFunction = feature.getStyleFunction() || styleFunction;\n    if (!styleFunction) {\n      continue;\n    }\n    let styles = featureStyleFunction(feature, resolution);\n    if (!styles) {\n      continue;\n    }\n    if (!Array.isArray(styles)) {\n      styles = [styles];\n    }\n    const index = i * indexFactor;\n    const color = '#' + ('000000' + index.toString(16)).slice(-6);\n    for (let j = 0, jj = styles.length; j < jj; ++j) {\n      const originalStyle = styles[j];\n      const style = originalStyle.clone();\n      const fill = style.getFill();\n      if (fill) {\n        fill.setColor(color);\n      }\n      const stroke = style.getStroke();\n      if (stroke) {\n        stroke.setColor(color);\n      }\n      style.setText(undefined);\n      const image = originalStyle.getImage();\n      if (image) {\n      
   const imgSize = image.getImageSize();\n        if (!imgSize) {\n          continue;\n        }\n\n        const canvas = document.createElement('canvas');\n        canvas.width = imgSize[0];\n        canvas.height = imgSize[1];\n        const imgContext = canvas.getContext('2d', {alpha: false});\n        imgContext.fillStyle = color;\n        const img = imgContext.canvas;\n        imgContext.fillRect(0, 0, img.width, img.height);\n        const width = imgSize ? imgSize[0] : img.width;\n        const height = imgSize ? imgSize[1] : img.height;\n        const iconContext = createCanvasContext2D(width, height);\n        iconContext.drawImage(img, 0, 0);\n        style.setImage(\n          new Icon({\n            img: img,\n            imgSize: imgSize,\n            anchor: image.getAnchor(),\n            anchorXUnits: IconAnchorUnits.PIXELS,\n            anchorYUnits: IconAnchorUnits.PIXELS,\n            offset: image.getOrigin(),\n            size: image.getSize(),\n            op
 acity: image.getOpacity(),\n            scale: image.getScale(),\n            rotation: image.getRotation(),\n            rotateWithView: image.getRotateWithView(),\n          })\n        );\n      }\n      const zIndex = Number(style.getZIndex());\n      let byGeometryType = featuresByZIndex[zIndex];\n      if (!byGeometryType) {\n        byGeometryType = {};\n        featuresByZIndex[zIndex] = byGeometryType;\n        byGeometryType[GeometryType.POLYGON] = [];\n        byGeometryType[GeometryType.CIRCLE] = [];\n        byGeometryType[GeometryType.LINE_STRING] = [];\n        byGeometryType[GeometryType.POINT] = [];\n      }\n      const geometry = style.getGeometryFunction()(feature);\n      if (geometry && intersects(extent, geometry.getExtent())) {\n        byGeometryType[geometry.getType().replace('Multi', '')].push(\n          geometry,\n          style\n        );\n      }\n    }\n  }\n\n  const zIndexKeys = Object.keys(featuresByZIndex)\n    .map(Number)\n    .sort(numberSafe
 CompareFunction);\n  for (let i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n    const byGeometryType = featuresByZIndex[zIndexKeys[i]];\n    for (const type in byGeometryType) {\n      const geomAndStyle = byGeometryType[type];\n      for (let j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n        renderer.setStyle(geomAndStyle[j + 1]);\n        for (let k = 0, kk = transforms.length; k < kk; ++k) {\n          renderer.setTransform(transforms[k]);\n          renderer.drawGeometry(geomAndStyle[j]);\n        }\n      }\n    }\n  }\n  return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<import(\"../../Feature\").FeatureLike>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImage
 Data()`.\n * @return {Array<import(\"../../Feature\").FeatureLike>} features Features.\n */\nexport function hitDetect(pixel, features, imageData) {\n  const resultFeatures = [];\n  if (imageData) {\n    const index =\n      (Math.round(pixel[0] / 2) + Math.round(pixel[1] / 2) * imageData.width) *\n      4;\n    const r = imageData.data[index];\n    const g = imageData.data[index + 1];\n    const b = imageData.data[index + 2];\n    const i = b + 256 * (g + 256 * r);\n    const indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n    if (i && i % indexFactor === 0) {\n      resultFeatures.push(features[i / indexFactor - 1]);\n    }\n  }\n  return resultFeatures;\n}\n","/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport ExecutorGroup, {\n  replayDeclutter,\n} from '../../render/canvas/ExecutorGroup.js';\nimport ViewHint from '../../ViewHint.js';
 \nimport {\n  apply,\n  makeInverse,\n  makeScale,\n  toString as transformToString,\n} from '../../transform.js';\nimport {\n  buffer,\n  containsExtent,\n  createEmpty,\n  getWidth,\n  intersects as intersectsExtent,\n  wrapX as wrapExtentX,\n} from '../../extent.js';\nimport {\n  createHitDetectionImageData,\n  hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {\n  defaultOrder as defaultRenderOrder,\n  getTolerance as getRenderTolerance,\n  getSquaredTolerance as getSquaredRenderTolerance,\n  renderFeature,\n} from '../vector.js';\nimport {\n  fromUserExtent,\n  getTransformFromProjections,\n  getUserProjection,\n  toUserExtent,\n} from '../../proj.js';\nimport {getUid} from '../../util.js';\nimport {wrapX as wrapCoordinateX} from '../../coordinate.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nclass CanvasVectorLayerRenderer extends CanvasLayerRenderer {\n  /**\n   * @param {import(\"../../layer/Vector.js\").default} vectorLayer Ve
 ctor layer.\n   */\n  constructor(vectorLayer) {\n    super(vectorLayer);\n\n    /** @private */\n    this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n    /**\n     * @type {boolean}\n     */\n    this.animatingOrInteracting_;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.dirty_ = false;\n\n    /**\n     * @type {ImageData}\n     */\n    this.hitDetectionImageData_ = null;\n\n    /**\n     * @type {Array<import(\"../../Feature.js\").default>}\n     */\n    this.renderedFeatures_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedResolution_ = NaN;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRotation_;\n\n    /**\n     * @private\n     * @t
 ype {import(\"../../coordinate\").Coordinate}\n     */\n    this.renderedCenter_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../proj/Projection\").default}\n     */\n    this.renderedProjection_ = null;\n\n    /**\n     * @private\n     * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n     */\n    this.renderedRenderOrder_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n     */\n    this.replayGroup_ = null;\n\n    /**\n     * A new replay group had to be created by `prepareFrame()`\n     * @type {boolean}\n     */\n    this.replayGroupChanged = true;\n  }\n\n  /**\n   * Get a rendering container from an existing target, if compatible.\n   * @param {HTMLElement} target Potential render target.\n   * @param {string} transform CSS Transform.\n   * @param {number} opacity Opacity.\n   */\n  useContainer(target, transform, opacity) {\n    if (opacity 
 < 1) {\n      target = null;\n    }\n    super.useContainer(target, transform, opacity);\n  }\n\n  /**\n   * Render the layer.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */\n  renderFrame(frameState, target) {\n    const pixelRatio = frameState.pixelRatio;\n    const layerState = frameState.layerStatesArray[frameState.layerIndex];\n\n    // set forward and inverse pixel transforms\n    makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);\n    makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n    const canvasTransform = transformToString(this.pixelTransform);\n\n    this.useContainer(target, canvasTransform, layerState.opacity);\n    const context = this.context;\n    const canvas = context.canvas;\n\n    const replayGroup = this.replayGroup_;\n    if (!replayGroup || replayGroup.isEmpt
 y()) {\n      if (!this.containerReused && canvas.width > 0) {\n        canvas.width = 0;\n      }\n      return this.container;\n    }\n\n    // resize and clear\n    const width = Math.round(frameState.size[0] * pixelRatio);\n    const height = Math.round(frameState.size[1] * pixelRatio);\n    if (canvas.width != width || canvas.height != height) {\n      canvas.width = width;\n      canvas.height = height;\n      if (canvas.style.transform !== canvasTransform) {\n        canvas.style.transform = canvasTransform;\n      }\n    } else if (!this.containerReused) {\n      context.clearRect(0, 0, width, height);\n    }\n\n    this.preRender(context, frameState);\n\n    const extent = frameState.extent;\n    const viewState = frameState.viewState;\n    const center = viewState.center;\n    const resolution = viewState.resolution;\n    const projection = viewState.projection;\n    const rotation = viewState.rotation;\n    const projectionExtent = projection.getExtent();\n    const vecto
 rSource = this.getLayer().getSource();\n\n    // clipped rendering if layer extent is set\n    let clipped = false;\n    if (layerState.extent) {\n      const layerExtent = fromUserExtent(layerState.extent, projection);\n      clipped =\n        !containsExtent(layerExtent, frameState.extent) &&\n        intersectsExtent(layerExtent, frameState.extent);\n      if (clipped) {\n        this.clipUnrotated(context, frameState, layerExtent);\n      }\n    }\n\n    const viewHints = frameState.viewHints;\n    const snapToPixel = !(\n      viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n    );\n\n    const transform = this.getRenderTransform(\n      center,\n      resolution,\n      rotation,\n      pixelRatio,\n      width,\n      height,\n      0\n    );\n    const declutterReplays = this.getLayer().getDeclutter() ? {} : null;\n    replayGroup.execute(\n      context,\n      1,\n      transform,\n      rotation,\n      snapToPixel,\n      undefined,\n      declutterRepl
 ays\n    );\n\n    if (\n      vectorSource.getWrapX() &&\n      projection.canWrapX() &&\n      !containsExtent(projectionExtent, extent)\n    ) {\n      let startX = extent[0];\n      const worldWidth = getWidth(projectionExtent);\n      let world = 0;\n      let offsetX;\n      while (startX < projectionExtent[0]) {\n        --world;\n        offsetX = worldWidth * world;\n        const transform = this.getRenderTransform(\n          center,\n          resolution,\n          rotation,\n          pixelRatio,\n          width,\n          height,\n          offsetX\n        );\n        replayGroup.execute(\n          context,\n          1,\n          transform,\n          rotation,\n          snapToPixel,\n          undefined,\n          declutterReplays\n        );\n        startX += worldWidth;\n      }\n      world = 0;\n      startX = extent[2];\n      while (startX > projectionExtent[2]) {\n        ++world;\n        offsetX = worldWidth * world;\n        const transform = this.
 getRenderTransform(\n          center,\n          resolution,\n          rotation,\n          pixelRatio,\n          width,\n          height,\n          offsetX\n        );\n        replayGroup.execute(\n          context,\n          1,\n          transform,\n          rotation,\n          snapToPixel,\n          undefined,\n          declutterReplays\n        );\n        startX -= worldWidth;\n      }\n    }\n    if (declutterReplays) {\n      const viewHints = frameState.viewHints;\n      const hifi = !(\n        viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n      );\n      replayDeclutter(\n        declutterReplays,\n        context,\n        rotation,\n        1,\n        hifi,\n        frameState.declutterItems\n      );\n    }\n\n    if (clipped) {\n      context.restore();\n    }\n\n    this.postRender(context, frameState);\n\n    const opacity = layerState.opacity;\n    const container = this.container;\n    if (opacity !== parseFloat(container.style.opa
 city)) {\n      container.style.opacity = opacity === 1 ? '' : String(opacity);\n    }\n\n    if (this.renderedRotation_ !== viewState.rotation) {\n      this.renderedRotation_ = viewState.rotation;\n      this.hitDetectionImageData_ = null;\n    }\n    return this.container;\n  }\n\n  /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n   */\n  getFeatures(pixel) {\n    return new Promise(\n      function (resolve, reject) {\n        if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {\n          const size = [this.context.canvas.width, this.context.canvas.height];\n          apply(this.pixelTransform, size);\n          const center = this.renderedCenter_;\n          const resolution = this.renderedResolution_;\n          const rotation = this.renderedRotation_;\n          const projection = th
 is.renderedProjection_;\n          const extent = this.renderedExtent_;\n          const layer = this.getLayer();\n          const transforms = [];\n          const width = size[0] / 2;\n          const height = size[1] / 2;\n          transforms.push(\n            this.getRenderTransform(\n              center,\n              resolution,\n              rotation,\n              0.5,\n              width,\n              height,\n              0\n            ).slice()\n          );\n          const source = layer.getSource();\n          const projectionExtent = projection.getExtent();\n          if (\n            source.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, extent)\n          ) {\n            let startX = extent[0];\n            const worldWidth = getWidth(projectionExtent);\n            let world = 0;\n            let offsetX;\n            while (startX < projectionExtent[0]) {\n              --world;\n              offsetX
  = worldWidth * world;\n              transforms.push(\n                this.getRenderTransform(\n                  center,\n                  resolution,\n                  rotation,\n                  0.5,\n                  width,\n                  height,\n                  offsetX\n                ).slice()\n              );\n              startX += worldWidth;\n            }\n            world = 0;\n            startX = extent[2];\n            while (startX > projectionExtent[2]) {\n              ++world;\n              offsetX = worldWidth * world;\n              transforms.push(\n                this.getRenderTransform(\n                  center,\n                  resolution,\n                  rotation,\n                  0.5,\n                  width,\n                  height,\n                  offsetX\n                ).slice()\n              );\n              startX -= worldWidth;\n            }\n          }\n\n          this.hitDetectionImageData_ = createHitDetecti
 onImageData(\n            size,\n            transforms,\n            this.renderedFeatures_,\n            layer.getStyleFunction(),\n            extent,\n            resolution,\n            rotation\n          );\n        }\n        resolve(\n          hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_)\n        );\n      }.bind(this)\n    );\n  }\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n   * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n   * @return {T|void} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n
     callback,\n    declutteredFeatures\n  ) {\n    if (!this.replayGroup_) {\n      return undefined;\n    } else {\n      const resolution = frameState.viewState.resolution;\n      const rotation = frameState.viewState.rotation;\n      const layer = this.getLayer();\n      /** @type {!Object<string, boolean>} */\n      const features = {};\n\n      const result = this.replayGroup_.forEachFeatureAtCoordinate(\n        coordinate,\n        resolution,\n        rotation,\n        hitTolerance,\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @return {?} Callback result.\n         */\n        function (feature) {\n          const key = getUid(feature);\n          if (!(key in features)) {\n            features[key] = true;\n            return callback(feature, layer);\n          }\n        },\n        layer.getDeclutter() ? declutteredFeatures : null\n      );\n\n      return result;\n    }\n  }\n\n  /**\n   * Perform action necess
 ary to get the layer rendered after new fonts have loaded\n   */\n  handleFontsChanged() {\n    const layer = this.getLayer();\n    if (layer.getVisible() && this.replayGroup_) {\n      layer.changed();\n    }\n  }\n\n  /**\n   * Handle changes in image style state.\n   * @param {import(\"../../events/Event.js\").default} event Image style change event.\n   * @private\n   */\n  handleStyleImageChange_(event) {\n    this.renderIfReadyAndVisible();\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */\n  prepareFrame(frameState) {\n    const vectorLayer = this.getLayer();\n    const vectorSource = vectorLayer.getSource();\n    if (!vectorSource) {\n      return false;\n    }\n\n    const animating = frameState.viewHints[ViewHint.ANIMATING];\n    const interacting = frameState.viewHints[ViewHint.INTERACTING];\n    const updateWhileAn
 imating = vectorLayer.getUpdateWhileAnimating();\n    const updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n    if (\n      (!this.dirty_ && !updateWhileAnimating && animating) ||\n      (!updateWhileInteracting && interacting)\n    ) {\n      this.animatingOrInteracting_ = true;\n      return true;\n    }\n    this.animatingOrInteracting_ = false;\n\n    const frameStateExtent = frameState.extent;\n    const viewState = frameState.viewState;\n    const projection = viewState.projection;\n    const resolution = viewState.resolution;\n    const pixelRatio = frameState.pixelRatio;\n    const vectorLayerRevision = vectorLayer.getRevision();\n    const vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n    let vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n    if (vectorLayerRenderOrder === undefined) {\n      vectorLayerRenderOrder = defaultRenderOrder;\n    }\n\n    const center = viewState.center.slice();\n    const extent = buffer(\n      frame
 StateExtent,\n      vectorLayerRenderBuffer * resolution\n    );\n    const loadExtents = [extent.slice()];\n    const projectionExtent = projection.getExtent();\n\n    if (\n      vectorSource.getWrapX() &&\n      projection.canWrapX() &&\n      !containsExtent(projectionExtent, frameState.extent)\n    ) {\n      // For the replay group, we need an extent that intersects the real world\n      // (-180° to +180°). To support geometries in a coordinate range from -540°\n      // to +540°, we add at least 1 world width on each side of the projection\n      // extent. If the viewport is wider than the world, we need to add half of\n      // the viewport width to make sure we cover the whole viewport.\n      const worldWidth = getWidth(projectionExtent);\n      const gutter = Math.max(getWidth(extent) / 2, worldWidth);\n      extent[0] = projectionExtent[0] - gutter;\n      extent[2] = projectionExtent[2] + gutter;\n      wrapCoordinateX(center, projection);\n      const loadExtent 
 = wrapExtentX(loadExtents[0], projection);\n      // If the extent crosses the date line, we load data for both edges of the worlds\n      if (\n        loadExtent[0] < projectionExtent[0] &&\n        loadExtent[2] < projectionExtent[2]\n      ) {\n        loadExtents.push([\n          loadExtent[0] + worldWidth,\n          loadExtent[1],\n          loadExtent[2] + worldWidth,\n          loadExtent[3],\n        ]);\n      } else if (\n        loadExtent[0] > projectionExtent[0] &&\n        loadExtent[2] > projectionExtent[2]\n      ) {\n        loadExtents.push([\n          loadExtent[0] - worldWidth,\n          loadExtent[1],\n          loadExtent[2] - worldWidth,\n          loadExtent[3],\n        ]);\n      }\n    }\n\n    if (\n      !this.dirty_ &&\n      this.renderedResolution_ == resolution &&\n      this.renderedRevision_ == vectorLayerRevision &&\n      this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n      containsExtent(this.renderedExtent_, extent)\n    ) {\n    
   this.replayGroupChanged = false;\n      return true;\n    }\n\n    this.replayGroup_ = null;\n\n    this.dirty_ = false;\n\n    const replayGroup = new CanvasBuilderGroup(\n      getRenderTolerance(resolution, pixelRatio),\n      extent,\n      resolution,\n      pixelRatio,\n      vectorLayer.getDeclutter()\n    );\n\n    const userProjection = getUserProjection();\n    let userTransform;\n    if (userProjection) {\n      for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n        vectorSource.loadFeatures(\n          toUserExtent(loadExtents[i], projection),\n          resolution,\n          userProjection\n        );\n      }\n      userTransform = getTransformFromProjections(userProjection, projection);\n    } else {\n      for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n        vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n      }\n    }\n\n    const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n\n    /**\n     * @p
 aram {import(\"../../Feature.js\").default} feature Feature.\n     * @this {CanvasVectorLayerRenderer}\n     */\n    const render = function (feature) {\n      let styles;\n      const styleFunction =\n        feature.getStyleFunction() || vectorLayer.getStyleFunction();\n      if (styleFunction) {\n        styles = styleFunction(feature, resolution);\n      }\n      if (styles) {\n        const dirty = this.renderFeature(\n          feature,\n          squaredTolerance,\n          styles,\n          replayGroup,\n          userTransform\n        );\n        this.dirty_ = this.dirty_ || dirty;\n      }\n    }.bind(this);\n\n    const userExtent = toUserExtent(extent, projection);\n    /** @type {Array<import(\"../../Feature.js\").default>} */\n    const features = vectorSource.getFeaturesInExtent(userExtent);\n    if (vectorLayerRenderOrder) {\n      features.sort(vectorLayerRenderOrder);\n    }\n    for (let i = 0, ii = features.length; i < ii; ++i) {\n      render(features[i]);\n 
    }\n    this.renderedFeatures_ = features;\n\n    const replayGroupInstructions = replayGroup.finish();\n    const executorGroup = new ExecutorGroup(\n      extent,\n      resolution,\n      pixelRatio,\n      vectorSource.getOverlaps(),\n      replayGroupInstructions,\n      vectorLayer.getRenderBuffer()\n    );\n\n    this.renderedResolution_ = resolution;\n    this.renderedRevision_ = vectorLayerRevision;\n    this.renderedRenderOrder_ = vectorLayerRenderOrder;\n    this.renderedExtent_ = extent;\n    this.renderedCenter_ = center;\n    this.renderedProjection_ = projection;\n    this.replayGroup_ = executorGroup;\n    this.hitDetectionImageData_ = null;\n\n    this.replayGroupChanged = true;\n    return true;\n  }\n\n  /**\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {number} squaredTolerance Squared render tolerance.\n   * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or 
 array of styles.\n   * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n   * @param {import(\"../../proj.js\").TransformFunction=} opt_transform Transform from user to view projection.\n   * @return {boolean} `true` if an image is loading.\n   */\n  renderFeature(\n    feature,\n    squaredTolerance,\n    styles,\n    builderGroup,\n    opt_transform\n  ) {\n    if (!styles) {\n      return false;\n    }\n    let loading = false;\n    if (Array.isArray(styles)) {\n      for (let i = 0, ii = styles.length; i < ii; ++i) {\n        loading =\n          renderFeature(\n            builderGroup,\n            feature,\n            styles[i],\n            squaredTolerance,\n            this.boundHandleStyleImageChange_,\n            opt_transform\n          ) || loading;\n      }\n    } else {\n      loading = renderFeature(\n        builderGroup,\n        feature,\n        styles,\n        squaredTolerance,\n        this.boundHandleStyleImageCh
 ange_,\n        opt_transform\n      );\n    }\n    return loading;\n  }\n}\n\nexport default CanvasVectorLayerRenderer;\n","/**\n * @module ol/layer/Vector\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @extends {BaseVectorLayer<import(\"../source/Vector.js\").default>}\n * @api\n */\nclass VectorLayer extends BaseVectorLayer {\n  /**\n   * @param {import(\"./BaseVector.js\").Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    super(opt_options);\n  }\n\n  /**\n   * Create a renderer for this layer.\n   * @return {import(\"../renderer/Layer.js\").default} A laye
 r renderer.\n   */\n  createRenderer() {\n    return new CanvasVectorLayerRenderer(this);\n  }\n}\n\nexport default VectorLayer;\n","/**\n * @module ol/layer/VectorTileRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but\n *    point symbols and texts are always rotated with the view and pixels are\n *    scaled during zoom animations.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels\n *    are scaled during zoom animations. Point symbols and texts are accurately\n *    rendered as vectors and can stay upright on rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved\n *    performance on vector tile layers with only a few rendered features (e.g.\n *    for highlighting a subset of features of another layer with the same\n *    source).\n * @api\n */\nexport default {\n  IMAGE: 'image',\n  HYBRID: 'hybrid',\n  VEC
 TOR: 'vector',\n};\n","/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup, {\n  replayDeclutter,\n} from '../../render/canvas/ExecutorGroup.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ReplayType from '../../render/canvas/BuilderType.js';\nimport TileState from '../../TileState.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n  apply as applyTransform,\n  create as createTransform,\n  multiply,\n  reset as resetTransform,\n  scale,\n  scale as scaleTransform,\n  translate as translateTransform,\n} from '../../transform.js';\nimport {\n  buffer,\n  containsCoordinate,\n  containsExtent,\n  equals,\n  getIntersection,\n  getTopLeft,\n  intersects,\n} from '../../extent.js';\nimport {clear} from '../../obj.js';\nimport {\n  crea
 teHitDetectionImageData,\n  hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {\n  getSquaredTolerance as getSquaredRenderTolerance,\n  renderFeature,\n} from '../vector.js';\nimport {getUid} from '../../util.js';\nimport {listen, unlistenByKey} from '../../events.js';\nimport {toSize} from '../../size.js';\nimport {wrapX} from '../../coordinate.js';\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nconst IMAGE_REPLAYS = {\n  'image': [\n    ReplayType.POLYGON,\n    ReplayType.CIRCLE,\n    ReplayType.LINE_STRING,\n    ReplayType.IMAGE,\n    ReplayType.TEXT,\n  ],\n  'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING],\n  'vector': [],\n};\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nconst VECTOR_REPLAYS = {\n  'image': [ReplayType.DEFAULT],\n  'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n  'vector': [\n    ReplayType.POLYGON,\n    Re
 playType.CIRCLE,\n    ReplayType.LINE_STRING,\n    ReplayType.IMAGE,\n    ReplayType.TEXT,\n    ReplayType.DEFAULT,\n  ],\n};\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nclass CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {\n  /**\n   * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n   */\n  constructor(layer) {\n    super(layer);\n\n    /** @private */\n    this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.dirty_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedLayerRevision_;\n\n    /**\n     * @private\n     * @type {import(\"../../transform\").Transform}\n     */\n    this.renderedPixelToCoordinateTransform_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRotation_;\n\n    /**\n     * @private\n     * @type {!Object<string,
  import(\"../../VectorRenderTile.js\").default>}\n     */\n    this.renderTileImageQueue_ = {};\n\n    /**\n     * @type {Object<string, import(\"../../events.js\").EventsKey>}\n     */\n    this.tileListenerKeys_ = {};\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tmpTransform_ = createTransform();\n  }\n\n  /**\n   * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection\").default} projection Projection.\n   * @param {boolean} queue Queue tile for rendering.\n   * @return {boolean|undefined} Tile needs to be rendered.\n   */\n  prepareTile(tile, pixelRatio, projection, queue) {\n    let render;\n    const tileUid = getUid(tile);\n    const state = tile.getState();\n    if (\n      ((state === TileState.LOADED && tile.hifi) ||\n        state === TileState.ERROR) &&\n      tileUid in this.tileListenerKeys_\n    ) {\n      un
 listenByKey(this.tileListenerKeys_[tileUid]);\n      delete this.tileListenerKeys_[tileUid];\n    }\n    if (state === TileState.LOADED || state === TileState.ERROR) {\n      this.updateExecutorGroup_(tile, pixelRatio, projection);\n      if (this.tileImageNeedsRender_(tile, pixelRatio, projection)) {\n        render = true;\n        if (queue) {\n          this.renderTileImageQueue_[tileUid] = tile;\n        }\n      }\n    }\n    return render;\n  }\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {!import(\"../../Tile.js\").default} Tile.\n   */\n  getTile(z, x, y, frameState) {\n    const pixelRatio = frameState.pixelRatio;\n    const viewState = frameState.viewState;\n    const resolution = viewState.resolution;\n    const projection = viewState.projection;\n    const layer = this.getLayer();\n
     const tile = layer.getSource().getTile(z, x, y, pixelRatio, projection);\n    if (tile.getState() < TileState.LOADED) {\n      tile.wantedResolution = resolution;\n      const tileUid = getUid(tile);\n      if (!(tileUid in this.tileListenerKeys_)) {\n        const listenerKey = listen(\n          tile,\n          EventType.CHANGE,\n          this.prepareTile.bind(this, tile, pixelRatio, projection, true)\n        );\n        this.tileListenerKeys_[tileUid] = listenerKey;\n      }\n    } else {\n      const viewHints = frameState.viewHints;\n      const hifi = !(\n        viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n      );\n      if (hifi || !tile.wantedResolution) {\n        tile.wantedResolution = resolution;\n      }\n      const render = this.prepareTile(tile, pixelRatio, projection, false);\n      if (render && layer.getRenderMode() !== VectorTileRenderType.VECTOR) {\n        this.renderTileImage_(tile, frameState);\n      }\n    }\n    return super.g
 etTile(z, x, y, frameState);\n  }\n\n  /**\n   * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n   * @return {boolean} Tile is drawable.\n   */\n  isDrawableTile(tile) {\n    const layer = this.getLayer();\n    return (\n      super.isDrawableTile(tile) &&\n      (layer.getRenderMode() === VectorTileRenderType.VECTOR\n        ? getUid(layer) in tile.executorGroups\n        : tile.hasContext(layer))\n    );\n  }\n\n  /**\n   * @inheritDoc\n   */\n  getTileImage(tile) {\n    return tile.getImage(this.getLayer());\n  }\n\n  /**\n   * Determine whether render should be called.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {boolean} Layer is ready to be rendered.\n   */\n  prepareFrame(frameState) {\n    const layerRevision = this.getLayer().getRevision();\n    if (this.renderedLayerRevision_ != layerRevision) {\n      this.renderedTiles.length = 0;\n    }\n    this.renderedLayerRevision_ = layerRevision;\n    return
  super.prepareFrame(frameState);\n  }\n\n  /**\n   * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n   * @private\n   */\n  updateExecutorGroup_(tile, pixelRatio, projection) {\n    const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n    const revision = layer.getRevision();\n    const renderOrder = layer.getRenderOrder() || null;\n\n    const resolution = tile.wantedResolution;\n    const builderState = tile.getReplayState(layer);\n    if (\n      !builderState.dirty &&\n      builderState.renderedResolution === resolution &&\n      builderState.renderedRevision == revision &&\n      builderState.renderedRenderOrder == renderOrder &&\n      builderState.renderedZ === tile.sourceZ\n    ) {\n      return;\n    }\n\n    const source = layer.getSource();\n    const sourceTileGrid = source.getTileG
 rid();\n    const tileGrid = source.getTileGridForProjection(projection);\n    const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n\n    const sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n    const layerUid = getUid(layer);\n    delete tile.hitDetectionImageData[layerUid];\n    tile.executorGroups[layerUid] = [];\n    for (let t = 0, tt = sourceTiles.length; t < tt; ++t) {\n      const sourceTile = sourceTiles[t];\n      if (sourceTile.getState() != TileState.LOADED) {\n        continue;\n      }\n      const sourceTileCoord = sourceTile.tileCoord;\n      const sourceTileExtent = sourceTileGrid.getTileCoordExtent(\n        sourceTileCoord\n      );\n      const sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n      const bufferedExtent = equals(sourceTileExtent, sharedExtent)\n        ? null\n        : buffer(\n            sharedExtent,\n            layer.getRenderBuffer() * resolution,\n            this.tmpExtent\n          )
 ;\n      builderState.dirty = false;\n      const builderGroup = new CanvasBuilderGroup(\n        0,\n        sharedExtent,\n        resolution,\n        pixelRatio,\n        layer.getDeclutter()\n      );\n      const squaredTolerance = getSquaredRenderTolerance(\n        resolution,\n        pixelRatio\n      );\n\n      /**\n       * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n       * @this {CanvasVectorTileLayerRenderer}\n       */\n      const render = function (feature) {\n        let styles;\n        const styleFunction =\n          feature.getStyleFunction() || layer.getStyleFunction();\n        if (styleFunction) {\n          styles = styleFunction(feature, resolution);\n        }\n        if (styles) {\n          const dirty = this.renderFeature(\n            feature,\n            squaredTolerance,\n            styles,\n            builderGroup\n          );\n          this.dirty_ = this.dirty_ || dirty;\n          builderState.dirty = builderState
 .dirty || dirty;\n        }\n      };\n\n      const features = sourceTile.getFeatures();\n      if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n        features.sort(renderOrder);\n      }\n      for (let i = 0, ii = features.length; i < ii; ++i) {\n        const feature = features[i];\n        if (\n          !bufferedExtent ||\n          intersects(bufferedExtent, feature.getGeometry().getExtent())\n        ) {\n          render.call(this, feature);\n        }\n      }\n      const executorGroupInstructions = builderGroup.finish();\n      // no need to clip when the render tile is covered by a single source tile\n      const replayExtent =\n        layer.getRenderMode() !== VectorTileRenderType.VECTOR &&\n        layer.getDeclutter() &&\n        sourceTiles.length === 1\n          ? null\n          : sharedExtent;\n      const renderingReplayGroup = new CanvasExecutorGroup(\n        replayExtent,\n        resolution,\n        pixelRatio,\n        source.ge
 tOverlaps(),\n        executorGroupInstructions,\n        layer.getRenderBuffer()\n      );\n      tile.executorGroups[layerUid].push(renderingReplayGroup);\n    }\n    builderState.renderedRevision = revision;\n    builderState.renderedZ = tile.sourceZ;\n    builderState.renderedRenderOrder = renderOrder;\n    builderState.renderedResolution = resolution;\n  }\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../layer/Layer.js\").default): T} callback Feature callback.\n   * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n   * @return {T|void} Callback result.\n   * @template T\n   */\n  forEachFeatureAtCoordinate(\n    coordinate,\n    frameState,\n    hitTolerance,\n    ca
 llback,\n    declutteredFeatures\n  ) {\n    const resolution = frameState.viewState.resolution;\n    const rotation = frameState.viewState.rotation;\n    hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n    const layer = this.getLayer();\n    const declutter = layer.getDeclutter();\n    const source = layer.getSource();\n    const tileGrid = source.getTileGridForProjection(\n      frameState.viewState.projection\n    );\n    /** @type {!Object<string, boolean>} */\n    const features = {};\n\n    const renderedTiles = /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this\n      .renderedTiles);\n\n    let found;\n    let i, ii;\n    for (i = 0, ii = renderedTiles.length; i < ii; ++i) {\n      const tile = renderedTiles[i];\n      const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n      const tileContainsCoordinate = containsCoordinate(tileExtent, coordinate);\n\n      if (!declutter) {\n        // When not decluttering, we only 
 need to consider the tile that contains the given\n        // coordinate, because each feature will be rendered for each tile that contains it.\n        if (!tileContainsCoordinate) {\n          continue;\n        }\n      }\n      const executorGroups = tile.executorGroups[getUid(layer)];\n      for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n        const executorGroup = executorGroups[t];\n        found =\n          found ||\n          executorGroup.forEachFeatureAtCoordinate(\n            coordinate,\n            resolution,\n            rotation,\n            hitTolerance,\n            /**\n             * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n             * @return {?} Callback result.\n             */\n            function (feature) {\n              if (\n                tileContainsCoordinate ||\n                (declutteredFeatures &&\n                  declutteredFeatures.indexOf(feature) !== -1)\n              ) {\n                
 let key = feature.getId();\n                if (key === undefined) {\n                  key = getUid(feature);\n                }\n                if (!(key in features)) {\n                  features[key] = true;\n                  return callback(feature, layer);\n                }\n              }\n            },\n            layer.getDeclutter() ? declutteredFeatures : null\n          );\n      }\n    }\n    return found;\n  }\n\n  /**\n   * Asynchronous layer level hit detection.\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n   */\n  getFeatures(pixel) {\n    return new Promise(\n      function (resolve, reject) {\n        const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        const layerUid = getUid(layer);\n        const source = layer.getSource();\n        const projection = this.renderedProjection;
 \n        const projectionExtent = projection.getExtent();\n        const resolution = this.renderedResolution;\n        const tileGrid = source.getTileGridForProjection(projection);\n        const coordinate = applyTransform(\n          this.renderedPixelToCoordinateTransform_,\n          pixel.slice()\n        );\n        const tileCoord = tileGrid.getTileCoordForCoordAndResolution(\n          coordinate,\n          resolution\n        );\n        let tile;\n        for (let i = 0, ii = this.renderedTiles.length; i < ii; ++i) {\n          if (\n            tileCoord.toString() === this.renderedTiles[i].tileCoord.toString()\n          ) {\n            tile = this.renderedTiles[i];\n            if (tile.getState() === TileState.LOADED && tile.hifi) {\n              const extent = tileGrid.getTileCoordExtent(tile.tileCoord);\n              if (\n                source.getWrapX() &&\n                projection.canWrapX() &&\n                !containsExtent(projectionExtent, extent)\n 
              ) {\n                wrapX(coordinate, projection);\n              }\n              break;\n            }\n            tile = undefined;\n          }\n        }\n        if (!tile || tile.loadingSourceTiles > 0) {\n          resolve([]);\n          return;\n        }\n        const extent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n        const corner = getTopLeft(extent);\n        const tilePixel = [\n          (coordinate[0] - corner[0]) / resolution,\n          (corner[1] - coordinate[1]) / resolution,\n        ];\n        const features = tile\n          .getSourceTiles()\n          .reduce(function (accumulator, sourceTile) {\n            return accumulator.concat(sourceTile.getFeatures());\n          }, []);\n        let hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n        if (!hitDetectionImageData && !this.animatingOrInteracting_) {\n          const tileSize = toSize(\n            tileGrid.getTileSize(tileGrid.getZForResolution(reso
 lution))\n          );\n          const size = [tileSize[0] / 2, tileSize[1] / 2];\n          const rotation = this.renderedRotation_;\n          const transforms = [\n            this.getRenderTransform(\n              tileGrid.getTileCoordCenter(tile.wrappedTileCoord),\n              resolution,\n              0,\n              0.5,\n              size[0],\n              size[1],\n              0\n            ),\n          ];\n          hitDetectionImageData = createHitDetectionImageData(\n            tileSize,\n            transforms,\n            features,\n            layer.getStyleFunction(),\n            tileGrid.getTileCoordExtent(tile.wrappedTileCoord),\n            tile.getReplayState(layer).renderedResolution,\n            rotation\n          );\n          tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n        }\n        resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n      }.bind(this)\n    );\n  }\n\n  /**\n   * Perform action necessary 
 to get the layer rendered after new fonts have loaded\n   */\n  handleFontsChanged() {\n    clear(this.renderTileImageQueue_);\n    const layer = this.getLayer();\n    if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n      layer.changed();\n    }\n  }\n\n  /**\n   * Handle changes in image style state.\n   * @param {import(\"../../events/Event.js\").default} event Image style change event.\n   * @private\n   */\n  handleStyleImageChange_(event) {\n    this.renderIfReadyAndVisible();\n  }\n\n  /**\n   * Render the layer.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {HTMLElement} target Target that may be used to render content to.\n   * @return {HTMLElement} The rendered element.\n   */\n  renderFrame(frameState, target) {\n    const viewHints = frameState.viewHints;\n    const hifi = !(\n      viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n    );\n    this.renderQueuedTileImages_(hifi, fram
 eState);\n\n    super.renderFrame(frameState, target);\n    this.renderedPixelToCoordinateTransform_ = frameState.pixelToCoordinateTransform.slice();\n    this.renderedRotation_ = frameState.viewState.rotation;\n\n    const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n    const renderMode = layer.getRenderMode();\n    if (renderMode === VectorTileRenderType.IMAGE) {\n      return this.container;\n    }\n\n    const source = layer.getSource();\n    // Unqueue tiles from the image queue when we don't need any more\n    const usedTiles = frameState.usedTiles[getUid(source)];\n    for (const tileUid in this.renderTileImageQueue_) {\n      if (!usedTiles || !(tileUid in usedTiles)) {\n        delete this.renderTileImageQueue_[tileUid];\n      }\n    }\n\n    const context = this.context;\n    const declutterReplays = layer.getDeclutter() ? {} : null;\n    const replayTypes = VECTOR_REPLAYS[renderMode];\n    const pixelRatio = frameState.pixelRa
 tio;\n    const viewState = frameState.viewState;\n    const center = viewState.center;\n    const resolution = viewState.resolution;\n    const rotation = viewState.rotation;\n    const size = frameState.size;\n\n    const width = Math.round(size[0] * pixelRatio);\n    const height = Math.round(size[1] * pixelRatio);\n\n    const tiles = this.renderedTiles;\n    const tileGrid = source.getTileGridForProjection(\n      frameState.viewState.projection\n    );\n    const clips = [];\n    const clipZs = [];\n    for (let i = tiles.length - 1; i >= 0; --i) {\n      const tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (tiles[\n        i\n      ]);\n      const tileCoord = tile.tileCoord;\n      const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n      const worldOffset =\n        tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] -\n        tileExtent[0];\n      const transform = multiply(\n        scale(\n          this.inversePixelTransfo
 rm.slice(),\n          1 / pixelRatio,\n          1 / pixelRatio\n        ),\n        this.getRenderTransform(\n          center,\n          resolution,\n          rotation,\n          pixelRatio,\n          width,\n          height,\n          worldOffset\n        )\n      );\n      const executorGroups = tile.executorGroups[getUid(layer)];\n      let clipped = false;\n      for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n        const executorGroup = executorGroups[t];\n        if (!executorGroup.hasExecutors(replayTypes)) {\n          // sourceTile has no instructions of the types we want to render\n          continue;\n        }\n        const currentZ = tile.tileCoord[0];\n        let currentClip;\n        if (!declutterReplays && !clipped) {\n          currentClip = executorGroup.getClipCoords(transform);\n          context.save();\n\n          // Create a clip mask for regions in this low resolution tile that are\n          // already filled by a higher resolution
  tile\n          for (let j = 0, jj = clips.length; j < jj; ++j) {\n            const clip = clips[j];\n            if (currentZ < clipZs[j]) {\n              context.beginPath();\n              // counter-clockwise (outer ring) for current tile\n              context.moveTo(currentClip[0], currentClip[1]);\n              context.lineTo(currentClip[2], currentClip[3]);\n              context.lineTo(currentClip[4], currentClip[5]);\n              context.lineTo(currentClip[6], currentClip[7]);\n              // clockwise (inner ring) for higher resolution tile\n              context.moveTo(clip[6], clip[7]);\n              context.lineTo(clip[4], clip[5]);\n              context.lineTo(clip[2], clip[3]);\n              context.lineTo(clip[0], clip[1]);\n              context.clip();\n            }\n          }\n        }\n        executorGroup.execute(\n          context,\n          1,\n          transform,\n          rotation,\n          hifi,\n          replayTypes,\n          decl
 utterReplays\n        );\n        if (!declutterReplays && !clipped) {\n          context.restore();\n          clips.push(currentClip);\n          clipZs.push(currentZ);\n          clipped = true;\n        }\n      }\n    }\n    if (declutterReplays) {\n      const layerState = frameState.layerStatesArray[frameState.layerIndex];\n      replayDeclutter(\n        declutterReplays,\n        context,\n        rotation,\n        layerState.opacity,\n        hifi,\n        frameState.declutterItems\n      );\n    }\n\n    return this.container;\n  }\n\n  /**\n   * @param {boolean} hifi We have time to render a high fidelity map image.\n   * @param {import('../../PluggableMap.js').FrameState} frameState Frame state.\n   */\n  renderQueuedTileImages_(hifi, frameState) {\n    // When we don't have time to render hifi, only render tiles until we have used up\n    // half of the frame budget of 16 ms\n    for (const uid in this.renderTileImageQueue_) {\n      if (!hifi && Date.now() - frameSt
 ate.time > 8) {\n        frameState.animate = true;\n        break;\n      }\n      const tile = this.renderTileImageQueue_[uid];\n      delete this.renderTileImageQueue_[uid];\n      this.renderTileImage_(tile, frameState);\n    }\n  }\n\n  /**\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n   * @param {import(\"../../render/canvas/BuilderGroup.js\").default} executorGroup Replay group.\n   * @return {boolean} `true` if an image is loading.\n   */\n  renderFeature(feature, squaredTolerance, styles, executorGroup) {\n    if (!styles) {\n      return false;\n    }\n    let loading = false;\n    if (Array.isArray(styles)) {\n      for (let i = 0, ii = styles.length; i < ii; ++i) {\n        loading =\n          renderFeature(\n            executorGroup,\n         
    feature,\n            styles[i],\n            squaredTolerance,\n            this.boundHandleStyleImageChange_\n          ) || loading;\n      }\n    } else {\n      loading = renderFeature(\n        executorGroup,\n        feature,\n        styles,\n        squaredTolerance,\n        this.boundHandleStyleImageChange_\n      );\n    }\n    return loading;\n  }\n\n  /**\n   * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n   * @return {boolean} A new tile image was rendered.\n   * @private\n   */\n  tileImageNeedsRender_(tile, pixelRatio, projection) {\n    const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n    const replayState = tile.getReplayState(layer);\n    const revision = layer.getRevision();\n    const sourceZ = tile.sourceZ;\n    const resolution = tile.wantedResolution;\n    retur
 n (\n      replayState.renderedTileResolution !== resolution ||\n      replayState.renderedTileRevision !== revision ||\n      replayState.renderedTileZ !== sourceZ\n    );\n  }\n\n  /**\n   * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n   * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n   * @private\n   */\n  renderTileImage_(tile, frameState) {\n    const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n    const replayState = tile.getReplayState(layer);\n    const revision = layer.getRevision();\n    const executorGroups = tile.executorGroups[getUid(layer)];\n    replayState.renderedTileRevision = revision;\n    replayState.renderedTileZ = tile.sourceZ;\n\n    const tileCoord = tile.wrappedTileCoord;\n    const z = tileCoord[0];\n    const source = layer.getSource();\n    let pixelRatio = frameState.pixelRatio;\n    const viewState = frameState.viewState;\n    const projection = viewState
 .projection;\n    const tileGrid = source.getTileGridForProjection(projection);\n    const tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n    const renderPixelRatio =\n      (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n    const resolution = tileGrid.getResolution(z);\n    const context = tile.getContext(layer);\n\n    // Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles\n    pixelRatio = Math.max(pixelRatio, renderPixelRatio / pixelRatio);\n    const size = source.getTilePixelSize(z, pixelRatio, projection);\n    context.canvas.width = size[0];\n    context.canvas.height = size[1];\n    const renderScale = pixelRatio / renderPixelRatio;\n    if (renderScale !== 1) {\n      const canvasTransform = resetTransform(this.tmpTransform_);\n      scaleTransform(canvasTransform, renderScale, renderScale);\n      context.setTransform.apply(context, canvasTransform);\n    }\n    const tileExtent = tileGrid.getTileCoordExtent(til
 eCoord, this.tmpExtent);\n    const pixelScale = renderPixelRatio / resolution;\n    const transform = resetTransform(this.tmpTransform_);\n    scaleTransform(transform, pixelScale, -pixelScale);\n    translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n    for (let i = 0, ii = executorGroups.length; i < ii; ++i) {\n      const executorGroup = executorGroups[i];\n      executorGroup.execute(\n        context,\n        renderScale,\n        transform,\n        0,\n        true,\n        IMAGE_REPLAYS[layer.getRenderMode()]\n      );\n    }\n    replayState.renderedTileResolution = tile.wantedResolution;\n  }\n}\n\nexport default CanvasVectorTileLayerRenderer;\n","/**\n * @module ol/layer/VectorTile\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport TileProperty from './TileProperty.js';\nimport VectorTileRenderType from './VectorTileRenderType.js';\nimport {assert} from '../assert
 s.js';\nimport {assign} from '../obj.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @
 property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [re
 nderMode='hybrid'] Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n *    are always rotated with the view and pixels are scaled during zoom animations. When `declutter`\n *    is set to `true`, the decluttering is done per tile resulting in labels and point symbols getting\n *    cut off at tile boundaries.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n *    another layer with the same source).\n * @property {import(\"../source/VectorTile.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default
 } [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batc
 hes will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @param {Options=} op
 t_options Options.\n * @extends {BaseVectorLayer<import(\"../source/VectorTile.js\").default>}\n * @api\n */\nclass VectorTileLayer extends BaseVectorLayer {\n  /**\n   * @param {Options=} opt_options Options.\n   */\n  constructor(opt_options) {\n    const options = opt_options ? opt_options : {};\n\n    const baseOptions = /** @type {Object} */ (assign({}, options));\n    delete baseOptions.preload;\n    delete baseOptions.useInterimTilesOnError;\n\n    super(/** @type {import(\"./BaseVector.js\").Options} */ (baseOptions));\n\n    const renderMode = options.renderMode || VectorTileRenderType.HYBRID;\n    assert(\n      renderMode == undefined ||\n        renderMode == VectorTileRenderType.IMAGE ||\n        renderMode == VectorTileRenderType.HYBRID ||\n        renderMode == VectorTileRenderType.VECTOR,\n      28\n    ); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`.\n\n    /**\n     * @private\n     * @type {import(\"./VectorTileRenderType.js\").default}\n     */\n  
   this.renderMode_ = renderMode;\n\n    this.setPreload(options.preload ? options.preload : 0);\n    this.setUseInterimTilesOnError(\n      options.useInterimTilesOnError !== undefined\n        ? options.useInterimTilesOnError\n        : true\n    );\n  }\n\n  /**\n   * Create a renderer for this layer.\n   * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n   * @protected\n   */\n  createRenderer() {\n    return new CanvasVectorTileLayerRenderer(this);\n  }\n\n  /**\n   * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n   * that resolves with an array of features. The array will either contain the topmost feature\n   * when a hit was detected, or it will be empty.\n   *\n   * The hit detection algorithm used for this method is optimized for performance, but is less\n   * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n   * is not considered, and icons are only rep
 resented by their bounding box instead of the exact\n   * image.\n   *\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n   * @api\n   */\n  getFeatures(pixel) {\n    return super.getFeatures(pixel);\n  }\n\n  /**\n   * @return {import(\"./VectorTileRenderType.js\").default} The render mode.\n   */\n  getRenderMode() {\n    return this.renderMode_;\n  }\n\n  /**\n   * Return the level as number to which we will preload tiles up to.\n   * @return {number} The level to preload tiles up to.\n   * @observable\n   * @api\n   */\n  getPreload() {\n    return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n  }\n\n  /**\n   * Whether we use interim tiles on error.\n   * @return {boolean} Use interim tiles on error.\n   * @observable\n   * @api\n   */\n  getUseInterimTilesOnError() {\n    return /** @type {boolean} */ (this.get(\n      TileProperty.USE_INTERIM_TIL
 ES_ON_ERROR\n    ));\n  }\n\n  /**\n   * Set the level as number to which we will preload tiles up to.\n   * @param {number} preload The level to preload tiles up to.\n   * @observable\n   * @api\n   */\n  setPreload(preload) {\n    this.set(TileProperty.PRELOAD, preload);\n  }\n\n  /**\n   * Set whether we use interim tiles on error.\n   * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n   * @observable\n   * @api\n   */\n  setUseInterimTilesOnError(useInterimTilesOnError) {\n    this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n  }\n}\n\nexport default VectorTileLayer;\n","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\nimport mb2css from 'mapbox-to-css-font';\nimport applyStyleFunction, { getValue } from './stylefunction';\nimport googleFonts from 'webfont-matcher/lib/fonts/goo
 gle';\nimport { fromLonLat } from 'ol/proj';\nimport { createXYZ } from 'ol/tilegrid';\nimport TileGrid from 'ol/tilegrid/TileGrid';\nimport Map from 'ol/Map';\nimport View from 'ol/View';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport MVT from 'ol/format/MVT';\nimport { assign } from 'ol/obj';\nimport { unByKey } from 'ol/Observable';\nimport TileLayer from 'ol/layer/Tile';\nimport VectorLayer from 'ol/layer/Vector';\nimport VectorTileLayer from 'ol/layer/VectorTile';\nimport TileJSON from 'ol/source/TileJSON';\nimport VectorSource from 'ol/source/Vector';\nimport VectorTileSource from 'ol/source/VectorTile';\nimport { Color } from '@mapbox/mapbox-gl-style-spec';\nimport { defaultResolutions } from './util';\n/**\n * @typedef {import(\"ol/Map\").default} PluggableMap\n * @typedef {import(\"ol/layer/Layer\").default} Layer\n * @typedef {import(\"ol/source/Source\").default} Source\n * @private\n */\nvar tilejsonCache = {};\nvar fontFamilyRegEx = /font-family: ?([^;]*);/;\nvar str
 ipQuotesRegEx = /(\"|')/g;\nvar loadedFontFamilies;\nfunction hasFontFamily(family) {\n    if (!loadedFontFamilies) {\n        loadedFontFamilies = {};\n        var styleSheets = document.styleSheets;\n        for (var i = 0, ii = styleSheets.length; i < ii; ++i) {\n            var styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n            try {\n                var cssRules = styleSheet.rules || styleSheet.cssRules;\n                if (cssRules) {\n                    for (var j = 0, jj = cssRules.length; j < jj; ++j) {\n                        var cssRule = cssRules[j];\n                        if (cssRule.type == 5) {\n                            var match = cssRule.cssText.match(fontFamilyRegEx);\n                            loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n                        }\n                    }\n                }\n            }\n            catch (e) {\n                // empty catch block\n            }\n        }\n  
   }\n    return family in loadedFontFamilies;\n}\nvar processedFontFamilies = {};\nvar googleFamilies = googleFonts.getNames();\n/**\n * @private\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n */\nfunction getFonts(fonts) {\n    var fontsKey = fonts.toString();\n    if (fontsKey in processedFontFamilies) {\n        return fonts;\n    }\n    var googleFontDescriptions = fonts.map(function (font) {\n        var parts = mb2css(font, 1).split(' ');\n        return [parts.slice(3).join(' ').replace(/\"/g, ''), parts[1] + parts[0]];\n    });\n    for (var i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n        var googleFontDescription = googleFontDescriptions[i];\n        var family = googleFontDescription[0];\n        if (!hasFontFamily(family) && googleFamilies.indexOf(family) !== -1) {\n            var fontUrl = 'https://fonts.googleapis.com/css?family=' + family.replace(/ /g, '+') + ':' + googleFontDescription[1];\n            if (!document.querySel
 ector('link[href=\"' + fontUrl + '\"]')) {\n                var markup = document.createElement('link');\n                markup.href = fontUrl;\n                markup.rel = 'stylesheet';\n                document.head.appendChild(markup);\n            }\n        }\n    }\n    processedFontFamilies[fontsKey] = true;\n    return fonts;\n}\nvar spriteRegEx = /^(.*)(\\?.*)$/;\nfunction withPath(url, path) {\n    if (path && url.indexOf('.') === 0) {\n        url = path + url;\n    }\n    return url;\n}\nfunction toSpriteUrl(url, path, extension) {\n    url = withPath(url, path);\n    var parts = url.match(spriteRegEx);\n    return parts ?\n        parts[1] + extension + (parts.length > 2 ? parts[2] : '') :\n        url + extension;\n}\n/**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * ```\n *\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all l
 ayers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"` or `\"type\": \"geojson\"` source.\n *\n * Two additional properties will be set on the provided layer:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be incl
 uded in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @param {Array<number>} [resolutions=undefined] Resolutions for mapping resolution to zoom level.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(layer, glStyle, source, path, resolutions) {\n    return new Promise(function (resolve, reject) {\n        // TODO: figure out where best place to check source type is\n        // Note that the source arg is an array of gl layer ids and each must be\n        // dereferenced to get source type to validate\n        if (typeof glStyle != 'object') {\n            glStyle = JSON.parse(glStyle);\n        }\n        if (glStyle.version != 8) {\n            return reject(new Error('glStyle version 8 
 required.'));\n        }\n        if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) {\n            return reject(new Error('Can only apply to VectorLayer or VectorTileLayer'));\n        }\n        var spriteScale, spriteData, spriteImageUrl, style;\n        function onChange() {\n            if (!style && (!glStyle.sprite || spriteData)) {\n                style = applyStyleFunction(layer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts);\n                if (!layer.getStyle()) {\n                    reject(new Error(\"Nothing to show for source [\" + source + \"]\"));\n                }\n                else {\n                    resolve();\n                }\n            }\n            else if (style) {\n                layer.setStyle(style);\n                resolve();\n            }\n            else {\n                reject(new Error('Something went wrong trying to apply style.'));\n            }\n        }\n        if (glStyle.sprite
 ) {\n            spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n            var sizeFactor_1 = spriteScale == 0.5 ? '@2x' : '';\n            var spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.json');\n            fetch(spriteUrl_1, { credentials: 'same-origin' })\n                .then(function (response) {\n                if (!response.ok && (sizeFactor_1 !== '')) {\n                    spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, '.json');\n                    return fetch(spriteUrl_1, { credentials: 'same-origin' });\n                }\n                else {\n                    return response;\n                }\n            })\n                .then(function (response) {\n                if (response.ok) {\n                    return response.json();\n                }\n                else {\n                    reject(new Error(\"Problem fetching sprite from \" + spriteUrl_1 + \": \" + response.statusText));\n                }\n            })
 \n                .then(function (spritesJson) {\n                if ((spritesJson === undefined) || (Object.keys(spritesJson).length === 0)) {\n                    return reject(new Error('No sprites found.'));\n                }\n                spriteData = spritesJson;\n                spriteImageUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.png');\n                onChange();\n            })\n                .catch(function (err) {\n                reject(new Error(\"Sprites cannot be loaded: \" + spriteUrl_1 + \": \" + err.message));\n            });\n        }\n        else {\n            onChange();\n        }\n    });\n}\nvar emptyObj = {};\nfunction setBackground(map, layer) {\n    var background = {\n        type: layer.type\n    };\n    function updateStyle() {\n        var element = map.getTargetElement();\n        if (!element) {\n            return;\n        }\n        var layout = layer.layout || {};\n        var paint = layer.paint || {};\n        backgro
 und['paint'] = paint;\n        background.id = 'olms-bg-' + paint['background-opacity'] + paint['background-color'];\n        var zoom = map.getView().getZoom();\n        if (paint['background-color'] !== undefined) {\n            var bg = getValue(background, 'paint', 'background-color', zoom, emptyObj);\n            element.style.background = Color.parse(bg).toString();\n        }\n        if (paint['background-opacity'] !== undefined) {\n            element.style.opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj);\n        }\n        if (layout.visibility == 'none') {\n            element.style.backgroundColor = '';\n            element.style.opacity = '';\n        }\n    }\n    if (map.getTargetElement()) {\n        updateStyle();\n    }\n    map.on(['change:resolution', 'change:target'], updateStyle);\n}\n/**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * ```\n * Applies properties of the Mapbox Style's first `background` layer to 
 the map.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nexport function applyBackground(map, glStyle) {\n    glStyle.layers.some(function (l) {\n        if (l.type == 'background') {\n            setBackground(map, l);\n            return true;\n        }\n    });\n}\nfunction getSourceIdByRef(layers, ref) {\n    var sourceId;\n    layers.some(function (layer) {\n        if (layer.id == ref) {\n            sourceId = layer.source;\n            return true;\n        }\n    });\n    return sourceId;\n}\nfunction extentFromTileJSON(tileJSON) {\n    var bounds = tileJSON.bounds;\n    if (bounds) {\n        var ll = fromLonLat([bounds[0], bounds[1]]);\n        var tr = fromLonLat([bounds[2], bounds[3]]);\n        return [ll[0], ll[1], tr[0], tr[1]];\n    }\n}\nfunction setupVectorLayer(glSource, accessToken, url) {\n    glSource = assign({}, glSource);\n    var layer = new VectorTileLayer({\n        declutter: true,\n        visible: 
 false\n    });\n    var cacheKey = JSON.stringify(glSource);\n    var tilejson = tilejsonCache[cacheKey];\n    if (!tilejson) {\n        tilejson = tilejsonCache[cacheKey] = new TileJSON({\n            url: glSource.tiles ? undefined : url,\n            tileJSON: glSource.tiles ? glSource : undefined\n        });\n    }\n    var key = tilejson.on('change', function () {\n        var state = tilejson.getState();\n        if (state === 'ready') {\n            var tileJSONDoc = tilejson.getTileJSON();\n            var tiles = Array.isArray(tileJSONDoc.tiles) ? tileJSONDoc.tiles : [tileJSONDoc.tiles];\n            if (glSource.url) {\n                for (var i = 0, ii = tiles.length; i < ii; ++i) {\n                    var tile = tiles[i];\n                    if (tile.indexOf('http') != 0) {\n                        tiles[i] = glSource.url + tile;\n                    }\n                }\n            }\n            var tileGrid = tilejson.getTileGrid();\n            var extent = exte
 ntFromTileJSON(tileJSONDoc);\n            var minZoom = tileJSONDoc.minzoom || 0;\n            var maxZoom = tileJSONDoc.maxzoom || 22;\n            var source = tilejson.get('ol-source');\n            if (source === undefined) {\n                source = new VectorTileSource({\n                    attributions: tilejson.getAttributions(),\n                    format: new MVT(),\n                    tileGrid: new TileGrid({\n                        origin: tileGrid.getOrigin(0),\n                        extent: extent || tileGrid.getExtent(),\n                        minZoom: minZoom,\n                        resolutions: defaultResolutions.slice(0, maxZoom + 1),\n                        tileSize: 512\n                    }),\n                    urls: tiles\n                });\n                tilejson.set('ol-source', source);\n            }\n            unByKey(key);\n            layer.setSource(source);\n        }\n        else if (state === 'error') {\n            tilejson.set
 ('ol-source', null);\n            unByKey(key);\n            layer.setSource(undefined);\n        }\n    });\n    if (tilejson.getState() === 'ready') {\n        tilejson.changed();\n    }\n    return layer;\n}\nfunction setupRasterLayer(glSource, url) {\n    var layer = new TileLayer();\n    var source = new TileJSON({\n        transition: 0,\n        url: glSource.tiles ? undefined : url,\n        tileJSON: glSource.tiles ? glSource : undefined,\n        crossOrigin: 'anonymous'\n    });\n    var key = source.on('change', function () {\n        var state = source.getState();\n        if (state === 'ready') {\n            unByKey(key);\n            var tileJSONDoc = /** @type {Object} */ (source.getTileJSON());\n            var extent = extentFromTileJSON(tileJSONDoc);\n            var tileGrid = source.getTileGrid();\n            var tileSize = glSource.tileSize || tileJSONDoc.tileSize || 512;\n            var minZoom = tileJSONDoc.minzoom || 0;\n            var maxZoom = tileJSON
 Doc.maxzoom || 22;\n            // Only works when using ES modules\n            source.tileGrid = new TileGrid({\n                origin: tileGrid.getOrigin(0),\n                extent: extent || tileGrid.getExtent(),\n                minZoom: minZoom,\n                resolutions: createXYZ({\n                    maxZoom: maxZoom,\n                    tileSize: tileSize\n                }).getResolutions(),\n                tileSize: tileSize\n            });\n            layer.setSource(source);\n        }\n        else if (state === 'error') {\n            unByKey(key);\n            layer.setSource(undefined);\n        }\n    });\n    source.setTileLoadFunction(function (tile, src) {\n        if (src.indexOf('{bbox-epsg-3857}') != -1) {\n            var bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n            src = src.replace('{bbox-epsg-3857}', bbox.toString());\n        }\n        var img = /** @type {import(\"ol/ImageTile\").default} */ (tile).getIma
 ge();\n        /** @type {HTMLImageElement} */ (img).src = src;\n    });\n    return layer;\n}\nvar geoJsonFormat = new GeoJSON();\nfunction setupGeoJSONLayer(glSource, path) {\n    var data = glSource.data;\n    var features, geoJsonUrl;\n    if (typeof data == 'string') {\n        geoJsonUrl = withPath(data, path);\n    }\n    else {\n        features = geoJsonFormat.readFeatures(data, { featureProjection: 'EPSG:3857' });\n    }\n    return new VectorLayer({\n        source: new VectorSource({\n            attributions: glSource.attribution,\n            features: features,\n            format: geoJsonFormat,\n            url: geoJsonUrl\n        }),\n        visible: false\n    });\n}\nfunction updateRasterLayerProperties(glLayer, layer, view) {\n    var zoom = view.getZoom();\n    var opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj);\n    layer.setOpacity(opacity);\n}\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n    var promises
  = [];\n    var view = map.getView();\n    if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n        view = new View({\n            maxResolution: defaultResolutions[0]\n        });\n        map.setView(view);\n    }\n    if ('center' in glStyle && !view.getCenter()) {\n        view.setCenter(fromLonLat(glStyle.center));\n    }\n    if ('zoom' in glStyle && view.getZoom() === undefined) {\n        view.setResolution(defaultResolutions[0] / Math.pow(2, glStyle.zoom));\n    }\n    if (!view.getCenter() || view.getZoom() === undefined) {\n        view.fit(view.getProjection().getExtent(), {\n            nearest: true,\n            size: map.getSize()\n        });\n    }\n    if (glStyle.sprite) {\n        if (glStyle.sprite.indexOf('mapbox://') == 0) {\n            glStyle.sprite = baseUrl + '/sprite' + accessToken;\n        }\n        else if (glStyle.sprite.indexOf('http') != 0) {\n            glStyle.sprite = (host ? (host + path) : '') + glStyle.sprite + access
 Token;\n        }\n    }\n    var glLayers = glStyle.layers;\n    var layerIds = [];\n    var glLayer, glSource, glSourceId, id, layer, url;\n    var _loop_1 = function (i, ii) {\n        glLayer = glLayers[i];\n        var type = glLayer.type;\n        if (type == 'heatmap' || type == 'fill-extrusion' || type == 'hillshade') {\n            //FIXME Unsupported layer type\n        }\n        else if (type == 'background') {\n            setBackground(map, glLayer);\n        }\n        else {\n            id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n            // this technique assumes gl layers will be in a particular order\n            if (id != glSourceId) {\n                if (layerIds.length) {\n                    promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n                    layerIds = [];\n                }\n                glSource = glStyle.sources[id];\n                url = glSource.url;\n                if (url) {\n          
           url = withPath(url, path);\n                    if (url.indexOf('mapbox://') == 0) {\n                        var mapid_1 = url.replace('mapbox://', '');\n                        glSource.tiles = ['a', 'b', 'c', 'd'].map(function (host) {\n                            return 'https://' + host + '.tiles.mapbox.com/v4/' + mapid_1 +\n                                '/{z}/{x}/{y}.' +\n                                (glSource.type == 'vector' ? 'vector.pbf' : 'png') +\n                                accessToken;\n                        });\n                    }\n                }\n                if (glSource.type == 'vector') {\n                    layer = setupVectorLayer(glSource, accessToken, url);\n                }\n                else if (glSource.type == 'raster') {\n                    layer = setupRasterLayer(glSource, url);\n                    layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true);\n                    view.on('change:res
 olution', updateRasterLayerProperties.bind(this_1, glLayer, layer, view));\n                    updateRasterLayerProperties(glLayer, layer, view);\n                }\n                else if (glSource.type == 'geojson') {\n                    layer = setupGeoJSONLayer(glSource, path);\n                }\n                glSourceId = id;\n                if (layer) {\n                    layer.set('mapbox-source', glSourceId);\n                }\n            }\n            layerIds.push(glLayer.id);\n        }\n    };\n    var this_1 = this;\n    for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n        _loop_1(i, ii);\n    }\n    promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n    map.set('mapbox-style', glStyle);\n    return Promise.all(promises);\n}\n/**\n * ```js\n * import olms from 'ol-mapbox-style';\n * ```\n *\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *
 \n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * This function sets an additional `mapbox-style` property on the OpenLayers\n * map instance, which holds the Mapbox Style object.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id
  of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance, their sources set, and their styles applied. the\n * `resolve` callback will be called with the OpenLayers Map instance as\n * argument.\n */\nexport default function olms(map, style
 ) {\n    var accessToken, baseUrl, host, path, promise;\n    accessToken = baseUrl = host = path = '';\n    if (typeof map === 'string' || map instanceof HTMLElement) {\n        map = new Map({\n            target: map\n        });\n    }\n    if (typeof style === 'string') {\n        var parts = style.match(spriteRegEx);\n        if (parts) {\n            baseUrl = parts[1];\n            accessToken = parts.length > 2 ? parts[2] : '';\n        }\n        promise = new Promise(function (resolve, reject) {\n            fetch(style, {\n                credentials: 'same-origin'\n            })\n                .then(function (response) {\n                return response.json();\n            })\n                .then(function (glStyle) {\n                var a = /** @type {HTMLAnchorElement} */ (document.createElement('A'));\n                a.href = style;\n                var href = a.href;\n                path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n                h
 ost = href.substr(0, href.indexOf(path));\n                processStyle(glStyle, map, baseUrl, host, path, accessToken)\n                    .then(function () {\n                    resolve(map);\n                })\n                    .catch(reject);\n            })\n                .catch(function (err) {\n                reject(new Error(\"Could not load \" + style + \": \" + err.message));\n            });\n        });\n    }\n    else {\n        promise = new Promise(function (resolve, reject) {\n            processStyle(style, map)\n                .then(function () {\n                resolve(map);\n            })\n                .catch(reject);\n        });\n    }\n    return promise;\n}\n/**\n * ```js\n * import {apply} from 'ol-mapbox-style';\n * ```\n * Like `olms`, but returns an `ol/Map` instance instead of a `Promise`.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element tha
 t will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {PluggableMap} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nexport function apply(map, style) {\n    if (typeof map === 'string' || map instanceof HTMLElement) {\n        map = new Map({\n            target: map\n        });\n    }\n  
   setTimeout(function () {\n        olms(map, style);\n    }, 0);\n    return map;\n}\n/**\n * @private\n * If layerIds is not empty, applies the style specified in glStyle to the layer,\n * and adds the layer to the map.\n *\n * The layer may not yet have a source when the function is called.  If so, the style\n * is applied to the layer via a once listener on the 'change:source' event.\n *\n * @param {Layer} layer An OpenLayers layer instance.\n * @param {Array<string>} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} path The path part of the style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {PluggableMap} map OpenLayers Map.\n * @return {Promise} Returns a promise that resolves after the source has\n * been set on the specified layer, and the style has been applied.\n */\nfunction finalizeLayer(layer, layerIds, glStyle,
  path, map) {\n    var minZoom = 24;\n    var maxZoom = 0;\n    var glLayers = glStyle.layers;\n    for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n        var glLayer = glLayers[i];\n        if (layerIds.indexOf(glLayer.id) !== -1) {\n            minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom);\n            maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom);\n        }\n    }\n    return new Promise(function (resolve, reject) {\n        var setStyle = function () {\n            var source = layer.getSource();\n            if (!source || source.getState() === 'error') {\n                reject(new Error('Error accessing data for source ' + layer.get('mapbox-source')));\n                return;\n            }\n            if (typeof source.getTileGrid === 'function') {\n                var tileGrid = source.getTileGrid();\n                if (tileGrid) {\n                    var sourceMinZoom = tileGrid.getMinZoom();\n              
       if (minZoom > 0 || sourceMinZoom > 0) {\n                        layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9);\n                    }\n                    if (maxZoom < 24) {\n                        layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n                    }\n                }\n            }\n            if (source instanceof VectorSource || source instanceof VectorTileSource) {\n                applyStyle(/** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (layer), glStyle, layerIds, path).then(function () {\n                    layer.setVisible(true);\n                    resolve();\n                }, function (e) {\n                    reject(e);\n                });\n            }\n            else {\n                resolve();\n            }\n        };\n        layer.set('mapbox-layers', layerIds);\n        if (map.getLayers().getArray().indexOf(
 layer) === -1) {\n            map.addLayer(layer);\n        }\n        if (layer.getSource()) {\n            setStyle();\n        }\n        else {\n            layer.once('change:source', setStyle);\n        }\n    });\n}\n/**\n * ```js\n * import {getLayer} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instance that contains the provided Mapbox Style\n * `layer`. Note that multiple Mapbox Style layers are combined in a single\n * OpenLayers layer instance when they use the same Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        var mapboxLayers = layers[i].get('mapbox-layers');\n        if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n            return /** @type {Layer} */ (layers[i])
 ;\n        }\n    }\n}\n/**\n * ```js\n * import {getLayers} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array<Layer>} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n    var result = [];\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        if (layers[i].get('mapbox-source') === sourceId) {\n            result.push(/** @type {Layer} */ (layers[i]));\n        }\n    }\n    return result;\n}\n/**\n * ```js\n * import {getSource} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sou
 rceId) {\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        var source = /** @type {Layer} */ (layers[i]).getSource();\n        if (layers[i].get('mapbox-source') === sourceId) {\n            return source;\n        }\n    }\n}\nexport { finalizeLayer as _finalizeLayer, getFonts as _getFonts };\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n
  * @module ol/layer/MapboxVector\n */\nimport BaseEvent from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport MVT from '../format/MVT.js';\nimport SourceState from '../source/State.js';\nimport VectorTileLayer from '../layer/VectorTile.js';\nimport VectorTileSource from '../source/VectorTile.js';\nimport { applyStyle } from 'ol-mapbox-style';\nvar mapboxBaseUrl = 'https://api.mapbox.com';\n/**\n * Gets the path from a mapbox:// URL.\n * @param {string} url The Mapbox URL.\n * @return {string} The path.\n * @private\n */\nexport function getMapboxPath(url) {\n    var startsWith = 'mapbox://';\n    if (url.indexOf(startsWith) !== 0) {\n        return '';\n    }\n    return url.slice(startsWith.length);\n}\n/**\n * Turns mapbox:// sprite URLs into resolvable URLs.\n * @param {string} url The sprite URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token) {\n   
  var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'sprites/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected sprites url: \" + url);\n    }\n    var sprite = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/styles/v1/\" + sprite + \"/sprite?access_token=\" + token;\n}\n/**\n * Turns mapbox:// glyphs URLs into resolvable URLs.\n * @param {string} url The glyphs URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeGlyphsUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'fonts/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected fonts url: \" + url);\n    }\n    var font = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/fonts/v1/\" + font + \"/0-255.p
 bf?access_token=\" + token;\n}\n/**\n * Turns mapbox:// style URLs into resolvable URLs.\n * @param {string} url The style URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeStyleUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'styles/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected style url: \" + url);\n    }\n    var style = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/styles/v1/\" + style + \"?&access_token=\" + token;\n}\n/**\n * Turns mapbox:// source URLs into vector tile URL templates.\n * @param {string} url The source URL.\n * @param {string} token The access token.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n   
      return url;\n    }\n    return \"https://{a-d}.tiles.mapbox.com/v4/\" + mapboxPath + \"/{z}/{x}/{y}.vector.pbf?access_token=\" + token;\n}\n/**\n * @classdesc\n * Event emitted on configuration or loading error.\n */\nvar ErrorEvent = /** @class */ (function (_super) {\n    __extends(ErrorEvent, _super);\n    /**\n     * @param {Error} error error object.\n     */\n    function ErrorEvent(error) {\n        var _this = _super.call(this, EventType.ERROR) || this;\n        /**\n         * @type {Error}\n         */\n        _this.error = error;\n        return _this;\n    }\n    return ErrorEvent;\n}(BaseEvent));\n/**\n * @typedef {Object} StyleObject\n * @property {Object<string, SourceObject>} sources The style sources.\n * @property {string} sprite The sprite URL.\n * @property {string} glyphs The glyphs URL.\n * @property {Array<LayerObject>} layers The style layers.\n */\n/**\n * @typedef {Object} SourceObject\n * @property {string} url The source URL.\n * @property {SourceTy
 pe} type The source type.\n */\n/**\n * The Mapbox source type.\n * @enum {string}\n */\nvar SourceType = {\n    VECTOR: 'vector',\n};\n/**\n * @typedef {Object} LayerObject\n * @property {string} id The layer id.\n * @property {string} source The source id.\n */\n/**\n * @typedef {Object} Options\n * @property {string} styleUrl The URL of the Mapbox style object to use for this layer.  For a\n * style created with Mapbox Studio and hosted on Mapbox, this will look like\n * 'mapbox://styles/you/your-style'.\n * @property {string} accessToken The access token for your Mapbox style.\n * @property {string} [source] If your style uses more than one source, you need to use either the\n * `source` property or the `layers` property to limit rendering to a single vector source.  The\n * `source` property corresponds to the id of a vector source in your Mapbox style.\n * @property {Array<string>} [layers] Limit rendering to the list of included layers.  All layers\n * must share the same vec
 tor soource.  If your style uses more than one source, you need to use\n * either the `source` property or the `layers` property to limit rendering to a single vector\n * source.\n * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] 
 The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid 
 the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n *    are always rotated with the view and pixels are scaled during zoom animations. When `declutter`\n *    is set to `true`, the decluttering is done per tile resulting in labels and point symbols getting\n *    cut off at tile boundaries.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, 
 so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n *    another layer with the same source).\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact fo
 r large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n/**\n * @classdesc\n * A vector tile layer based on a Mapbox style that uses a single vector source.  Configure\n * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.\n * If the style uses more than one source, use the `source` property to choose a single\n * vector source.  If you want to render a subset of the layers in the style, use the `layers`\n * property (all layers must share the same vector source).  See the constructor options for\n * more detail.\n *\n *  
    var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new MapboxVector({\n *           styleUrl: 'mapbox://styles/mapbox/bright-v9',\n *           accessToken: 'your-mapbox-access-token-here'\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * On configuration or loading error, the layer will trigger an `'error'` event.  Listeners\n * will receive an object with an `error` property that can be used to diagnose the problem.\n *\n * @param {Options} options Options.\n * @extends {VectorTileLayer}\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar MapboxVectorLayer = /** @class */ (function (_super) {\n    __extends(MapboxVectorLayer, _super);\n    /**\n     * @param {Options} options Layer options.  At a minimum, `styleUrl` and `accessToken`\n     * must be provided.\n     */\n    function MapboxVectorLayer(options) {\n        var _this = this;\n       
  var declutter = 'declutter' in options ? options.declutter : true;\n        var source = new VectorTileSource({\n            state: SourceState.LOADING,\n            format: new MVT(),\n        });\n        _this = _super.call(this, {\n            source: source,\n            declutter: declutter,\n            className: options.className,\n            opacity: options.opacity,\n            visible: options.visible,\n            zIndex: options.zIndex,\n            minResolution: options.minResolution,\n            maxResolution: options.maxResolution,\n            minZoom: options.minZoom,\n            maxZoom: options.maxZoom,\n            renderOrder: options.renderOrder,\n            renderBuffer: options.renderBuffer,\n            renderMode: options.renderMode,\n            map: options.map,\n            updateWhileAnimating: options.updateWhileAnimating,\n            updateWhileInteracting: options.updateWhileInteracting,\n            preload: options.preload,\n            u
 seInterimTilesOnError: options.useInterimTilesOnError,\n        }) || this;\n        _this.sourceId = options.source;\n        _this.layers = options.layers;\n        _this.accessToken = options.accessToken;\n        _this.fetchStyle(options.styleUrl);\n        return _this;\n    }\n    /**\n     * Fetch the style object.\n     * @param {string} styleUrl The URL of the style to load.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.fetchStyle = function (styleUrl) {\n        var _this = this;\n        var url = normalizeStyleUrl(styleUrl, this.accessToken);\n        fetch(url)\n            .then(function (response) {\n            if (!response.ok) {\n                throw new Error(\"unexpected response when fetching style: \" + response.status);\n            }\n            return response.json();\n        })\n            .then(function (style) {\n            _this.onStyleLoad(style);\n        })\n            .catch(function (error) {\n            _this.handleError(error
 );\n        });\n    };\n    /**\n     * Handle the loaded style object.\n     * @param {StyleObject} style The loaded style.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.onStyleLoad = function (style) {\n        var _this = this;\n        var sourceId;\n        var sourceIdOrLayersList;\n        if (this.layers) {\n            // confirm all layers share the same source\n            var lookup = {};\n            for (var i = 0; i < style.layers.length; ++i) {\n                var layer = style.layers[i];\n                if (layer.source) {\n                    lookup[layer.id] = layer.source;\n                }\n            }\n            var firstSource = void 0;\n            for (var i = 0; i < this.layers.length; ++i) {\n                var candidate = lookup[this.layers[i]];\n                if (!candidate) {\n                    this.handleError(new Error(\"could not find source for \" + this.layers[i]));\n                    return;\n                }\n      
           if (!firstSource) {\n                    firstSource = candidate;\n                }\n                else if (firstSource !== candidate) {\n                    this.handleError(new Error(\"layers can only use a single source, found \" + firstSource + \" and \" + candidate));\n                    return;\n                }\n            }\n            sourceId = firstSource;\n            sourceIdOrLayersList = this.layers;\n        }\n        else {\n            sourceId = this.sourceId;\n            sourceIdOrLayersList = sourceId;\n        }\n        if (!sourceIdOrLayersList) {\n            // default to the first source in the style\n            sourceId = Object.keys(style.sources)[0];\n            sourceIdOrLayersList = sourceId;\n        }\n        if (style.sprite) {\n            style.sprite = normalizeSpriteUrl(style.sprite, this.accessToken);\n        }\n        if (style.glyphs) {\n            style.glyphs = normalizeGlyphsUrl(style.glyphs, this.accessToken);\n 
        }\n        var styleSource = style.sources[sourceId];\n        if (styleSource.type !== SourceType.VECTOR) {\n            this.handleError(new Error(\"only works for vector sources, found \" + styleSource.type));\n            return;\n        }\n        var source = this.getSource();\n        source.setUrl(normalizeSourceUrl(styleSource.url, this.accessToken));\n        applyStyle(this, style, sourceIdOrLayersList)\n            .then(function () {\n            source.setState(SourceState.READY);\n        })\n            .catch(function (error) {\n            _this.handleError(error);\n        });\n    };\n    /**\n     * Handle configuration or loading error.\n     * @param {Error} error The error.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.handleError = function (error) {\n        this.dispatchEvent(new ErrorEvent(error));\n        var source = this.getSource();\n        source.setState(SourceState.ERROR);\n    };\n    return MapboxVectorLayer;\n}(VectorTil
 eLayer));\nexport default MapboxVectorLayer;\n//# sourceMappingURL=MapboxVector.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/VectorImage\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class nam
 e to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZ
 oom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and
  have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text on this layer. The priority is defined\n * by the `zIndex` of the style and the render order of features. Higher z-index means higher priority.\n * Within the same z-index, a feature rendered before another has higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {number} [imageRatio=1] Ratio by which the rendered extent should be larger than the\n * viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.\n */\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the
 \n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar VectorImageLayer = /** @class */ (function (_super) {\n    __extends(VectorImageLayer, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function VectorImageLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.imageRatio;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.imageRatio_ =\n            options.imageRatio !== undefined ? options.imageRatio : 1;\n        return _this;\n    }\n    /**\n     * @return {number} Ratio between rendered extent size and viewport extent size.\n     */\n    VectorImageLayer.prototype.getImageRatio = function () {\n        return this.imageRatio_;\n    };\n    /**\n     * Create a renderer for this layer.\n 
     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    VectorImageLayer.prototype.createRenderer = function () {\n        return new CanvasVectorImageLayerRenderer(this);\n    };\n    return VectorImageLayer;\n}(BaseVectorLayer));\nexport default VectorImageLayer;\n//# sourceMappingURL=VectorImage.js.map","/**\n * @module ol/interaction/DragAndDrop\n */\n// FIXME should handle all geo-referenced data, not just vector data\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.creat
 e(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Interaction from './Interaction.js';\nimport { TRUE } from '../functions.js';\nimport { get as getProjection } from '../proj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Options\n * @property {Array<typeof import(\"../format/Feature.js\").default>} [formatConstructors] Format constructors.\n * @property {import(\"../source/Vector.js\").default} [source] Optional vector source where features will be added.  If a source is provided\n * all existing features will be removed and new features will be added when\n * they are dropped on the target.  If you want to add features to a vector\n * source without removing the existing features (append only), instead of\n * providing the source option listen for the \"addfeatures\" event.\n * @property {import(\"../proj.js\").ProjectionLike} [proje
 ction] Target projection. By default, the map's view's projection is used.\n * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element.\n */\n/**\n * @enum {string}\n */\nvar DragAndDropEventType = {\n    /**\n     * Triggered when features are added\n     * @event DragAndDropEvent#addfeatures\n     * @api\n     */\n    ADD_FEATURES: 'addfeatures',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances\n * of this type.\n */\nvar DragAndDropEvent = /** @class */ (function (_super) {\n    __extends(DragAndDropEvent, _super);\n    /**\n     * @param {DragAndDropEventType} type Type.\n     * @param {File} file File.\n     * @param {Array<import(\"../Feature.js\").default>=} opt_features Features.\n     * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n     */\n    function DragAndDropEvent(type, file, opt_features, opt_projection) {\
 n        var _this = _super.call(this, type) || this;\n        /**\n         * The features parsed from dropped data.\n         * @type {Array<import(\"../Feature.js\").FeatureLike>|undefined}\n         * @api\n         */\n        _this.features = opt_features;\n        /**\n         * The dropped file.\n         * @type {File}\n         * @api\n         */\n        _this.file = file;\n        /**\n         * The feature projection.\n         * @type {import(\"../proj/Projection.js\").default|undefined}\n         * @api\n         */\n        _this.projection = opt_projection;\n        return _this;\n    }\n    return DragAndDropEvent;\n}(Event));\n/**\n * @classdesc\n * Handles input of vector data by drag and drop.\n * @api\n *\n * @fires DragAndDropEvent\n */\nvar DragAndDrop = /** @class */ (function (_super) {\n    __extends(DragAndDrop, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragAndDrop(opt_options) {\n        var _this = this;\
 n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            handleEvent: TRUE,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<typeof import(\"../format/Feature.js\").default>}\n         */\n        _this.formatConstructors_ = options.formatConstructors\n            ? options.formatConstructors\n            : [];\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = options.projection\n            ? getProjection(options.projection)\n            : null;\n        /**\n         * @private\n         * @type {?Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.dropListenKeys_ = null;\n        /**\n         * @private\n         * @type {import(\"../source/Vector.js\").default}\n         */\n        _this.source_ = options.source || null;\n        /**\n         * @private\n         * @type {HTMLElement}\n      
    */\n        _this.target = options.target ? options.target : null;\n        return _this;\n    }\n    /**\n     * @param {File} file File.\n     * @param {Event} event Load event.\n     * @private\n     */\n    DragAndDrop.prototype.handleResult_ = function (file, event) {\n        var result = event.target.result;\n        var map = this.getMap();\n        var projection = this.projection_;\n        if (!projection) {\n            var view = map.getView();\n            projection = view.getProjection();\n        }\n        var formatConstructors = this.formatConstructors_;\n        for (var i = 0, ii = formatConstructors.length; i < ii; ++i) {\n            var format = new formatConstructors[i]();\n            var features = this.tryReadFeatures_(format, result, {\n                featureProjection: projection,\n            });\n            if (features && features.length > 0) {\n                if (this.source_) {\n                    this.source_.clear();\n                    
 this.source_.addFeatures(features);\n                }\n                this.dispatchEvent(new DragAndDropEvent(DragAndDropEventType.ADD_FEATURES, file, features, projection));\n                break;\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    DragAndDrop.prototype.registerListeners_ = function () {\n        var map = this.getMap();\n        if (map) {\n            var dropArea = this.target ? this.target : map.getViewport();\n            this.dropListenKeys_ = [\n                listen(dropArea, EventType.DROP, this.handleDrop, this),\n                listen(dropArea, EventType.DRAGENTER, this.handleStop, this),\n                listen(dropArea, EventType.DRAGOVER, this.handleStop, this),\n                listen(dropArea, EventType.DROP, this.handleStop, this),\n            ];\n        }\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    DragAndDrop.pr
 ototype.setActive = function (active) {\n        if (!this.getActive() && active) {\n            this.registerListeners_();\n        }\n        if (this.getActive() && !active) {\n            this.unregisterListeners_();\n        }\n        _super.prototype.setActive.call(this, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    DragAndDrop.prototype.setMap = function (map) {\n        this.unregisterListeners_();\n        _super.prototype.setMap.call(this, map);\n        if (this.getActive()) {\n            this.registerListeners_();\n        }\n    };\n    /**\n     * @param {import(\"../format/Feature.js\").default} format Format.\n     * @param {string} text Text.\n     * @param {import(\"../format/Feature.js\").ReadOptions} options Read options.\n 
     * @private\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    DragAndDrop.prototype.tryReadFeatures_ = function (format, text, options) {\n        try {\n            return (\n            /** @type {Array<import(\"../Feature.js\").default>} */\n            (format.readFeatures(text, options)));\n        }\n        catch (e) {\n            return null;\n        }\n    };\n    /**\n     * @private\n     */\n    DragAndDrop.prototype.unregisterListeners_ = function () {\n        if (this.dropListenKeys_) {\n            this.dropListenKeys_.forEach(unlistenByKey);\n            this.dropListenKeys_ = null;\n        }\n    };\n    /**\n     * @param {DragEvent} event Event.\n     */\n    DragAndDrop.prototype.handleDrop = function (event) {\n        var files = event.dataTransfer.files;\n        for (var i = 0, ii = files.length; i < ii; ++i) {\n            var file = files.item(i);\n            var reader = new FileReader();\n            reader.addEven
 tListener(EventType.LOAD, this.handleResult_.bind(this, file));\n            reader.readAsText(file);\n        }\n    };\n    /**\n     * @param {DragEvent} event Event.\n     */\n    DragAndDrop.prototype.handleStop = function (event) {\n        event.stopPropagation();\n        event.preventDefault();\n        event.dataTransfer.dropEffect = 'copy';\n    };\n    return DragAndDrop;\n}(Interaction));\nexport default DragAndDrop;\n//# sourceMappingURL=DragAndDrop.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === nul
 l ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragRotateAndZoom\n */\nimport PointerInteraction from './Pointer.js';\nimport { mouseOnly, shiftKeyOnly } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to zoom and rotate the map by clicking and dragging\n * on the map.  By default, this interaction is limited to when the shift\n * key is held down.\n *\n * This interaction is only supported for mouse devices.\n *\n * And this interaction is not included in the default interactions.\n * @api\n */\nvar
  DragRotateAndZoom = /** @class */ (function (_super) {\n    __extends(DragRotateAndZoom, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function DragRotateAndZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : shiftKeyOnly;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastMagnitude_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastScaleDelta_ = 0;\n        /**\n         * @private\n         * @
 type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 400;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragRotateAndZoom.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return;\n        }\n        var map = mapBrowserEvent.map;\n        var size = map.getSize();\n        var offset = mapBrowserEvent.pixel;\n        var deltaX = offset[0] - size[0] / 2;\n        var deltaY = size[1] / 2 - offset[1];\n        var theta = Math.atan2(deltaY, deltaX);\n        var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n        var view = map.getView();\n        if (this.lastAngle_ !== undefined) {\n            var angleDelta = this.lastAngle_ - theta;\n            view.adjustRotationInternal(angleDelta);\n        }\n        this.lastAngle_ = th
 eta;\n        if (this.lastMagnitude_ !== undefined) {\n            view.adjustResolutionInternal(this.lastMagnitude_ / magnitude);\n        }\n        if (this.lastMagnitude_ !== undefined) {\n            this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;\n        }\n        this.lastMagnitude_ = magnitude;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotateAndZoom.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        var direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n        view.endInteraction(this.duration_, direction);\n        this.lastScaleDelta_ = 0;\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"
 ../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotateAndZoom.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return false;\n        }\n        if (this.condition_(mapBrowserEvent)) {\n            mapBrowserEvent.map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            this.lastMagnitude_ = undefined;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragRotateAndZoom;\n}(PointerInteraction));\nexport default DragRotateAndZoom;\n//# sourceMappingURL=DragRotateAndZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { f
 or (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Circle\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { createOrUpdate, forEachCorner, intersects } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { rotate, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nvar Circle = /** @class */ (function (_super) {\n    __extends(Circle, _super);\n    /**\n     * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n     *     For internal use, flat coordinates in combination with `opt_layout` and no\n     *     `opt_radius` are also accepted.
 \n     * @param {number=} opt_radius Radius.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     */\n    function Circle(center, opt_radius, opt_layout) {\n        var _this = _super.call(this) || this;\n        if (opt_layout !== undefined && opt_radius === undefined) {\n            _this.setFlatCoordinates(opt_layout, center);\n        }\n        else {\n            var radius = opt_radius ? opt_radius : 0;\n            _this.setCenterAndRadius(center, radius, opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Circle} Clone.\n     * @api\n     */\n    Circle.prototype.clone = function () {\n        return new Circle(this.flatCoordinates.slice(), undefined, this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimu
 m squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Circle.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        var flatCoordinates = this.flatCoordinates;\n        var dx = x - flatCoordinates[0];\n        var dy = y - flatCoordinates[1];\n        var squaredDistance = dx * dx + dy * dy;\n        if (squaredDistance < minSquaredDistance) {\n            if (squaredDistance === 0) {\n                for (var i = 0; i < this.stride; ++i) {\n                    closestPoint[i] = flatCoordinates[i];\n                }\n            }\n            else {\n                var delta = this.getRadius() / Math.sqrt(squaredDistance);\n                closestPoint[0] = flatCoordinates[0] + delta * dx;\n                closestPoint[1] = flatCoordinates[1] + delta * dy;\n                for (var i = 2; i < this.stride; ++i) {\n                    closestPoint[i] = flatCoordinates[i];\n                }\n            }\n           
  closestPoint.length = this.stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Circle.prototype.containsXY = function (x, y) {\n        var flatCoordinates = this.flatCoordinates;\n        var dx = x - flatCoordinates[0];\n        var dy = y - flatCoordinates[1];\n        return dx * dx + dy * dy <= this.getRadiusSquared_();\n    };\n    /**\n     * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n     * @return {import(\"../coordinate.js\").Coordinate} Center.\n     * @api\n     */\n    Circle.prototype.getCenter = function () {\n        return this.flatCoordinates.slice(0, this.stride);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent E
 xtent.\n     */\n    Circle.prototype.computeExtent = function (extent) {\n        var flatCoordinates = this.flatCoordinates;\n        var radius = flatCoordinates[this.stride] - flatCoordinates[0];\n        return createOrUpdate(flatCoordinates[0] - radius, flatCoordinates[1] - radius, flatCoordinates[0] + radius, flatCoordinates[1] + radius, extent);\n    };\n    /**\n     * Return the radius of the circle.\n     * @return {number} Radius.\n     * @api\n     */\n    Circle.prototype.getRadius = function () {\n        return Math.sqrt(this.getRadiusSquared_());\n    };\n    /**\n     * @private\n     * @return {number} Radius squared.\n     */\n    Circle.prototype.getRadiusSquared_ = function () {\n        var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n        var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n        return dx * dx + dy * dy;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./Geomet
 ryType.js\").default} Geometry type.\n     * @api\n     */\n    Circle.prototype.getType = function () {\n        return GeometryType.CIRCLE;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Circle.prototype.intersectsExtent = function (extent) {\n        var circleExtent = this.getExtent();\n        if (intersects(extent, circleExtent)) {\n            var center = this.getCenter();\n            if (extent[0] <= center[0] && extent[2] >= center[0]) {\n                return true;\n            }\n            if (extent[1] <= center[1] && extent[3] >= center[1]) {\n                return true;\n            }\n            return forEachCorner(extent, this.intersectsCoordinate.bind(this));\n        }\n        return false;\n    };\n    /**\n     * Set the center of the circle as {@link module:o
 l/coordinate~Coordinate coordinate}.\n     * @param {import(\"../coordinate.js\").Coordinate} center Center.\n     * @api\n     */\n    Circle.prototype.setCenter = function (center) {\n        var stride = this.stride;\n        var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n        var flatCoordinates = center.slice();\n        flatCoordinates[stride] = flatCoordinates[0] + radius;\n        for (var i = 1; i < stride; ++i) {\n            flatCoordinates[stride + i] = center[i];\n        }\n        this.setFlatCoordinates(this.layout, flatCoordinates);\n        this.changed();\n    };\n    /**\n     * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n     * number) of the circle.\n     * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n     * @param {number} radius Radius.\n     * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n     * @api\n     */\n    Circle.prototype.setCenterAn
 dRadius = function (center, radius, opt_layout) {\n        this.setLayout(opt_layout, center, 0);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        /** @type {Array<number>} */\n        var flatCoordinates = this.flatCoordinates;\n        var offset = deflateCoordinate(flatCoordinates, 0, center, this.stride);\n        flatCoordinates[offset++] = flatCoordinates[0] + radius;\n        for (var i = 1, ii = this.stride; i < ii; ++i) {\n            flatCoordinates[offset++] = flatCoordinates[i];\n        }\n        flatCoordinates.length = offset;\n        this.changed();\n    };\n    Circle.prototype.getCoordinates = function () {\n        return null;\n    };\n    Circle.prototype.setCoordinates = function (coordinates, opt_layout) { };\n    /**\n     * Set the radius of the circle. The radius is in the units of the projection.\n     * @param {number} radius Radius.\n     * @api\n     */\n    Circle.prototype.setRadius = function (radius
 ) {\n        this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n        this.changed();\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    Circle.prototype.rotate = function (angle, anchor) {\n        var center = this.getCenter();\n        var stride = this.getStride();\n        this.setCenter(rotate(center, 0, center.length, stride, angle, anchor, center));\n        this.changed();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    Circle.prototype.translate = function (deltaX, deltaY) {\n   
      var center = this.getCenter();\n        var stride = this.getStride();\n        this.setCenter(translate(center, 0, center.length, stride, deltaX, deltaY, center));\n        this.changed();\n    };\n    return Circle;\n}(SimpleGeometry));\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Ca
 n be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry.  Note that original geometry is\n *     modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = 
 b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Draw\n */\nimport Circle from '../geom/Circle.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport InteractionProperty from './Property.js';\nimport LineString from '../geom/LineString.js';\nimport MapBrowserEvent from '../MapBrowserEvent.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport Polygon, { fromCircle, makeRegular } from '../geom/Polygon.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { FALSE
 , TRUE } from '../functions.js';\nimport { always, noModifierKeys, shiftKeyOnly } from '../events/condition.js';\nimport { boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../extent.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromUserCoordinate, getUserProjection } from '../proj.js';\nimport { getChangeEventType } from '../Object.js';\nimport { squaredDistance as squaredCoordinateDistance } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/GeometryType.js\").default} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn.  The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @
 property {import(\"../Collection.js\").default<Feature>} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Conditi
 on} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition~noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles.  This makes the interaction alw
 ays operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition~shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType
 \n */\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default=,\n *     import(\"../proj/Projection.js\").default=):\n *     import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n/**\n * Draw mode.  This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nvar Mode = {\n    POINT: 'Point',\n    LINE_STRING: 'LineString',\n    POLYGON: 'Polygon',\n    CIRCLE: 'Circle',\n};\n/**\n * @enum {string}\n */\nvar DrawEventType = {\n    /**\n     * Triggered upon feature draw start\n     * @event DrawEvent#drawst
 art\n     * @api\n     */\n    DRAWSTART: 'drawstart',\n    /**\n     * Triggered upon feature draw end\n     * @event DrawEvent#drawend\n     * @api\n     */\n    DRAWEND: 'drawend',\n    /**\n     * Triggered upon feature draw abortion\n     * @event DrawEvent#drawabort\n     * @api\n     */\n    DRAWABORT: 'drawabort',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nvar DrawEvent = /** @class */ (function (_super) {\n    __extends(DrawEvent, _super);\n    /**\n     * @param {DrawEventType} type Type.\n     * @param {Feature} feature The feature drawn.\n     */\n    function DrawEvent(type, feature) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The feature being drawn.\n         * @type {Feature}\n         * @api\n         */\n        _this.feature = feature;\n        return _this;\n    }\n    return DrawEvent;\n}(Event));\n/**\n * @classdesc\n * Interaction for
  drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nvar Draw = /** @class */ (function (_super) {\n    __extends(Draw, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function Draw(options) {\n        var _this = this;\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.shouldHandle_ = false;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.downPx_ = null;\n        /**\n         * @type {?}\n         * @private\n         */\n        _this.downTimeout_;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.lastDragTime_;\n        /**\n         * @type {boo
 lean}\n         * @private\n         */\n        _this.freehand_ = false;\n        /**\n         * Target source for drawn features.\n         * @type {VectorSource}\n         * @private\n         */\n        _this.source_ = options.source ? options.source : null;\n        /**\n         * Target collection for drawn features.\n         * @type {import(\"../Collection.js\").default<Feature>}\n         * @private\n         */\n        _this.features_ = options.features ? options.features : null;\n        /**\n         * Pixel distance for snapping.\n         * @type {number}\n         * @private\n         */\n        _this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n        /**\n         * Geometry type.\n         * @type {import(\"../geom/GeometryType.js\").default}\n         * @private\n         */\n        _this.type_ = /** @type {import(\"../geom/GeometryType.js\").default} */ (options.type);\n        /**\n         * Drawing mode (derived from geometry ty
 pe.\n         * @type {Mode}\n         * @private\n         */\n        _this.mode_ = getMode(_this.type_);\n        /**\n         * Stop click, singleclick, and doubleclick events from firing during drawing.\n         * Default is `false`.\n         * @type {boolean}\n         * @private\n         */\n        _this.stopClick_ = !!options.stopClick;\n        /**\n         * The number of points that must be drawn before a polygon ring or line\n         * string can be finished.  The default is 3 for polygon rings and 2 for\n         * line strings.\n         * @type {number}\n         * @private\n         */\n        _this.minPoints_ = options.minPoints\n            ? options.minPoints\n            : _this.mode_ === Mode.POLYGON\n                ? 3\n                : 2;\n        /**\n         * The number of points that can be drawn before a polygon ring or line string\n         * is finished. The default is no restriction.\n         * @type {number}\n         * @private\n         
 */\n        _this.maxPoints_ = options.maxPoints ? options.maxPoints : Infinity;\n        /**\n         * A function to decide if a potential finish coordinate is permissible\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.finishCondition_ = options.finishCondition\n            ? options.finishCondition\n            : TRUE;\n        var geometryFunction = options.geometryFunction;\n        if (!geometryFunction) {\n            if (_this.type_ === GeometryType.CIRCLE) {\n                /**\n                 * @param {!LineCoordType} coordinates The coordinates.\n                 * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n                 * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n                 * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n                 */\n                geometryFunction = functio
 n (coordinates, opt_geometry, projection) {\n                    var circle = opt_geometry\n                        ? /** @type {Circle} */ (opt_geometry)\n                        : new Circle([NaN, NaN]);\n                    var center = fromUserCoordinate(coordinates[0], projection);\n                    var squaredLength = squaredCoordinateDistance(center, fromUserCoordinate(coordinates[1], projection));\n                    circle.setCenterAndRadius(center, Math.sqrt(squaredLength));\n                    var userProjection = getUserProjection();\n                    if (userProjection) {\n                        circle.transform(projection, userProjection);\n                    }\n                    return circle;\n                };\n            }\n            else {\n                var Constructor_1;\n                var mode_1 = _this.mode_;\n                if (mode_1 === Mode.POINT) {\n                    Constructor_1 = Point;\n                }\n                else if
  (mode_1 === Mode.LINE_STRING) {\n                    Constructor_1 = LineString;\n                }\n                else if (mode_1 === Mode.POLYGON) {\n                    Constructor_1 = Polygon;\n                }\n                /**\n                 * @param {!LineCoordType} coordinates The coordinates.\n                 * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n                 * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n                 * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n                 */\n                geometryFunction = function (coordinates, opt_geometry, projection) {\n                    var geometry = opt_geometry;\n                    if (geometry) {\n                        if (mode_1 === Mode.POLYGON) {\n                            if (coordinates[0].length) {\n                                // Add a closing coordinate to match the fi
 rst\n                                geometry.setCoordinates([\n                                    coordinates[0].concat([coordinates[0][0]]),\n                                ]);\n                            }\n                            else {\n                                geometry.setCoordinates([]);\n                            }\n                        }\n                        else {\n                            geometry.setCoordinates(coordinates);\n                        }\n                    }\n                    else {\n                        geometry = new Constructor_1(coordinates);\n                    }\n                    return geometry;\n                };\n            }\n        }\n        /**\n         * @type {GeometryFunction}\n         * @private\n         */\n        _this.geometryFunction_ = geometryFunction;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.dragVertexDelay_ =\n            options.dragVertexD
 elay !== undefined ? options.dragVertexDelay : 500;\n        /**\n         * Finish coordinate for the feature (first point for polygons, last point for\n         * linestrings).\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.finishCoordinate_ = null;\n        /**\n         * Sketch feature.\n         * @type {Feature}\n         * @private\n         */\n        _this.sketchFeature_ = null;\n        /**\n         * Sketch point.\n         * @type {Feature<Point>}\n         * @private\n         */\n        _this.sketchPoint_ = null;\n        /**\n         * Sketch coordinates. Used when drawing a line or polygon.\n         * @type {SketchCoordType}\n         * @private\n         */\n        _this.sketchCoords_ = null;\n        /**\n         * Sketch line. Used when drawing polygon.\n         * @type {Feature<LineString>}\n         * @private\n         */\n        _this.sketchLine_ = null;\n        /**\n         * Sketch lin
 e coordinates. Used when drawing a polygon or circle.\n         * @type {LineCoordType}\n         * @private\n         */\n        _this.sketchLineCoords_ = null;\n        /**\n         * Squared tolerance for handling up events.  If the squared distance\n         * between a down and up event is greater than this tolerance, up events\n         * will not be handled.\n         * @type {number}\n         * @private\n         */\n        _this.squaredClickTolerance_ = options.clickTolerance\n            ? options.clickTolerance * options.clickTolerance\n            : 36;\n        /**\n         * Draw overlay where our sketch features are drawn.\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.overlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: options.wrapX ? options.wrapX : false,\n            }),\n            style: options.style ? options.style : getDefaultStyleFunction
 (),\n            updateWhileInteracting: true,\n        });\n        /**\n         * Name of the geometry attribute for newly created features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : noModifierKeys;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.freehandCondition_;\n        if (options.freehand) {\n            _this.freehandCondition_ = always;\n        }\n        else {\n            _this.freehandCondition_ = options.freehandCondition\n                ? options.freehandCondition\n                : shiftKeyOnly;\n        }\n        _this.addEventListener(getChangeEventType(InteractionProperty.ACTIVE), _this.updateState_);\n        return _this;
 \n    }\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Draw.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        this.updateState_();\n    };\n    /**\n     * Get the overlay layer that this interaction renders sketch features to.\n     * @return {VectorLayer} Overlay layer.\n     * @api\n     */\n    Draw.prototype.getOverlay = function () {\n        return this.overlay_;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    Draw.prototype.handleEvent = function (event) {\n 
        if (event.originalEvent.type === EventType.CONTEXTMENU) {\n            // Avoid context menu for long taps when drawing on mobile\n            event.preventDefault();\n        }\n        this.freehand_ =\n            this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n        var move = event.type === MapBrowserEventType.POINTERMOVE;\n        var pass = true;\n        if (!this.freehand_ &&\n            this.lastDragTime_ &&\n            event.type === MapBrowserEventType.POINTERDRAG) {\n            var now = Date.now();\n            if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n                this.downPx_ = event.pixel;\n                this.shouldHandle_ = !this.freehand_;\n                move = true;\n            }\n            else {\n                this.lastDragTime_ = undefined;\n            }\n            if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n                clearTimeout(this.downTimeout_);\n                this.downTime
 out_ = undefined;\n            }\n        }\n        if (this.freehand_ &&\n            event.type === MapBrowserEventType.POINTERDRAG &&\n            this.sketchFeature_ !== null) {\n            this.addToDrawing_(event.coordinate);\n            pass = false;\n        }\n        else if (this.freehand_ &&\n            event.type === MapBrowserEventType.POINTERDOWN) {\n            pass = false;\n        }\n        else if (move) {\n            pass = event.type === MapBrowserEventType.POINTERMOVE;\n            if (pass && this.freehand_) {\n                this.handlePointerMove_(event);\n                if (this.shouldHandle_) {\n                    // Avoid page scrolling when freehand drawing on mobile\n                    event.preventDefault();\n                }\n            }\n            else if (event.originalEvent.pointerType == 'mouse' ||\n                (event.type === MapBrowserEventType.POINTERDRAG &&\n                    this.downTimeout_ === undefined)) {\n         
        this.handlePointerMove_(event);\n            }\n        }\n        else if (event.type === MapBrowserEventType.DBLCLICK) {\n            pass = false;\n        }\n        return _super.prototype.handleEvent.call(this, event) && pass;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Draw.prototype.handleDownEvent = function (event) {\n        this.shouldHandle_ = !this.freehand_;\n        if (this.freehand_) {\n            this.downPx_ = event.pixel;\n            if (!this.finishCoordinate_) {\n                this.startDrawing_(event);\n            }\n            return true;\n        }\n        else if (this.condition_(event)) {\n            this.lastDragTime_ = Date.now();\n            this.downTimeout_ = setTimeout(function () {\n                this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE, event.map, e
 vent.originalEvent, false, event.frameState));\n            }.bind(this), this.dragVertexDelay_);\n            this.downPx_ = event.pixel;\n            return true;\n        }\n        else {\n            this.lastDragTime_ = undefined;\n            return false;\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Draw.prototype.handleUpEvent = function (event) {\n        var pass = true;\n        if (this.downTimeout_) {\n            clearTimeout(this.downTimeout_);\n            this.downTimeout_ = undefined;\n        }\n        this.handlePointerMove_(event);\n        var circleMode = this.mode_ === Mode.CIRCLE;\n        if (this.shouldHandle_) {\n            if (!this.finishCoordinate_) {\n                this.startDrawing_(event);\n                if (this.mode_ === Mode.POINT) {\n                    this.finishDrawing();\n         
        }\n            }\n            else if (this.freehand_ || circleMode) {\n                this.finishDrawing();\n            }\n            else if (this.atFinish_(event)) {\n                if (this.finishCondition_(event)) {\n                    this.finishDrawing();\n                }\n            }\n            else {\n                this.addToDrawing_(event.coordinate);\n            }\n            pass = false;\n        }\n        else if (this.freehand_) {\n            this.abortDrawing();\n        }\n        if (!pass && this.stopClick_) {\n            event.stopPropagation();\n        }\n        return pass;\n    };\n    /**\n     * Handle move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n     * @private\n     */\n    Draw.prototype.handlePointerMove_ = function (event) {\n        if (this.downPx_ &&\n            ((!this.freehand_ && this.shouldHandle_) ||\n                (this.freehand_ && !this.shouldHandle_))) {\n         
    var downPx = this.downPx_;\n            var clickPx = event.pixel;\n            var dx = downPx[0] - clickPx[0];\n            var dy = downPx[1] - clickPx[1];\n            var squaredDistance = dx * dx + dy * dy;\n            this.shouldHandle_ = this.freehand_\n                ? squaredDistance > this.squaredClickTolerance_\n                : squaredDistance <= this.squaredClickTolerance_;\n            if (!this.shouldHandle_) {\n                return;\n            }\n        }\n        if (this.finishCoordinate_) {\n            this.modifyDrawing_(event);\n        }\n        else {\n            this.createOrUpdateSketchPoint_(event);\n        }\n    };\n    /**\n     * Determine if an event is within the snapping tolerance of the start coord.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} The event is within the snapping tolerance of the start.\n     * @private\n     */\n    Draw.prototype.atFinish_ = function (event) {\n     
    var at = false;\n        if (this.sketchFeature_) {\n            var potentiallyDone = false;\n            var potentiallyFinishCoordinates = [this.finishCoordinate_];\n            if (this.mode_ === Mode.LINE_STRING) {\n                potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n            }\n            else if (this.mode_ === Mode.POLYGON) {\n                var sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n                potentiallyDone = sketchCoords[0].length > this.minPoints_;\n                potentiallyFinishCoordinates = [\n                    sketchCoords[0][0],\n                    sketchCoords[0][sketchCoords[0].length - 2],\n                ];\n            }\n            if (potentiallyDone) {\n                var map = event.map;\n                for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n                    var finishCoordinate = potentiallyFinishCoordinates[i];\n                    var fini
 shPixel = map.getPixelFromCoordinate(finishCoordinate);\n                    var pixel = event.pixel;\n                    var dx = pixel[0] - finishPixel[0];\n                    var dy = pixel[1] - finishPixel[1];\n                    var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n                    at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n                    if (at) {\n                        this.finishCoordinate_ = finishCoordinate;\n                        break;\n                    }\n                }\n            }\n        }\n        return at;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @private\n     */\n    Draw.prototype.createOrUpdateSketchPoint_ = function (event) {\n        var coordinates = event.coordinate.slice();\n        if (!this.sketchPoint_) {\n            this.sketchPoint_ = new Feature(new Point(coordinates));\n            this.updateSketchFeatures_();\n        }\n        el
 se {\n            var sketchPointGeom = this.sketchPoint_.getGeometry();\n            sketchPointGeom.setCoordinates(coordinates);\n        }\n    };\n    /**\n     * Start the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @private\n     */\n    Draw.prototype.startDrawing_ = function (event) {\n        var start = event.coordinate;\n        var projection = event.map.getView().getProjection();\n        this.finishCoordinate_ = start;\n        if (this.mode_ === Mode.POINT) {\n            this.sketchCoords_ = start.slice();\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            this.sketchCoords_ = [[start.slice(), start.slice()]];\n            this.sketchLineCoords_ = this.sketchCoords_[0];\n        }\n        else {\n            this.sketchCoords_ = [start.slice(), start.slice()];\n        }\n        if (this.sketchLineCoords_) {\n            this.sketchLine_ = new Feature(new LineString(this.sketchLineCoords_));\n      
   }\n        var geometry = this.geometryFunction_(this.sketchCoords_, undefined, projection);\n        this.sketchFeature_ = new Feature();\n        if (this.geometryName_) {\n            this.sketchFeature_.setGeometryName(this.geometryName_);\n        }\n        this.sketchFeature_.setGeometry(geometry);\n        this.updateSketchFeatures_();\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n    };\n    /**\n     * Modify the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @private\n     */\n    Draw.prototype.modifyDrawing_ = function (event) {\n        var coordinate = event.coordinate;\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = event.map.getView().getProjection();\n        var coordinates, last;\n        if (this.mode_ === Mode.POINT) {\n            last = this.sketchCoords_;\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            coordin
 ates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            last = coordinates[coordinates.length - 1];\n            if (this.atFinish_(event)) {\n                // snap to finish\n                coordinate = this.finishCoordinate_.slice();\n            }\n        }\n        else {\n            coordinates = this.sketchCoords_;\n            last = coordinates[coordinates.length - 1];\n        }\n        last[0] = coordinate[0];\n        last[1] = coordinate[1];\n        this.geometryFunction_(\n        /** @type {!LineCoordType} */ (this.sketchCoords_), geometry, projection);\n        if (this.sketchPoint_) {\n            var sketchPointGeom = this.sketchPoint_.getGeometry();\n            sketchPointGeom.setCoordinates(coordinate);\n        }\n        /** @type {LineString} */\n        var sketchLineGeom;\n        if (geometry.getType() == GeometryType.POLYGON &&\n            this.mode_ !== Mode.POLYGON) {\n            if (!this.sketchLine_) {\n                this.s
 ketchLine_ = new Feature();\n            }\n            var ring = geometry.getLinearRing(0);\n            sketchLineGeom = this.sketchLine_.getGeometry();\n            if (!sketchLineGeom) {\n                sketchLineGeom = new LineString(ring.getFlatCoordinates(), ring.getLayout());\n                this.sketchLine_.setGeometry(sketchLineGeom);\n            }\n            else {\n                sketchLineGeom.setFlatCoordinates(ring.getLayout(), ring.getFlatCoordinates());\n                sketchLineGeom.changed();\n            }\n        }\n        else if (this.sketchLineCoords_) {\n            sketchLineGeom = this.sketchLine_.getGeometry();\n            sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n        }\n        this.updateSketchFeatures_();\n    };\n    /**\n     * Add a new coordinate to the drawing.\n     * @param {!PointCoordType} coordinate Coordinate\n     * @private\n     */\n    Draw.prototype.addToDrawing_ = function (coordinate) {\n        var geomet
 ry = this.sketchFeature_.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        var done;\n        var coordinates;\n        if (this.mode_ === Mode.LINE_STRING) {\n            this.finishCoordinate_ = coordinate.slice();\n            coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n            if (coordinates.length >= this.maxPoints_) {\n                if (this.freehand_) {\n                    coordinates.pop();\n                }\n                else {\n                    done = true;\n                }\n            }\n            coordinates.push(coordinate.slice());\n            this.geometryFunction_(coordinates, geometry, projection);\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            if (coordinates.length >= this.maxPoints_) {\n                if (this.freehand_) {\n                    coordinates.pop();\n           
      }\n                else {\n                    done = true;\n                }\n            }\n            coordinates.push(coordinate.slice());\n            if (done) {\n                this.finishCoordinate_ = coordinates[0];\n            }\n            this.geometryFunction_(this.sketchCoords_, geometry, projection);\n        }\n        this.updateSketchFeatures_();\n        if (done) {\n            this.finishDrawing();\n        }\n    };\n    /**\n     * Remove last point of the feature currently being drawn.\n     * @api\n     */\n    Draw.prototype.removeLastPoint = function () {\n        if (!this.sketchFeature_) {\n            return;\n        }\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        var coordinates;\n        /** @type {LineString} */\n        var sketchLineGeom;\n        if (this.mode_ === Mode.LINE_STRING) {\n            coordinates = /** @type {LineCoordType} */ (this.ske
 tchCoords_);\n            coordinates.splice(-2, 1);\n            this.geometryFunction_(coordinates, geometry, projection);\n            if (coordinates.length >= 2) {\n                this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n            }\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            coordinates.splice(-2, 1);\n            sketchLineGeom = this.sketchLine_.getGeometry();\n            sketchLineGeom.setCoordinates(coordinates);\n            this.geometryFunction_(this.sketchCoords_, geometry, projection);\n        }\n        if (coordinates.length === 0) {\n            this.abortDrawing();\n        }\n        this.updateSketchFeatures_();\n    };\n    /**\n     * Stop drawing and add the sketch feature to the target layer.\n     * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n     * dispatched before inserting the feature
 .\n     * @api\n     */\n    Draw.prototype.finishDrawing = function () {\n        var sketchFeature = this.abortDrawing_();\n        if (!sketchFeature) {\n            return;\n        }\n        var coordinates = this.sketchCoords_;\n        var geometry = sketchFeature.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        if (this.mode_ === Mode.LINE_STRING) {\n            // remove the redundant last point\n            coordinates.pop();\n            this.geometryFunction_(coordinates, geometry, projection);\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            // remove the redundant last point in ring\n            /** @type {PolyCoordType} */ (coordinates)[0].pop();\n            this.geometryFunction_(coordinates, geometry, projection);\n            coordinates = geometry.getCoordinates();\n        }\n        // cast multi-part geometries\n        if (this.type_ === GeometryType.MULTI_POINT) {\n            sketchFeature.s
 etGeometry(new MultiPoint([/** @type {PointCoordType} */ (coordinates)]));\n        }\n        else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n            sketchFeature.setGeometry(new MultiLineString([/** @type {LineCoordType} */ (coordinates)]));\n        }\n        else if (this.type_ === GeometryType.MULTI_POLYGON) {\n            sketchFeature.setGeometry(new MultiPolygon([/** @type {PolyCoordType} */ (coordinates)]));\n        }\n        // First dispatch event to allow full set up of feature\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n        // Then insert feature\n        if (this.features_) {\n            this.features_.push(sketchFeature);\n        }\n        if (this.source_) {\n            this.source_.addFeature(sketchFeature);\n        }\n    };\n    /**\n     * Stop drawing without adding the sketch feature to the target layer.\n     * @return {Feature} The sketch feature (or null if none).\n     * @private\n     */\n 
    Draw.prototype.abortDrawing_ = function () {\n        this.finishCoordinate_ = null;\n        var sketchFeature = this.sketchFeature_;\n        this.sketchFeature_ = null;\n        this.sketchPoint_ = null;\n        this.sketchLine_ = null;\n        this.overlay_.getSource().clear(true);\n        return sketchFeature;\n    };\n    /**\n     * Stop drawing without adding the sketch feature to the target layer.\n     * @api\n     */\n    Draw.prototype.abortDrawing = function () {\n        var sketchFeature = this.abortDrawing_();\n        if (sketchFeature) {\n            this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n        }\n    };\n    /**\n     * Append coordinates to the end of the geometry that is currently being drawn.\n     * This can be used when drawing LineStrings or Polygons. Coordinates will\n     * either be appended to the current LineString or the outer ring of the current\n     * Polygon.\n     * @param {!LineCoordType} coordinates L
 inear coordinates to be appended into\n     * the coordinate array.\n     * @api\n     */\n    Draw.prototype.appendCoordinates = function (coordinates) {\n        var mode = this.mode_;\n        var sketchCoords = [];\n        if (mode === Mode.LINE_STRING) {\n            sketchCoords = /** @type {LineCoordType} */ this.sketchCoords_;\n        }\n        else if (mode === Mode.POLYGON) {\n            sketchCoords =\n                this.sketchCoords_ && this.sketchCoords_.length\n                    ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n                    : [];\n        }\n        // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n        var ending = sketchCoords.pop();\n        // Append coordinate list\n        for (var i = 0; i < coordinates.length; i++) {\n            this.addToDrawing_(coordinates[i]);\n        }\n        // Duplicate last coordinate for sketch drawing\n        this.addToDrawing_(ending);\n    };\n    /
 **\n     * Initiate draw mode by starting from an existing geometry which will\n     * receive new additional points. This only works on features with\n     * `LineString` geometries, where the interaction will extend lines by adding\n     * points to the end of the coordinates array.\n     * This will change the original feature, instead of drawing a copy.\n     *\n     * The function will dispatch a `drawstart` event.\n     *\n     * @param {!Feature<LineString>} feature Feature to be extended.\n     * @api\n     */\n    Draw.prototype.extend = function (feature) {\n        var geometry = feature.getGeometry();\n        var lineString = geometry;\n        this.sketchFeature_ = feature;\n        this.sketchCoords_ = lineString.getCoordinates();\n        var last = this.sketchCoords_[this.sketchCoords_.length - 1];\n        this.finishCoordinate_ = last.slice();\n        this.sketchCoords_.push(last.slice());\n        this.updateSketchFeatures_();\n        this.dispatchEvent(new Dra
 wEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n    };\n    /**\n     * Redraw the sketch features.\n     * @private\n     */\n    Draw.prototype.updateSketchFeatures_ = function () {\n        var sketchFeatures = [];\n        if (this.sketchFeature_) {\n            sketchFeatures.push(this.sketchFeature_);\n        }\n        if (this.sketchLine_) {\n            sketchFeatures.push(this.sketchLine_);\n        }\n        if (this.sketchPoint_) {\n            sketchFeatures.push(this.sketchPoint_);\n        }\n        var overlaySource = this.overlay_.getSource();\n        overlaySource.clear(true);\n        overlaySource.addFeatures(sketchFeatures);\n    };\n    /**\n     * @private\n     */\n    Draw.prototype.updateState_ = function () {\n        var map = this.getMap();\n        var active = this.getActive();\n        if (!map || !active) {\n            this.abortDrawing();\n        }\n        this.overlay_.setMap(active ? map : null);\n    };\n    return Draw;\n}(Pointer
 Interaction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var styles = createEditingStyle();\n    return function (feature, resolution) {\n        return styles[feature.getGeometry().getType()];\n    };\n}\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of an\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number=} opt_sides Number of sides of the regular polygon. Default is\n *     32.\n * @param {number=} opt_angle Angle of the first point in radians. 0 means East.\n *     Default is the angle defined by the heading from the center of the\n *     regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a\n *     polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n    return function (coordinates, opt_geom
 etry, projection) {\n        var center = fromUserCoordinate(\n        /** @type {LineCoordType} */ (coordinates)[0], projection);\n        var end = fromUserCoordinate(\n        /** @type {LineCoordType} */ (coordinates)[1], projection);\n        var radius = Math.sqrt(squaredCoordinateDistance(center, end));\n        var geometry = opt_geometry\n            ? /** @type {Polygon} */ (opt_geometry)\n            : fromCircle(new Circle(center), opt_sides);\n        var angle = opt_angle;\n        if (!opt_angle) {\n            var x = end[0] - center[0];\n            var y = end[1] - center[1];\n            angle = Math.atan(y / x) - (x < 0 ? Math.PI : 0);\n        }\n        makeRegular(geometry, center, radius, angle);\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            geometry.transform(projection, userProjection);\n        }\n        return geometry;\n    };\n}\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (
 aligned\n * with the coordinate system axes).  Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n    return function (coordinates, opt_geometry, projection) {\n        var extent = boundingExtent(\n        /** @type {LineCoordType} */ (coordinates).map(function (coordinate) {\n            return fromUserCoordinate(coordinate, projection);\n        }));\n        var boxCoordinates = [\n            [\n                getBottomLeft(extent),\n                getBottomRight(extent),\n                getTopRight(extent),\n                getTopLeft(extent),\n                getBottomLeft(extent),\n            ],\n        ];\n        var geometry = opt_geometry;\n        if (geometry) {\n            geometry.setCoordinates(boxCoordinates);\n        }\n        else {\n            geometry = new Polygon(boxCoordinates);
 \n        }\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            geometry.transform(projection, userProjection);\n        }\n        return geometry;\n    };\n}\n/**\n * Get the drawing mode.  The mode for mult-part geometries is the same as for\n * their single-part cousins.\n * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n    var mode;\n    if (type === GeometryType.POINT || type === GeometryType.MULTI_POINT) {\n        mode = Mode.POINT;\n    }\n    else if (type === GeometryType.LINE_STRING ||\n        type === GeometryType.MULTI_LINE_STRING) {\n        mode = Mode.LINE_STRING;\n    }\n    else if (type === GeometryType.POLYGON ||\n        type === GeometryType.MULTI_POLYGON) {\n        mode = Mode.POLYGON;\n    }\n    else if (type === GeometryType.CIRCLE) {\n        mode = Mode.CIRCLE;\n    }\n    return /** @type {!Mode} */ (mode);\n}\nexport 
 default Draw;\n//# sourceMappingURL=Draw.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Extent\n */\nimport Event from '../events/Event.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport VectorLayer from
  '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { always } from '../events/condition.js';\nimport { boundingExtent, getArea } from '../extent.js';\nimport { closestOnSegment, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\nimport { toUserExtent } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~always}.\n * @property {import(\"../extent.js\").Extent} [extent] Initial extent. Defaults to no\n * initial extent.\n * @property {import(\"../style/Style.js\").StyleLike} [b
 oxStyle]\n * Style for the drawn extent box. Defaults to\n * {@link module:ol/style/Style~createEditing()['Polygon']}\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [pointerStyle]\n * Style for the cursor used to draw the extent. Defaults to\n * {@link module:ol/style/Style~createEditing()['Point']}\n * @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps\n * in the X direction? Only affects visuals, not functionality.\n */\n/**\n * @enum {string}\n */\nvar ExtentEventType = {\n    /**\n     * Triggered after the extent is changed\n     * @event ExtentEvent#extentchanged\n     * @api\n     */\n    EXTENTCHANGED: 'extentchanged',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Extent~Extent} instances are\n * instances of this type.\n */\nvar ExtentEvent = /** @class */ (function (_super
 ) {\n    __extends(ExtentEvent, _super);\n    /**\n     * @param {import(\"../extent.js\").Extent} extent the new extent\n     */\n    function ExtentEvent(extent) {\n        var _this = _super.call(this, ExtentEventType.EXTENTCHANGED) || this;\n        /**\n         * The current extent.\n         * @type {import(\"../extent.js\").Extent}\n         * @api\n         */\n        _this.extent = extent;\n        return _this;\n    }\n    return ExtentEvent;\n}(Event));\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map.\n * Once drawn, the vector box can be modified by dragging its vertices or edges.\n * This interaction is only supported for mouse devices.\n *\n * @fires ExtentEvent\n * @api\n */\nvar Extent = /** @class */ (function (_super) {\n    __extends(Extent, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Extent(opt_options) {\n        var _this = this;\n        var options = opt_options || 
 {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * Condition\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.condition_ = options.condition ? options.condition : always;\n        /**\n         * Extent of the drawn box\n         * @type {import(\"../extent.js\").Extent}\n         * @private\n         */\n        _this.extent_ = null;\n        /**\n         * Handler for pointer move events\n         * @type {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null}\n         * @private\n         */\n        _this.pointerHandler_ = null;\n        /**\n         * Pixel threshold to snap to extent\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * Is the pointer s
 napped to an extent vertex\n         * @type {boolean}\n         * @private\n         */\n        _this.snappedToVertex_ = false;\n        /**\n         * Feature for displaying the visible extent\n         * @type {Feature}\n         * @private\n         */\n        _this.extentFeature_ = null;\n        /**\n         * Feature for displaying the visible pointer\n         * @type {Feature<Point>}\n         * @private\n         */\n        _this.vertexFeature_ = null;\n        if (!opt_options) {\n            opt_options = {};\n        }\n        /**\n         * Layer for the extentFeature\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.extentOverlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!opt_options.wrapX,\n            }),\n            style: opt_options.boxStyle\n                ? opt_options.boxStyle\n                : getDefaultExtentStyleFunction(),\n        
     updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        /**\n         * Layer for the vertexFeature\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.vertexOverlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!opt_options.wrapX,\n            }),\n            style: opt_options.pointerStyle\n                ? opt_options.pointerStyle\n                : getDefaultPointerStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        if (opt_options.extent) {\n            _this.setExtent(opt_options.extent);\n        }\n        return _this;\n    }\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel cursor location\n     * @param {import(\"../PluggableMap.js\").default} map map\n     * @returns {import(\"../coordinate.js\").Coordinate|null} snapped vertex on extent\n
      * @private\n     */\n    Extent.prototype.snapToVertex_ = function (pixel, map) {\n        var pixelCoordinate = map.getCoordinateFromPixelInternal(pixel);\n        var sortByDistance = function (a, b) {\n            return (squaredDistanceToSegment(pixelCoordinate, a) -\n                squaredDistanceToSegment(pixelCoordinate, b));\n        };\n        var extent = this.getExtentInternal();\n        if (extent) {\n            //convert extents to line segments and find the segment closest to pixelCoordinate\n            var segments = getSegments(extent);\n            segments.sort(sortByDistance);\n            var closestSegment = segments[0];\n            var vertex = closestOnSegment(pixelCoordinate, closestSegment);\n            var vertexPixel = map.getPixelFromCoordinateInternal(vertex);\n            //if the distance is within tolerance, snap to the segment\n            if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n                //test if we 
 should further snap to a vertex\n                var pixel1 = map.getPixelFromCoordinateInternal(closestSegment[0]);\n                var pixel2 = map.getPixelFromCoordinateInternal(closestSegment[1]);\n                var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                this.snappedToVertex_ = dist <= this.pixelTolerance_;\n                if (this.snappedToVertex_) {\n                    vertex =\n                        squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n                }\n                return vertex;\n            }\n        }\n        return null;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent pointer move event\n     * @private\n     */\n    Extent.prototype.handlePointerMove_ = function (mapBrowserEvent) {\n
         var pixel = mapBrowserEvent.pixel;\n        var map = mapBrowserEvent.map;\n        var vertex = this.snapToVertex_(pixel, map);\n        if (!vertex) {\n            vertex = map.getCoordinateFromPixelInternal(pixel);\n        }\n        this.createOrUpdatePointerFeature_(vertex);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent extent\n     * @returns {Feature} extent as featrue\n     * @private\n     */\n    Extent.prototype.createOrUpdateExtentFeature_ = function (extent) {\n        var extentFeature = this.extentFeature_;\n        if (!extentFeature) {\n            if (!extent) {\n                extentFeature = new Feature({});\n            }\n            else {\n                extentFeature = new Feature(polygonFromExtent(extent));\n            }\n            this.extentFeature_ = extentFeature;\n            this.extentOverlay_.getSource().addFeature(extentFeature);\n        }\n        else {\n            if (!extent) {\n                extentF
 eature.setGeometry(undefined);\n            }\n            else {\n                extentFeature.setGeometry(polygonFromExtent(extent));\n            }\n        }\n        return extentFeature;\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} vertex location of feature\n     * @returns {Feature} vertex as feature\n     * @private\n     */\n    Extent.prototype.createOrUpdatePointerFeature_ = function (vertex) {\n        var vertexFeature = this.vertexFeature_;\n        if (!vertexFeature) {\n            vertexFeature = new Feature(new Point(vertex));\n            this.vertexFeature_ = vertexFeature;\n            this.vertexOverlay_.getSource().addFeature(vertexFeature);\n        }\n        else {\n            var geometry = vertexFeature.getGeometry();\n            geometry.setCoordinates(vertex);\n        }\n        return vertexFeature;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @r
 eturn {boolean} `false` to stop event propagation.\n     */\n    Extent.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent || !this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        //display pointer (if not dragging)\n        if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n            !this.handlingDownUpSequence) {\n            this.handlePointerMove_(mapBrowserEvent);\n        }\n        //call pointer to determine up/down/drag\n        _super.prototype.handleEvent.call(this, mapBrowserEvent);\n        //return false to stop propagation\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Extent.prototype.handleDownEvent = function (mapBrowserEvent) {\n        var pixel = mapBrowserEvent.pixel;\n        var map = mapBrowser
 Event.map;\n        var extent = this.getExtentInternal();\n        var vertex = this.snapToVertex_(pixel, map);\n        //find the extent corner opposite the passed corner\n        var getOpposingPoint = function (point) {\n            var x_ = null;\n            var y_ = null;\n            if (point[0] == extent[0]) {\n                x_ = extent[2];\n            }\n            else if (point[0] == extent[2]) {\n                x_ = extent[0];\n            }\n            if (point[1] == extent[1]) {\n                y_ = extent[3];\n            }\n            else if (point[1] == extent[3]) {\n                y_ = extent[1];\n            }\n            if (x_ !== null && y_ !== null) {\n                return [x_, y_];\n            }\n            return null;\n        };\n        if (vertex && extent) {\n            var x = vertex[0] == extent[0] || vertex[0] == extent[2] ? vertex[0] : null;\n            var y = vertex[1] == extent[1] || vertex[1] == extent[3] ? vertex[1] : null;
 \n            //snap to point\n            if (x !== null && y !== null) {\n                this.pointerHandler_ = getPointHandler(getOpposingPoint(vertex));\n                //snap to edge\n            }\n            else if (x !== null) {\n                this.pointerHandler_ = getEdgeHandler(getOpposingPoint([x, extent[1]]), getOpposingPoint([x, extent[3]]));\n            }\n            else if (y !== null) {\n                this.pointerHandler_ = getEdgeHandler(getOpposingPoint([extent[0], y]), getOpposingPoint([extent[2], y]));\n            }\n            //no snap - new bbox\n        }\n        else {\n            vertex = map.getCoordinateFromPixelInternal(pixel);\n            this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);\n            this.pointerHandler_ = getPointHandler(vertex);\n        }\n        return true; //event handled; start downup sequence\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").defau
 lt} mapBrowserEvent Event.\n     */\n    Extent.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (this.pointerHandler_) {\n            var pixelCoordinate = mapBrowserEvent.coordinate;\n            this.setExtent(this.pointerHandler_(pixelCoordinate));\n            this.createOrUpdatePointerFeature_(pixelCoordinate);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Extent.prototype.handleUpEvent = function (mapBrowserEvent) {\n        this.pointerHandler_ = null;\n        //If bbox is zero area, set to null;\n        var extent = this.getExtentInternal();\n        if (!extent || getArea(extent) === 0) {\n            this.setExtent(null);\n        }\n        return false; //Stop handling downup sequence\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n   
   * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Extent.prototype.setMap = function (map) {\n        this.extentOverlay_.setMap(map);\n        this.vertexOverlay_.setMap(map);\n        _super.prototype.setMap.call(this, map);\n    };\n    /**\n     * Returns the current drawn extent in the view projection (or user projection if set)\n     *\n     * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n     * @api\n     */\n    Extent.prototype.getExtent = function () {\n        return toUserExtent(this.getExtentInternal(), this.getMap().getView().getProjection());\n    };\n    /**\n     * Returns the current drawn extent in the view projection\n     *\n     * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n     * @api\n     */\n    Extent.prototype.getExtentInternal = function () {\n        return this
 .extent_;\n    };\n    /**\n     * Manually sets the drawn extent, using the view projection.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent\n     * @api\n     */\n    Extent.prototype.setExtent = function (extent) {\n        //Null extent means no bbox\n        this.extent_ = extent ? extent : null;\n        this.createOrUpdateExtentFeature_(extent);\n        this.dispatchEvent(new ExtentEvent(this.extent_));\n    };\n    return Extent;\n}(PointerInteraction));\n/**\n * Returns the default style for the drawn bbox\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default Extent style\n */\nfunction getDefaultExtentStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POLYGON];\n    };\n}\n/**\n * Returns the default style for the pointer\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default pointer style\n */\nfunction getDefaultPointerStyleFunction
 () {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POINT];\n    };\n}\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedPoint corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent} event handler\n */\nfunction getPointHandler(fixedPoint) {\n    return function (point) {\n        return boundingExtent([fixedPoint, point]);\n    };\n}\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedP1 first corner that will be unchanged in the new extent\n * @param {import(\"../coordinate.js\").Coordinate} fixedP2 second corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null} event handler\n */\nfunction getEdgeHandler(fixedP1, fixedP2) {\n    if (fixedP1[0] == fixedP2[0]) {\n        return function (point) {\n       
      return boundingExtent([fixedP1, [point[0], fixedP2[1]]]);\n        };\n    }\n    else if (fixedP1[1] == fixedP2[1]) {\n        return function (point) {\n            return boundingExtent([fixedP1, [fixedP2[0], point[1]]]);\n        };\n    }\n    else {\n        return null;\n    }\n}\n/**\n * @param {import(\"../extent.js\").Extent} extent extent\n * @returns {Array<Array<import(\"../coordinate.js\").Coordinate>>} extent line segments\n */\nfunction getSegments(extent) {\n    return [\n        [\n            [extent[0], extent[1]],\n            [extent[0], extent[3]],\n        ],\n        [\n            [extent[0], extent[3]],\n            [extent[2], extent[3]],\n        ],\n        [\n            [extent[2], extent[3]],\n            [extent[2], extent[1]],\n        ],\n        [\n            [extent[2], extent[1]],\n            [extent[0], extent[1]],\n        ],\n    ];\n}\nexport default Extent;\n//# sourceMappingURL=Extent.js.map","var __extends = (this && this.__extend
 s) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Modify\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimpo
 rt PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { altKeyOnly, always, primaryAction, singleClick, } from '../events/condition.js';\nimport { boundingExtent, buffer as bufferExtent, createOrUpdateFromCoordinate as createExtent, } from '../extent.js';\nimport { closestOnSegment, distance as coordinateDistance, equals as coordinatesEqual, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { equals } from '../array.js';\nimport { fromCircle } from '../geom/Polygon.js';\nimport { fromUserCoordinate, fromUserExtent, getUserProjection, toUserCoordinate, toUserExtent, } from '../proj.js';\nimport { getUid } from '../util.js';\n/**\n * The segment index assigned to a circle's center
  when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CENTER_INDEX = 0;\n/**\n * The segment index assigned to a circle's circumference when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CIRCUMFERENCE_INDEX = 1;\nvar tempExtent = [0, 0, 0, 0];\nvar tempSegment = [];\n/**\n * @enum {string}\n */\nvar ModifyEventType = {\n    /**\n     * Triggered upon feature modification start\n     * @event ModifyEvent#modifystart\n     * @api\n     */\n    MODIFYSTART: 'modifystart',\n    /**\n     * Triggered upon feature modification end\n     * @event ModifyEvent#modifyend\n     * @api\n     */\n    MODIFYEND: 'modifyend',\n};\n/**\n * @typedef {Object} SegmentData\n * @property {Array<number>} [depth]\n * @property {Feature} feature\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry\n * @property {number} [index]\n * @property {Array<import(\"../extent.js\").Extent>} segmen
 t\n * @property {Array<SegmentData>} [featureSegments]\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event will be considered to add or move a\n * vertex to the sketch. Default is\n * {@link module:ol/events/condition~primaryAction}.\n * @property {import(\"../events/condition.js\").Condition} [deleteCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. By default,\n * {@link module:ol/events/condition~singleClick} with\n * {@link module:ol/events/condition~altKeyOnly} results in a vertex deletion.\n * @property {import(\"../events/condition.js\").Condition} [insertVertexCondition] A\n * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a bo
 olean to indicate whether a new vertex should be added to the sketch\n * features. Default is {@link module:ol/events/condition~always}.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style used for the features being modified. By default the default edit\n * style is used (see {@link module:ol/style}).\n * @property {VectorSource} [source] The vector source with\n * features to modify.  If a vector source is not provided, a feature collection\n * must be provided with the features option.\n * @property {Collection<Feature>} [features]\n * The features the interaction works on.  If a feature collection is not\n * provided, a vector source must be provided with the source option.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n/**\n * @classdesc\n * Events emitted by {@link m
 odule:ol/interaction/Modify~Modify} instances are\n * instances of this type.\n */\nvar ModifyEvent = /** @class */ (function (_super) {\n    __extends(ModifyEvent, _super);\n    /**\n     * @param {ModifyEventType} type Type.\n     * @param {Collection<Feature>} features\n     * The features modified.\n     * @param {import(\"../MapBrowserEvent.js\").default} MapBrowserEvent\n     * Associated {@link module:ol/MapBrowserEvent}.\n     */\n    function ModifyEvent(type, features, MapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features being modified.\n         * @type {Collection<Feature>}\n         * @api\n         */\n        _this.features = features;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = MapBrowserEvent;\n        return _this;\n    }\n    return ModifyEvent;\n}(Event));\
 nexport { ModifyEvent };\n/**\n * @classdesc\n * Interaction for modifying feature geometries.  To modify features that have\n * been added to an existing source, construct the modify interaction with the\n * `source` option.  If you want to modify features in a collection (for example,\n * the collection used by a select interaction), construct the interaction with\n * the `features` option.  The interaction must be constructed with either a\n * `source` or `features` option.\n *\n * By default, the interaction will allow deletion of vertices when the `alt`\n * key is pressed.  To configure the interaction with a different condition\n * for deletion, use the `deleteCondition` option.\n * @fires ModifyEvent\n * @api\n */\nvar Modify = /** @class */ (function (_super) {\n    __extends(Modify, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function Modify(options) {\n        var _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (optio
 ns)) || this;\n        /** @private */\n        _this.boundHandleFeatureChange_ = _this.handleFeatureChange_.bind(_this);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : primaryAction;\n        /**\n         * @private\n         * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n         * @return {boolean} Combined condition result.\n         */\n        _this.defaultDeleteCondition_ = function (mapBrowserEvent) {\n            return altKeyOnly(mapBrowserEvent) && singleClick(mapBrowserEvent);\n        };\n        /**\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.deleteCondition_ = options.deleteCondition\n            ? options.deleteCondition\n            : _this.defaultDeleteCondition_;\n        /**\n         * @type {import(\"../events/condition.js\
 ").Condition}\n         * @private\n         */\n        _this.insertVertexCondition_ = options.insertVertexCondition\n            ? options.insertVertexCondition\n            : always;\n        /**\n         * Editing vertex.\n         * @type {Feature}\n         * @private\n         */\n        _this.vertexFeature_ = null;\n        /**\n         * Segments intersecting {@link this.vertexFeature_} by segment uid.\n         * @type {Object<string, boolean>}\n         * @private\n         */\n        _this.vertexSegments_ = null;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.lastPixel_ = [0, 0];\n        /**\n         * Tracks if the next `singleclick` event should be ignored to prevent\n         * accidental deletion right after vertex creation.\n         * @type {boolean}\n         * @private\n         */\n        _this.ignoreNextSingleClick_ = false;\n        /**\n         * @type {boolean}\n         * @private\n   
       */\n        _this.modified_ = false;\n        /**\n         * Segment RTree for each layer\n         * @type {RBush<SegmentData>}\n         * @private\n         */\n        _this.rBush_ = new RBush();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.snappedToVertex_ = false;\n        /**\n         * Indicate whether the interaction is currently changing a feature's\n         * coordinates.\n         * @type {boolean}\n         * @private\n         */\n        _this.changingFeature_ = false;\n        /**\n         * @type {Array}\n         * @private\n         */\n        _this.dragSegments_ = [];\n        /**\n         * Draw overlay where sketch features are drawn.\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.overla
 y_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!options.wrapX,\n            }),\n            style: options.style ? options.style : getDefaultStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        /**\n         * @const\n         * @private\n         * @type {!Object<string, function(Feature, import(\"../geom/Geometry.js\").default): void>}\n         */\n        _this.SEGMENT_WRITERS_ = {\n            'Point': _this.writePointGeometry_.bind(_this),\n            'LineString': _this.writeLineStringGeometry_.bind(_this),\n            'LinearRing': _this.writeLineStringGeometry_.bind(_this),\n            'Polygon': _this.writePolygonGeometry_.bind(_this),\n            'MultiPoint': _this.writeMultiPointGeometry_.bind(_this),\n            'MultiLineString': _this.writeMultiLineStringGeometry_.bind(_this),\n            'MultiPolygon': _this.
 writeMultiPolygonGeometry_.bind(_this),\n            'Circle': _this.writeCircleGeometry_.bind(_this),\n            'GeometryCollection': _this.writeGeometryCollectionGeometry_.bind(_this),\n        };\n        /**\n         * @type {VectorSource}\n         * @private\n         */\n        _this.source_ = null;\n        var features;\n        if (options.source) {\n            _this.source_ = options.source;\n            features = new Collection(_this.source_.getFeatures());\n            _this.source_.addEventListener(VectorEventType.ADDFEATURE, _this.handleSourceAdd_.bind(_this));\n            _this.source_.addEventListener(VectorEventType.REMOVEFEATURE, _this.handleSourceRemove_.bind(_this));\n        }\n        else {\n            features = options.features;\n        }\n        if (!features) {\n            throw new Error('The modify interaction requires features or a source');\n        }\n        /**\n         * @type {Collection<Feature>}\n         * @private\n         */\n 
        _this.features_ = features;\n        _this.features_.forEach(_this.addFeature_.bind(_this));\n        _this.features_.addEventListener(CollectionEventType.ADD, _this.handleFeatureAdd_.bind(_this));\n        _this.features_.addEventListener(CollectionEventType.REMOVE, _this.handleFeatureRemove_.bind(_this));\n        /**\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @private\n         */\n        _this.lastPointerEvent_ = null;\n        return _this;\n    }\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.addFeature_ = function (feature) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var writer = this.SEGMENT_WRITERS_[geometry.getType()];\n            if (writer) {\n                writer(feature, geometry);\n            }\n        }\n        var map = this.getMap();\n        if (map && map.isRendered() && this.getActive()) {\n            this.handlePointerAtPi
 xel_(this.lastPixel_, map);\n        }\n        feature.addEventListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event\n     * @private\n     */\n    Modify.prototype.willModifyFeatures_ = function (evt) {\n        if (!this.modified_) {\n            this.modified_ = true;\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYSTART, this.features_, evt));\n        }\n    };\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.removeFeature_ = function (feature) {\n        this.removeFeatureSegmentData_(feature);\n        // Remove the vertex feature if the collection of canditate features is empty.\n        if (this.vertexFeature_ && this.features_.getLength() === 0) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n        feature.removeEven
 tListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n    };\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.removeFeatureSegmentData_ = function (feature) {\n        var rBush = this.rBush_;\n        /** @type {Array<SegmentData>} */\n        var nodesToRemove = [];\n        rBush.forEach(\n        /**\n         * @param {SegmentData} node RTree node.\n         */\n        function (node) {\n            if (feature === node.feature) {\n                nodesToRemove.push(node);\n            }\n        });\n        for (var i = nodesToRemove.length - 1; i >= 0; --i) {\n            var nodeToRemove = nodesToRemove[i];\n            for (var j = this.dragSegments_.length - 1; j >= 0; --j) {\n                if (this.dragSegments_[j][0] === nodeToRemove) {\n                    this.dragSegments_.splice(j, 1);\n                }\n            }\n            rBush.remove(nodeToRemove);\n        }\n    };\n    /**\n     * Activate or
  deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    Modify.prototype.setActive = function (active) {\n        if (this.vertexFeature_ && !active) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n        _super.prototype.setActive.call(this, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Modify.prototype.setMap = function (map) {\n        this.overlay_.setMap(map);\n        _super.prototype.setMap.call(this, map);\n    };\n    /**\n     * Get the overlay layer that this interaction renders sketch features to.\n     * @return {VectorLayer} Overlay layer.\n     * @api\n     */\n    Modify.prototype.getOverla
 y = function () {\n        return this.overlay_;\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    Modify.prototype.handleSourceAdd_ = function (event) {\n        if (event.feature) {\n            this.features_.push(event.feature);\n        }\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    Modify.prototype.handleSourceRemove_ = function (event) {\n        if (event.feature) {\n            this.features_.remove(event.feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureAdd_ = function (evt) {\n        this.addFeature_(/** @type {Feature} */ (evt.element));\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureChange_ = fu
 nction (evt) {\n        if (!this.changingFeature_) {\n            var feature = /** @type {Feature} */ (evt.target);\n            this.removeFeature_(feature);\n            this.addFeature_(feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureRemove_ = function (evt) {\n        var feature = /** @type {Feature} */ (evt.element);\n        this.removeFeature_(feature);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {Point} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writePointGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        /** @type {SegmentData} */\n        var segmentData = {\n            feature: feature,\n            geometry: geometry,\n            segment: [coordinates, coordinates],\n        };\n        this.rBush_.insert(geometry.getExtent(), segmentData
 );\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiPointGeometry_ = function (feature, geometry) {\n        var points = geometry.getCoordinates();\n        for (var i = 0, ii = points.length; i < ii; ++i) {\n            var coordinates = points[i];\n            /** @type {SegmentData} */\n            var segmentData = {\n                feature: feature,\n                geometry: geometry,\n                depth: [i],\n                index: i,\n                segment: [coordinates, coordinates],\n            };\n            this.rBush_.insert(geometry.getExtent(), segmentData);\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeLineStringGeometry_ = function (feature, geometry) {\n        
 var coordinates = geometry.getCoordinates();\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            /** @type {SegmentData} */\n            var segmentData = {\n                feature: feature,\n                geometry: geometry,\n                index: i,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiLineStringGeometry_ = function (feature, geometry) {\n        var lines = geometry.getCoordinates();\n        for (var j = 0, jj = lines.length; j < jj; ++j) {\n            var coordinates = lines[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(
 i, i + 2);\n                /** @type {SegmentData} */\n                var segmentData = {\n                    feature: feature,\n                    geometry: geometry,\n                    depth: [j],\n                    index: i,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writePolygonGeometry_ = function (feature, geometry) {\n        var rings = geometry.getCoordinates();\n        for (var j = 0, jj = rings.length; j < jj; ++j) {\n            var coordinates = rings[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                /** @type {SegmentData} */\n                var segmentData = {\n  
                   feature: feature,\n                    geometry: geometry,\n                    depth: [j],\n                    index: i,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiPolygonGeometry_ = function (feature, geometry) {\n        var polygons = geometry.getCoordinates();\n        for (var k = 0, kk = polygons.length; k < kk; ++k) {\n            var rings = polygons[k];\n            for (var j = 0, jj = rings.length; j < jj; ++j) {\n                var coordinates = rings[j];\n                for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                    var segment = coordinates.slice(i, i + 2);\n                    /** @type {SegmentData} */\n 
                    var segmentData = {\n                        feature: feature,\n                        geometry: geometry,\n                        depth: [j, k],\n                        index: i,\n                        segment: segment,\n                    };\n                    this.rBush_.insert(boundingExtent(segment), segmentData);\n                }\n            }\n        }\n    };\n    /**\n     * We convert a circle into two segments.  The segment at index\n     * {@link CIRCLE_CENTER_INDEX} is the\n     * circle's center (a point).  The segment at index\n     * {@link CIRCLE_CIRCUMFERENCE_INDEX} is\n     * the circumference, and is not a line segment.\n     *\n     * @param {Feature} feature Feature.\n     * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeCircleGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCenter();\n        /** @type {SegmentData} */\n      
   var centerSegmentData = {\n            feature: feature,\n            geometry: geometry,\n            index: CIRCLE_CENTER_INDEX,\n            segment: [coordinates, coordinates],\n        };\n        /** @type {SegmentData} */\n        var circumferenceSegmentData = {\n            feature: feature,\n            geometry: geometry,\n            index: CIRCLE_CIRCUMFERENCE_INDEX,\n            segment: [coordinates, coordinates],\n        };\n        var featureSegments = [centerSegmentData, circumferenceSegmentData];\n        centerSegmentData.featureSegments = featureSegments;\n        circumferenceSegmentData.featureSegments = featureSegments;\n        this.rBush_.insert(createExtent(coordinates), centerSegmentData);\n        var circleGeometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n        var userProjection = getUserProjection();\n        if (userProjection && this.getMap()) {\n            var projection = this.getMap().getView().getProjection();
 \n            circleGeometry = circleGeometry\n                .clone()\n                .transform(userProjection, projection);\n            circleGeometry = fromCircle(\n            /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)).transform(projection, userProjection);\n        }\n        this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeGeometryCollectionGeometry_ = function (feature, geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0; i < geometries.length; ++i) {\n            var geometry_1 = geometries[i];\n            var writer = this.SEGMENT_WRITERS_[geometry_1.getType()];\n            writer(feature, geometry_1);\n        }\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordina
 te} coordinates Coordinates.\n     * @return {Feature} Vertex feature.\n     * @private\n     */\n    Modify.prototype.createOrUpdateVertexFeature_ = function (coordinates) {\n        var vertexFeature = this.vertexFeature_;\n        if (!vertexFeature) {\n            vertexFeature = new Feature(new Point(coordinates));\n            this.vertexFeature_ = vertexFeature;\n            this.overlay_.getSource().addFeature(vertexFeature);\n        }\n        else {\n            var geometry = vertexFeature.getGeometry();\n            geometry.setCoordinates(coordinates);\n        }\n        return vertexFeature;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Modify.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.origi
 nalEvent) {\n            return true;\n        }\n        this.lastPointerEvent_ = mapBrowserEvent;\n        var handled;\n        if (!mapBrowserEvent.map.getView().getInteracting() &&\n            mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n            !this.handlingDownUpSequence) {\n            this.handlePointerMove_(mapBrowserEvent);\n        }\n        if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {\n            if (mapBrowserEvent.type != MapBrowserEventType.SINGLECLICK ||\n                !this.ignoreNextSingleClick_) {\n                handled = this.removePoint();\n            }\n            else {\n                handled = true;\n            }\n        }\n        if (mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK) {\n            this.ignoreNextSingleClick_ = false;\n        }\n        return _super.prototype.handleEvent.call(this, mapBrowserEvent) && !handled;\n    };\n    /**\n     * Handle pointer drag events.\n     * @par
 am {import(\"../MapBrowserEvent.js\").default} evt Event.\n     */\n    Modify.prototype.handleDragEvent = function (evt) {\n        this.ignoreNextSingleClick_ = false;\n        this.willModifyFeatures_(evt);\n        var vertex = evt.coordinate;\n        for (var i = 0, ii = this.dragSegments_.length; i < ii; ++i) {\n            var dragSegment = this.dragSegments_[i];\n            var segmentData = dragSegment[0];\n            var depth = segmentData.depth;\n            var geometry = segmentData.geometry;\n            var coordinates = void 0;\n            var segment = segmentData.segment;\n            var index = dragSegment[1];\n            while (vertex.length < geometry.getStride()) {\n                vertex.push(segment[index][vertex.length]);\n            }\n            switch (geometry.getType()) {\n                case GeometryType.POINT:\n                    coordinates = vertex;\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n     
                break;\n                case GeometryType.MULTI_POINT:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[segmentData.index] = vertex;\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    break;\n                case GeometryType.LINE_STRING:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.MULTI_LINE_STRING:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.POLYGON:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[0]][segmentData.index 
 + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.CIRCLE:\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    if (segmentData.index === CIRCLE_CENTER_INDEX) {\n                        this.changingFeature_ = true;\n                        geometry.setCenter(vertex);\n                        this.changingFeature_ = false;\n                    }\n                    else {\n                        // We're dragging the circle's circumference:\n                        this.changingFeature_ = true;\n                        var projection = evt.map.getView().getProjection();\n            
             var radius = coordinateDistance(fromUserCoordinate(geometry.getCenter(), projection), fromUserCoordinate(vertex, projection));\n                        var userProjection = getUserProjection();\n                        if (userProjection) {\n                            var circleGeometry = geometry\n                                .clone()\n                                .transform(userProjection, projection);\n                            circleGeometry.setRadius(radius);\n                            radius = circleGeometry\n                                .transform(projection, userProjection)\n                                .getRadius();\n                        }\n                        geometry.setRadius(radius);\n                        this.changingFeature_ = false;\n                    }\n                    break;\n                default:\n                // pass\n            }\n            if (coordinates) {\n                this.setGeometryCoordinates_(geom
 etry, coordinates);\n            }\n        }\n        this.createOrUpdateVertexFeature_(vertex);\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Modify.prototype.handleDownEvent = function (evt) {\n        if (!this.condition_(evt)) {\n            return false;\n        }\n        var pixelCoordinate = evt.coordinate;\n        this.handlePointerAtPixel_(evt.pixel, evt.map, pixelCoordinate);\n        this.dragSegments_.length = 0;\n        this.modified_ = false;\n        var vertexFeature = this.vertexFeature_;\n        if (vertexFeature) {\n            var projection = evt.map.getView().getProjection();\n            var insertVertices = [];\n            var vertex = vertexFeature.getGeometry().getCoordinates();\n            var vertexExtent = boundingExtent([vertex]);\n            var segmentDataMatches = this.rBush_.getInExtent(vertexExtent
 );\n            var componentSegments = {};\n            segmentDataMatches.sort(compareIndexes);\n            for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {\n                var segmentDataMatch = segmentDataMatches[i];\n                var segment = segmentDataMatch.segment;\n                var uid = getUid(segmentDataMatch.geometry);\n                var depth = segmentDataMatch.depth;\n                if (depth) {\n                    uid += '-' + depth.join('-'); // separate feature components\n                }\n                if (!componentSegments[uid]) {\n                    componentSegments[uid] = new Array(2);\n                }\n                if (segmentDataMatch.geometry.getType() === GeometryType.CIRCLE &&\n                    segmentDataMatch.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n                    var closestVertex = closestOnSegmentData(pixelCoordinate, segmentDataMatch, projection);\n                    if (coordinatesEqual(closestVertex, v
 ertex) &&\n                        !componentSegments[uid][0]) {\n                        this.dragSegments_.push([segmentDataMatch, 0]);\n                        componentSegments[uid][0] = segmentDataMatch;\n                    }\n                    continue;\n                }\n                if (coordinatesEqual(segment[0], vertex) &&\n                    !componentSegments[uid][0]) {\n                    this.dragSegments_.push([segmentDataMatch, 0]);\n                    componentSegments[uid][0] = segmentDataMatch;\n                    continue;\n                }\n                if (coordinatesEqual(segment[1], vertex) &&\n                    !componentSegments[uid][1]) {\n                    // prevent dragging closed linestrings by the connecting node\n                    if ((segmentDataMatch.geometry.getType() === GeometryType.LINE_STRING ||\n                        segmentDataMatch.geometry.getType() ===\n                            GeometryType.MULTI_LINE_STRING) &&
 \n                        componentSegments[uid][0] &&\n                        componentSegments[uid][0].index === 0) {\n                        continue;\n                    }\n                    this.dragSegments_.push([segmentDataMatch, 1]);\n                    componentSegments[uid][1] = segmentDataMatch;\n                    continue;\n                }\n                if (getUid(segment) in this.vertexSegments_ &&\n                    !componentSegments[uid][0] &&\n                    !componentSegments[uid][1] &&\n                    this.insertVertexCondition_(evt)) {\n                    insertVertices.push([segmentDataMatch, vertex]);\n                }\n            }\n            if (insertVertices.length) {\n                this.willModifyFeatures_(evt);\n            }\n            for (var j = insertVertices.length - 1; j >= 0; --j) {\n                this.insertVertex_.apply(this, insertVertices[j]);\n            }\n        }\n        return !!this.vertexFeature_;
 \n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Modify.prototype.handleUpEvent = function (evt) {\n        for (var i = this.dragSegments_.length - 1; i >= 0; --i) {\n            var segmentData = this.dragSegments_[i][0];\n            var geometry = segmentData.geometry;\n            if (geometry.getType() === GeometryType.CIRCLE) {\n                // Update a circle object in the R* bush:\n                var coordinates = geometry.getCenter();\n                var centerSegmentData = segmentData.featureSegments[0];\n                var circumferenceSegmentData = segmentData.featureSegments[1];\n                centerSegmentData.segment[0] = coordinates;\n                centerSegmentData.segment[1] = coordinates;\n                circumferenceSegmentData.segment[0] = coordinates;\n                circumferenceSegmentData.segment[1] = coordi
 nates;\n                this.rBush_.update(createExtent(coordinates), centerSegmentData);\n                var circleGeometry = geometry;\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    var projection = evt.map.getView().getProjection();\n                    circleGeometry = circleGeometry\n                        .clone()\n                        .transform(userProjection, projection);\n                    circleGeometry = fromCircle(circleGeometry).transform(projection, userProjection);\n                }\n                this.rBush_.update(circleGeometry.getExtent(), circumferenceSegmentData);\n            }\n            else {\n                this.rBush_.update(boundingExtent(segmentData.segment), segmentData);\n            }\n        }\n        if (this.modified_) {\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));\n            this.modified_ = false;\n       
  }\n        return false;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @private\n     */\n    Modify.prototype.handlePointerMove_ = function (evt) {\n        this.lastPixel_ = evt.pixel;\n        this.handlePointerAtPixel_(evt.pixel, evt.map, evt.coordinate);\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_coordinate The pixel Coordinate.\n     * @private\n     */\n    Modify.prototype.handlePointerAtPixel_ = function (pixel, map, opt_coordinate) {\n        var pixelCoordinate = opt_coordinate || map.getCoordinateFromPixel(pixel);\n        var projection = map.getView().getProjection();\n        var sortByDistance = function (a, b) {\n            return (projectedDistanceToSegmentDataSquared(pixelCoordinate, a, projection) -\n                projectedDistanceToSegmentDataSquared(pi
 xelCoordinate, b, projection));\n        };\n        var viewExtent = fromUserExtent(createExtent(pixelCoordinate, tempExtent), projection);\n        var buffer = map.getView().getResolution() * this.pixelTolerance_;\n        var box = toUserExtent(bufferExtent(viewExtent, buffer, tempExtent), projection);\n        var rBush = this.rBush_;\n        var nodes = rBush.getInExtent(box);\n        if (nodes.length > 0) {\n            nodes.sort(sortByDistance);\n            var node = nodes[0];\n            var closestSegment = node.segment;\n            var vertex = closestOnSegmentData(pixelCoordinate, node, projection);\n            var vertexPixel = map.getPixelFromCoordinate(vertex);\n            var dist = coordinateDistance(pixel, vertexPixel);\n            if (dist <= this.pixelTolerance_) {\n                /** @type {Object<string, boolean>} */\n                var vertexSegments = {};\n                if (node.geometry.getType() === GeometryType.CIRCLE &&\n                    
 node.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n                    this.snappedToVertex_ = true;\n                    this.createOrUpdateVertexFeature_(vertex);\n                }\n                else {\n                    var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n                    var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n                    var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                    var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                    dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                    this.snappedToVertex_ = dist <= this.pixelTolerance_;\n                    if (this.snappedToVertex_) {\n                        vertex =\n                            squaredDist1 > squaredDist2\n                                ? closestSegment[1]\n                                : closestSegment[0];\n                    }\n                    this.createO
 rUpdateVertexFeature_(vertex);\n                    for (var i = 1, ii = nodes.length; i < ii; ++i) {\n                        var segment = nodes[i].segment;\n                        if ((coordinatesEqual(closestSegment[0], segment[0]) &&\n                            coordinatesEqual(closestSegment[1], segment[1])) ||\n                            (coordinatesEqual(closestSegment[0], segment[1]) &&\n                                coordinatesEqual(closestSegment[1], segment[0]))) {\n                            vertexSegments[getUid(segment)] = true;\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                }\n                vertexSegments[getUid(closestSegment)] = true;\n                this.vertexSegments_ = vertexSegments;\n                return;\n            }\n        }\n        if (this.vertexFeature_) {\n            this.overlay_.getSource().removeFeature(this.vertexFeatur
 e_);\n            this.vertexFeature_ = null;\n        }\n    };\n    /**\n     * @param {SegmentData} segmentData Segment data.\n     * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n     * @private\n     */\n    Modify.prototype.insertVertex_ = function (segmentData, vertex) {\n        var segment = segmentData.segment;\n        var feature = segmentData.feature;\n        var geometry = segmentData.geometry;\n        var depth = segmentData.depth;\n        var index = segmentData.index;\n        var coordinates;\n        while (vertex.length < geometry.getStride()) {\n            vertex.push(0);\n        }\n        switch (geometry.getType()) {\n            case GeometryType.MULTI_LINE_STRING:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.POLYGON:\n                coordinates = geometry.getCoordinates();\n                coordina
 tes[depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.MULTI_POLYGON:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.LINE_STRING:\n                coordinates = geometry.getCoordinates();\n                coordinates.splice(index + 1, 0, vertex);\n                break;\n            default:\n                return;\n        }\n        this.setGeometryCoordinates_(geometry, coordinates);\n        var rTree = this.rBush_;\n        rTree.remove(segmentData);\n        this.updateSegmentIndices_(geometry, index, depth, 1);\n        /** @type {SegmentData} */\n        var newSegmentData = {\n            segment: [segment[0], vertex],\n            feature: feature,\n            geometry: geometry,\n            depth: depth,\n            index: index,\n        };\n        rTree.insert(boundingExtent(newS
 egmentData.segment), newSegmentData);\n        this.dragSegments_.push([newSegmentData, 1]);\n        /** @type {SegmentData} */\n        var newSegmentData2 = {\n            segment: [vertex, segment[1]],\n            feature: feature,\n            geometry: geometry,\n            depth: depth,\n            index: index + 1,\n        };\n        rTree.insert(boundingExtent(newSegmentData2.segment), newSegmentData2);\n        this.dragSegments_.push([newSegmentData2, 0]);\n        this.ignoreNextSingleClick_ = true;\n    };\n    /**\n     * Removes the vertex currently being pointed.\n     * @return {boolean} True when a vertex was removed.\n     * @api\n     */\n    Modify.prototype.removePoint = function () {\n        if (this.lastPointerEvent_ &&\n            this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG) {\n            var evt = this.lastPointerEvent_;\n            this.willModifyFeatures_(evt);\n            var removed = this.removeVertex_();\n            this.
 dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));\n            this.modified_ = false;\n            return removed;\n        }\n        return false;\n    };\n    /**\n     * Removes a vertex from all matching features.\n     * @return {boolean} True when a vertex was removed.\n     * @private\n     */\n    Modify.prototype.removeVertex_ = function () {\n        var dragSegments = this.dragSegments_;\n        var segmentsByFeature = {};\n        var deleted = false;\n        var component, coordinates, dragSegment, geometry, i, index, left;\n        var newIndex, right, segmentData, uid;\n        for (i = dragSegments.length - 1; i >= 0; --i) {\n            dragSegment = dragSegments[i];\n            segmentData = dragSegment[0];\n            uid = getUid(segmentData.feature);\n            if (segmentData.depth) {\n                // separate feature components\n                uid += '-' + segmentData.depth.join('-');\n            }\n            if (!(
 uid in segmentsByFeature)) {\n                segmentsByFeature[uid] = {};\n            }\n            if (dragSegment[1] === 0) {\n                segmentsByFeature[uid].right = segmentData;\n                segmentsByFeature[uid].index = segmentData.index;\n            }\n            else if (dragSegment[1] == 1) {\n                segmentsByFeature[uid].left = segmentData;\n                segmentsByFeature[uid].index = segmentData.index + 1;\n            }\n        }\n        for (uid in segmentsByFeature) {\n            right = segmentsByFeature[uid].right;\n            left = segmentsByFeature[uid].left;\n            index = segmentsByFeature[uid].index;\n            newIndex = index - 1;\n            if (left !== undefined) {\n                segmentData = left;\n            }\n            else {\n                segmentData = right;\n            }\n            if (newIndex < 0) {\n                newIndex = 0;\n            }\n            geometry = segmentData.geometry;\n   
          coordinates = geometry.getCoordinates();\n            component = coordinates;\n            deleted = false;\n            switch (geometry.getType()) {\n                case GeometryType.MULTI_LINE_STRING:\n                    if (coordinates[segmentData.depth[0]].length > 2) {\n                        coordinates[segmentData.depth[0]].splice(index, 1);\n                        deleted = true;\n                    }\n                    break;\n                case GeometryType.LINE_STRING:\n                    if (coordinates.length > 2) {\n                        coordinates.splice(index, 1);\n                        deleted = true;\n                    }\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    component = component[segmentData.depth[1]];\n                /* falls through */\n                case GeometryType.POLYGON:\n                    component = component[segmentData.depth[0]];\n                    if (compon
 ent.length > 4) {\n                        if (index == component.length - 1) {\n                            index = 0;\n                        }\n                        component.splice(index, 1);\n                        deleted = true;\n                        if (index === 0) {\n                            // close the ring again\n                            component.pop();\n                            component.push(component[0]);\n                            newIndex = component.length - 1;\n                        }\n                    }\n                    break;\n                default:\n                // pass\n            }\n            if (deleted) {\n                this.setGeometryCoordinates_(geometry, coordinates);\n                var segments = [];\n                if (left !== undefined) {\n                    this.rBush_.remove(left);\n                    segments.push(left.segment[0]);\n                }\n                if (right !== undefined) {\n       
              this.rBush_.remove(right);\n                    segments.push(right.segment[1]);\n                }\n                if (left !== undefined && right !== undefined) {\n                    /** @type {SegmentData} */\n                    var newSegmentData = {\n                        depth: segmentData.depth,\n                        feature: segmentData.feature,\n                        geometry: segmentData.geometry,\n                        index: newIndex,\n                        segment: segments,\n                    };\n                    this.rBush_.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n                }\n                this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);\n                if (this.vertexFeature_) {\n                    this.overlay_.getSource().removeFeature(this.vertexFeature_);\n                    this.vertexFeature_ = null;\n                }\n                dragSegments.length = 0;\n            }\
 n        }\n        return deleted;\n    };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {Array} coordinates Coordinates.\n     * @private\n     */\n    Modify.prototype.setGeometryCoordinates_ = function (geometry, coordinates) {\n        this.changingFeature_ = true;\n        geometry.setCoordinates(coordinates);\n        this.changingFeature_ = false;\n    };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {number} index Index.\n     * @param {Array<number>|undefined} depth Depth.\n     * @param {number} delta Delta (1 or -1).\n     * @private\n     */\n    Modify.prototype.updateSegmentIndices_ = function (geometry, index, depth, delta) {\n        this.rBush_.forEachInExtent(geometry.getExtent(), function (segmentDataMatch) {\n            if (segmentDataMatch.geometry === geometry &&\n                (depth === undefined ||\n                    segmentDataMatch.
 depth === undefined ||\n                    equals(segmentDataMatch.depth, depth)) &&\n                segmentDataMatch.index > index) {\n                segmentDataMatch.index += delta;\n            }\n        });\n    };\n    return Modify;\n}(PointerInteraction));\n/**\n * @param {SegmentData} a The first segment data.\n * @param {SegmentData} b The second segment data.\n * @return {number} The difference in indexes.\n */\nfunction compareIndexes(a, b) {\n    return a.index - b.index;\n}\n/**\n * Returns the distance from a point to a line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The coordinates of the point from\n *        which to calculate the distance.\n * @param {SegmentData} segmentData The object describing the line\n *        segment we are calculating the distance to.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {number} The square of the distance between a point and a line se
 gment.\n */\nfunction projectedDistanceToSegmentDataSquared(pointCoordinates, segmentData, projection) {\n    var geometry = segmentData.geometry;\n    if (geometry.getType() === GeometryType.CIRCLE) {\n        var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n        if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n            var userProjection = getUserProjection();\n            if (userProjection) {\n                circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n                    .clone()\n                    .transform(userProjection, projection));\n            }\n            var distanceToCenterSquared = squaredCoordinateDistance(circleGeometry.getCenter(), fromUserCoordinate(pointCoordinates, projection));\n            var distanceToCircumference = Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();\n            return distanceToCircumference * distanceToCircumference;\n       
  }\n    }\n    var coordinate = fromUserCoordinate(pointCoordinates, projection);\n    tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n    tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n    return squaredDistanceToSegment(coordinate, tempSegment);\n}\n/**\n * Returns the point closest to a given line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The point to which a closest point\n *        should be found.\n * @param {SegmentData} segmentData The object describing the line\n *        segment which should contain the closest point.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../coordinate.js\").Coordinate} The point closest to the specified line segment.\n */\nfunction closestOnSegmentData(pointCoordinates, segmentData, projection) {\n    var geometry = segmentData.geometry;\n    if (geometry.getType() === GeometryType.CIRCLE &&\n
         segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n        var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n                .clone()\n                .transform(userProjection, projection));\n        }\n        return toUserCoordinate(circleGeometry.getClosestPoint(fromUserCoordinate(pointCoordinates, projection)), projection);\n    }\n    var coordinate = fromUserCoordinate(pointCoordinates, projection);\n    tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n    tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n    return toUserCoordinate(closestOnSegment(coordinate, tempSegment), projection);\n}\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n
     var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POINT];\n    };\n}\nexport default Modify;\n//# sourceMappingURL=Modify.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Select\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport G
 eometryType from '../geom/GeometryType.js';\nimport Interaction from './Interaction.js';\nimport { TRUE } from '../functions.js';\nimport { clear } from '../obj.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { extend, includes } from '../array.js';\nimport { getUid } from '../util.js';\nimport { never, shiftKeyOnly, singleClick } from '../events/condition.js';\n/**\n * @enum {string}\n */\nvar SelectEventType = {\n    /**\n     * Triggered when feature(s) has been (de)selected.\n     * @event SelectEvent#select\n     * @api\n     */\n    SELECT: 'select',\n};\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"..
 /events/condition.js\").Condition} [addCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is the event\n * for the selected features as a whole. By default, this is\n * {@link module:ol/events/condition~singleClick}. Clicking on a feature selects that\n * feature and removes any that were in the selection. Clicking outside any\n * feature removes all from the selection.\n * See `toggle`, `add`, `remove` options for adding/removing extra features to/\n * from the selection.\n * @property {A
 rray<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers]\n * A list of layers from which features should be selected. Alternatively, a\n * filter function can be provided. The function will be called for each layer\n * in the map and should return `true` for layers that you want to be\n * selectable. If the option is absent, all visible layers will be considered\n * selectable.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style]\n * Style for the selected features. By default the default edit style is used\n * (see {@link module:ol/style}). Set to `null` if this interaction should not apply\n * any style changes for selected features.\n * If set to a falsey value, the selected feature's style will not change.\n * @property {import(\"../events/condition.js\").Condition} [removeCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether tha
 t event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [toggleCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is in addition\n * to the `condition` event. By default,\n * {@link module:ol/events/condition~shiftKeyOnly}, i.e. pressing `shift` as\n * well as the `condition` event, adds that feature to the current selection if\n * it is not currently selected, and removes it if it is. See `add` and `remove`\n * if you want to use different events instead of a toggle.\n * @property {boolean} [multi=false] A boolean that determines if the default\n * behaviour should select only single features or all (overlapping) features at\n * the clicked map position. The default of `false` mea
 ns single select.\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features]\n * Collection where the interaction will place selected features. Optional. If\n * not set the interaction will create a collection. In any case the collection\n * used by the interaction is returned by\n * {@link module:ol/interaction/Select~Select#getFeatures}.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside\n * the radius around the given position will be checked for features.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Select~Select} instances are instances of\n * this type.\n */\nvar SelectEvent = /** @class */ (function (_super) {\n    __extends(SelectEvent, _super);\n    /**\n     * @param 
 {SelectEventType} type The event type.\n     * @param {Array<import(\"../Feature.js\").default>} selected Selected features.\n     * @param {Array<import(\"../Feature.js\").default>} deselected Deselected features.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Associated\n     *     {@link module:ol/MapBrowserEvent}.\n     */\n    function SelectEvent(type, selected, deselected, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * Selected features array.\n         * @type {Array<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.selected = selected;\n        /**\n         * Deselected features array.\n         * @type {Array<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.deselected = deselected;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n  
        */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return SelectEvent;\n}(Event));\n/**\n * Original feature styles to reset to when features are no longer selected.\n * @type {Object.<number, import(\"../style/Style.js\").default|Array.<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction>}\n */\nvar originalFeatureStyles = {};\n/**\n * @classdesc\n * Interaction for selecting vector features. By default, selected features are\n * styled differently, so this interaction can be used for visual highlighting,\n * as well as selecting features for other actions, such as modification or\n * output. There are three ways of controlling which features are selected:\n * using the browser event as defined by the `condition` and optionally the\n * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a\n * further feature filter using the `filter` option.\n *\n * Selected features are added to an interna
 l unmanaged layer.\n *\n * @fires SelectEvent\n * @api\n */\nvar Select = /** @class */ (function (_super) {\n    __extends(Select, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Select(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         */\n        _this.boundAddFeature_ = _this.addFeature_.bind(_this);\n        /**\n         * @private\n         */\n        _this.boundRemoveFeature_ = _this.removeFeature_.bind(_this);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : singleClick;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.addCondition_ = options.addCondition ? options.addCondition : never;\n        /**\n         * @private
 \n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.removeCondition_ = options.removeCondition\n            ? options.removeCondition\n            : never;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.toggleCondition_ = options.toggleCondition\n            ? options.toggleCondition\n            : shiftKeyOnly;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multi_ = options.multi ? options.multi : false;\n        /**\n         * @private\n         * @type {FilterFunction}\n         */\n        _this.filter_ = options.filter ? options.filter : TRUE;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n        /**\n         * @private\n         * @type {import(\"../style/Style.js\").default|Array.<import(\"../style/Style.
 js\").default>|import(\"../style/Style.js\").StyleFunction|null}\n         */\n        _this.style_ =\n            options.style !== undefined ? options.style : getDefaultStyleFunction();\n        /**\n         * @private\n         * @type {import(\"../Collection.js\").default}\n         */\n        _this.features_ = options.features || new Collection();\n        /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n        var layerFilter;\n        if (options.layers) {\n            if (typeof options.layers === 'function') {\n                layerFilter = options.layers;\n            }\n            else {\n                var layers_1 = options.layers;\n                layerFilter = function (layer) {\n                    return includes(layers_1, layer);\n                };\n            }\n        }\n        else {\n            layerFilter = TRUE;\n        }\n        /**\n         * @private\n         * @type {function(import(\"../layer/Layer.js\").default): bo
 olean}\n         */\n        _this.layerFilter_ = layerFilter;\n        /**\n         * An association between selected feature (key)\n         * and layer (value)\n         * @private\n         * @type {Object<string, import(\"../layer/Layer.js\").default>}\n         */\n        _this.featureLayerAssociation_ = {};\n        return _this;\n    }\n    /**\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../layer/Layer.js\").default} layer Layer.\n     * @private\n     */\n    Select.prototype.addFeatureLayerAssociation_ = function (feature, layer) {\n        this.featureLayerAssociation_[getUid(feature)] = layer;\n    };\n    /**\n     * Get the selected features.\n     * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} Features collection.\n     * @api\n     */\n    Select.prototype.getFeatures = function () {\n        return this.features_;\n    };\n    /**\n     * Returns the Hit-detection tolerance.\
 n     * @returns {number} Hit tolerance in pixels.\n     * @api\n     */\n    Select.prototype.getHitTolerance = function () {\n        return this.hitTolerance_;\n    };\n    /**\n     * Returns the associated {@link module:ol/layer/Vector~Vector vectorlayer} of\n     * the (last) selected feature. Note that this will not work with any\n     * programmatic method like pushing features to\n     * {@link module:ol/interaction/Select~Select#getFeatures collection}.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature\n     * @return {import('../layer/Vector.js').default} Layer.\n     * @api\n     */\n    Select.prototype.getLayer = function (feature) {\n        return /** @type {import('../layer/Vector.js').default} */ (this\n            .featureLayerAssociation_[getUid(feature)]);\n    };\n    /**\n     * Hit-detection tolerance. Pixels inside the radius around the given position\n     * will be checked for features.\n     * @param {number} hitTolerance Hit toleranc
 e in pixels.\n     * @api\n     */\n    Select.prototype.setHitTolerance = function (hitTolerance) {\n        this.hitTolerance_ = hitTolerance;\n    };\n    /**\n     * Remove the interaction from its current map, if any,  and attach it to a new\n     * map, if any. Pass `null` to just remove the interaction from the current map.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Select.prototype.setMap = function (map) {\n        var currentMap = this.getMap();\n        if (currentMap && this.style_) {\n            this.features_.forEach(this.restorePreviousStyle_.bind(this));\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            this.features_.addEventListener(CollectionEventType.ADD, this.boundAddFeature_);\n            this.features_.addEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_);\n            if (this.style_) {\n                this.features_.forEach(this.applySelectedStyle
 _.bind(this));\n            }\n        }\n        else {\n            this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_);\n            this.features_.removeEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Select.prototype.addFeature_ = function (evt) {\n        var feature = evt.element;\n        if (this.style_) {\n            this.applySelectedStyle_(feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Select.prototype.removeFeature_ = function (evt) {\n        var feature = evt.element;\n        if (this.style_) {\n            this.restorePreviousStyle_(feature);\n        }\n    };\n    /**\n     * @return {import(\"../style/Style.js\").StyleLike|null} Select style.\n     */\n    Select.prototype.getStyle = func
 tion () {\n        return this.style_;\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Select.prototype.applySelectedStyle_ = function (feature) {\n        var key = getUid(feature);\n        if (!(key in originalFeatureStyles)) {\n            originalFeatureStyles[key] = feature.getStyle();\n        }\n        feature.setStyle(this.style_);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Select.prototype.restorePreviousStyle_ = function (feature) {\n        var key = getUid(feature);\n        var selectInteractions = /** @type {Array<Select>} */ (this.getMap()\n            .getInteractions()\n            .getArray()\n            .filter(function (interaction) {\n            return (interaction instanceof Select &&\n                interaction.getStyle() &&\n                interaction.getFeatures().getArray().indexOf(feature) !== -1);\n        }));\n
         if (selectInteractions.length > 0) {\n            feature.setStyle(selectInteractions[selectInteractions.length - 1].getStyle());\n        }\n        else {\n            feature.setStyle(originalFeatureStyles[key]);\n            delete originalFeatureStyles[key];\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @private\n     */\n    Select.prototype.removeFeatureLayerAssociation_ = function (feature) {\n        delete this.featureLayerAssociation_[getUid(feature)];\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may change the\n     * selected state of features.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {Select}\n     */\n    Select.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!this.condition_(mapBrowserEvent)) {\n            
 return true;\n        }\n        var add = this.addCondition_(mapBrowserEvent);\n        var remove = this.removeCondition_(mapBrowserEvent);\n        var toggle = this.toggleCondition_(mapBrowserEvent);\n        var set = !add && !remove && !toggle;\n        var map = mapBrowserEvent.map;\n        var features = this.getFeatures();\n        var deselected = [];\n        var selected = [];\n        if (set) {\n            // Replace the currently selected feature(s) with the feature(s) at the\n            // pixel, or clear the selected feature(s) if there is no feature at\n            // the pixel.\n            clear(this.featureLayerAssociation_);\n            map.forEachFeatureAtPixel(mapBrowserEvent.pixel, \n            /**\n             * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n             * @param {import(\"../layer/Layer.js\").default} layer Layer.\n             * @return {boolean|undefined} Continue to iterate over the features.\n             */\n  
           function (feature, layer) {\n                if (this.filter_(feature, layer)) {\n                    selected.push(feature);\n                    this.addFeatureLayerAssociation_(feature, layer);\n                    return !this.multi_;\n                }\n            }.bind(this), {\n                layerFilter: this.layerFilter_,\n                hitTolerance: this.hitTolerance_,\n            });\n            for (var i = features.getLength() - 1; i >= 0; --i) {\n                var feature = features.item(i);\n                var index = selected.indexOf(feature);\n                if (index > -1) {\n                    // feature is already selected\n                    selected.splice(index, 1);\n                }\n                else {\n                    features.remove(feature);\n                    deselected.push(feature);\n                }\n            }\n            if (selected.length !== 0) {\n                features.extend(selected);\n            }\n   
      }\n        else {\n            // Modify the currently selected feature(s).\n            map.forEachFeatureAtPixel(mapBrowserEvent.pixel, \n            /**\n             * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n             * @param {import(\"../layer/Layer.js\").default} layer Layer.\n             * @return {boolean|undefined} Continue to iterate over the features.\n             */\n            function (feature, layer) {\n                if (this.filter_(feature, layer)) {\n                    if ((add || toggle) && !includes(features.getArray(), feature)) {\n                        selected.push(feature);\n                        this.addFeatureLayerAssociation_(feature, layer);\n                    }\n                    else if ((remove || toggle) &&\n                        includes(features.getArray(), feature)) {\n                        deselected.push(feature);\n                        this.removeFeatureLayerAssociation_(feature);\n          
           }\n                    return !this.multi_;\n                }\n            }.bind(this), {\n                layerFilter: this.layerFilter_,\n                hitTolerance: this.hitTolerance_,\n            });\n            for (var j = deselected.length - 1; j >= 0; --j) {\n                features.remove(deselected[j]);\n            }\n            features.extend(selected);\n        }\n        if (selected.length > 0 || deselected.length > 0) {\n            this.dispatchEvent(new SelectEvent(SelectEventType.SELECT, selected, deselected, mapBrowserEvent));\n        }\n        return true;\n    };\n    return Select;\n}(Interaction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var styles = createEditingStyle();\n    extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);\n    extend(styles[GeometryType.GEOMETRY_COLLECTION], styles[GeometryType.LINE_STRING]);\n    return function (feat
 ure) {\n        if (!feature.getGeometry()) {\n            return null;\n        }\n        return styles[feature.getGeometry().getType()];\n    };\n}\nexport default Select;\n//# sourceMappingURL=Select.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Snap\n */\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport GeometryType from '../geo
 m/GeometryType.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { boundingExtent, createEmpty } from '../extent.js';\nimport { closestOnCircle, closestOnSegment, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { fromCircle } from '../geom/Polygon.js';\nimport { fromUserCoordinate, getUserProjection, toUserCoordinate, } from '../proj.js';\nimport { getUid } from '../util.js';\nimport { getValues } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Result\n * @property {boolean} snapped\n * @property {import(\"../coordinate.js\").Coordinate|null} vertex\n * @property {import(\"../pixel.js\").Pixel|null} vertexPixel\n */\n/**\n * @typedef {Object} SegmentData\n * @property {import(\"../Fe
 ature.js\").default} feature\n * @property {Array<import(\"../coordinate.js\").Coordinate>} segment\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features] Snap to these features. Either this option or source should be provided.\n * @property {boolean} [edge=true] Snap to edges.\n * @property {boolean} [vertex=true] Snap to vertices.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or\n * vertex for snapping.\n * @property {import(\"../source/Vector.js\").default} [source] Snap to features from this source. Either this option or features should be provided\n */\n/**\n * @param  {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @return {import(\"../Feature.js\").default} Feature.\n */\nfunction getFeatureFromEvent(evt) {\n    if (\n    /** @type {import(\"../source/Vector.js\").
 VectorSourceEvent} */ (evt).feature) {\n        return /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt)\n            .feature;\n    }\n    else if (\n    /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element) {\n        return /** @type {import(\"../Feature.js\").default} */ (\n        /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element);\n    }\n}\nvar tempSegment = [];\n/**\n * @classdesc\n * Handles snapping of vector features while modifying or drawing them.  The\n * features can come from a {@link module:ol/source/Vector} or {@link module:ol/Collection~Collection}\n * Any interaction object that allows the user to interact\n * with the features using the mouse can benefit from the snapping, as long\n * as it is added before.\n *\n * The snap interaction modifies map browser event `coordinate` and `pixel`\n * properties to force the snap to occur to any interaction that them.\n *\n * Example:\n *\n *     import Snap
  from 'ol/interaction/Snap';\n *\n *     const snap = new Snap({\n *       source: source\n *     });\n *\n *     map.addInteraction(snap);\n *\n * @api\n */\nvar Snap = /** @class */ (function (_super) {\n    __extends(Snap, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Snap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.handleDownEvent) {\n            pointerOptions.handleDownEvent = TRUE;\n        }\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @type {import(\"../source/Vector.js\").default}\n         * @private\n         */\n        _this.source_ = options.source ? options.source : null;\n        /**\n         * @private\n         * @type
  {boolean}\n         */\n        _this.vertex_ = options.vertex !== undefined ? options.vertex : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.edge_ = options.edge !== undefined ? options.edge : true;\n        /**\n         * @type {import(\"../Collection.js\").default<import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.features_ = options.features ? options.features : null;\n        /**\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.featuresListenerKeys_ = [];\n        /**\n         * @type {Object<string, import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.featureChangeListenerKeys_ = {};\n        /**\n         * Extents are preserved so indexed segment can be quickly removed\n         * when its feature geometry changes\n         * @type {Object<string, import(\"../extent.js\").Extent>}\n         * @pr
 ivate\n         */\n        _this.indexedFeaturesExtents_ = {};\n        /**\n         * If a feature geometry changes while a pointer drag|move event occurs, the\n         * feature doesn't get updated right away.  It will be at the next 'pointerup'\n         * event fired.\n         * @type {!Object<string, import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.pendingFeatures_ = {};\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * Segment RTree for each layer\n         * @type {import(\"../structs/RBush.js\").default<SegmentData>}\n         * @private\n         */\n        _this.rBush_ = new RBush();\n        /**\n         * @const\n         * @private\n         * @type {Object<string, function(import(\"../Feature.js\").default, import(\"../geom/Geometry.js\").default): void>}\n         */
 \n        _this.SEGMENT_WRITERS_ = {\n            'Point': _this.writePointGeometry_.bind(_this),\n            'LineString': _this.writeLineStringGeometry_.bind(_this),\n            'LinearRing': _this.writeLineStringGeometry_.bind(_this),\n            'Polygon': _this.writePolygonGeometry_.bind(_this),\n            'MultiPoint': _this.writeMultiPointGeometry_.bind(_this),\n            'MultiLineString': _this.writeMultiLineStringGeometry_.bind(_this),\n            'MultiPolygon': _this.writeMultiPolygonGeometry_.bind(_this),\n            'GeometryCollection': _this.writeGeometryCollectionGeometry_.bind(_this),\n            'Circle': _this.writeCircleGeometry_.bind(_this),\n        };\n        return _this;\n    }\n    /**\n     * Add a feature to the collection of features that we may snap to.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {boolean=} opt_listen Whether to listen to the feature change or not\n     *     Defaults to `true`.\n     *
  @api\n     */\n    Snap.prototype.addFeature = function (feature, opt_listen) {\n        var register = opt_listen !== undefined ? opt_listen : true;\n        var feature_uid = getUid(feature);\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];\n            if (segmentWriter) {\n                this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(createEmpty());\n                segmentWriter(feature, geometry);\n            }\n        }\n        if (register) {\n            this.featureChangeListenerKeys_[feature_uid] = listen(feature, EventType.CHANGE, this.handleFeatureChange_, this);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @private\n     */\n    Snap.prototype.forEachFeatureAdd_ = function (feature) {\n        this.addFeature(feature);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature
  Feature.\n     * @private\n     */\n    Snap.prototype.forEachFeatureRemove_ = function (feature) {\n        this.removeFeature(feature);\n    };\n    /**\n     * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} Features.\n     * @private\n     */\n    Snap.prototype.getFeatures_ = function () {\n        var features;\n        if (this.features_) {\n            features = this.features_;\n        }\n        else if (this.source_) {\n            features = this.source_.getFeatures();\n        }\n        return features;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Snap.prototype.handleEvent = function (evt) {\n        var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);\n        if (result.snapped) {\n            evt.coordinate = result.vertex.slice(0, 2);\n            evt.p
 ixel = result.vertexPixel;\n        }\n        return _super.prototype.handleEvent.call(this, evt);\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureAdd_ = function (evt) {\n        var feature = getFeatureFromEvent(evt);\n        this.addFeature(feature);\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureRemove_ = function (evt) {\n        var feature = getFeatureFromEvent(evt);\n        this.removeFeature(feature);\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureChange_ = function (evt) {\n        var feature = /** @type {import(\"../Feature.js\").default} */ (evt.target);\n        if (this.han
 dlingDownUpSequence) {\n            var uid = getUid(feature);\n            if (!(uid in this.pendingFeatures_)) {\n                this.pendingFeatures_[uid] = feature;\n            }\n        }\n        else {\n            this.updateFeature_(feature);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Snap.prototype.handleUpEvent = function (evt) {\n        var featuresToUpdate = getValues(this.pendingFeatures_);\n        if (featuresToUpdate.length) {\n            featuresToUpdate.forEach(this.updateFeature_.bind(this));\n            this.pendingFeatures_ = {};\n        }\n        return false;\n    };\n    /**\n     * Remove a feature from the collection of features that we may snap to.\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {boolean=} opt_unlisten Whether to unlisten to the feature change\
 n     *     or not. Defaults to `true`.\n     * @api\n     */\n    Snap.prototype.removeFeature = function (feature, opt_unlisten) {\n        var unregister = opt_unlisten !== undefined ? opt_unlisten : true;\n        var feature_uid = getUid(feature);\n        var extent = this.indexedFeaturesExtents_[feature_uid];\n        if (extent) {\n            var rBush = this.rBush_;\n            var nodesToRemove_1 = [];\n            rBush.forEachInExtent(extent, function (node) {\n                if (feature === node.feature) {\n                    nodesToRemove_1.push(node);\n                }\n            });\n            for (var i = nodesToRemove_1.length - 1; i >= 0; --i) {\n                rBush.remove(nodesToRemove_1[i]);\n            }\n        }\n        if (unregister) {\n            unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n            delete this.featureChangeListenerKeys_[feature_uid];\n        }\n    };\n    /**\n     * Remove the interaction from its cur
 rent map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Snap.prototype.setMap = function (map) {\n        var currentMap = this.getMap();\n        var keys = this.featuresListenerKeys_;\n        var features = /** @type {Array<import(\"../Feature.js\").default>} */ (this.getFeatures_());\n        if (currentMap) {\n            keys.forEach(unlistenByKey);\n            keys.length = 0;\n            features.forEach(this.forEachFeatureRemove_.bind(this));\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            if (this.features_) {\n                keys.push(listen(this.features_, CollectionEventType.ADD, this.handleFeatureAdd_, this), listen(this.features_, CollectionEventType.REMOVE, this.handleFeatureRemove_, this));\n            }\n            else if (this.source_) {\n               
  keys.push(listen(this.source_, VectorEventType.ADDFEATURE, this.handleFeatureAdd_, this), listen(this.source_, VectorEventType.REMOVEFEATURE, this.handleFeatureRemove_, this));\n            }\n            features.forEach(this.forEachFeatureAdd_.bind(this));\n        }\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n     * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Coordinate\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @return {Result} Snap result\n     */\n    Snap.prototype.snapTo = function (pixel, pixelCoordinate, map) {\n        var lowerLeft = map.getCoordinateFromPixel([\n            pixel[0] - this.pixelTolerance_,\n            pixel[1] + this.pixelTolerance_,\n        ]);\n        var upperRight = map.getCoordinateFromPixel([\n            pixel[0] + this.pixelTolerance_,\n            pixel[1] - this.pixelTolerance_,\n        ]);\n        var box = boundingExtent([lowerLeft, upperRight]);\n     
    var segments = this.rBush_.getInExtent(box);\n        // If snapping on vertices only, don't consider circles\n        if (this.vertex_ && !this.edge_) {\n            segments = segments.filter(function (segment) {\n                return segment.feature.getGeometry().getType() !== GeometryType.CIRCLE;\n            });\n        }\n        var snapped = false;\n        var vertex = null;\n        var vertexPixel = null;\n        if (segments.length === 0) {\n            return {\n                snapped: snapped,\n                vertex: vertex,\n                vertexPixel: vertexPixel,\n            };\n        }\n        var projection = map.getView().getProjection();\n        var projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);\n        var closestSegmentData;\n        var minSquaredDistance = Infinity;\n        for (var i = 0; i < segments.length; ++i) {\n            var segmentData = segments[i];\n            tempSegment[0] = fromUserCoordinate(segmentDa
 ta.segment[0], projection);\n            tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n            var delta = squaredDistanceToSegment(projectedCoordinate, tempSegment);\n            if (delta < minSquaredDistance) {\n                closestSegmentData = segmentData;\n                minSquaredDistance = delta;\n            }\n        }\n        var closestSegment = closestSegmentData.segment;\n        if (this.vertex_ && !this.edge_) {\n            var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n            var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n            var squaredDist1 = squaredCoordinateDistance(pixel, pixel1);\n            var squaredDist2 = squaredCoordinateDistance(pixel, pixel2);\n            var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n            if (dist <= this.pixelTolerance_) {\n                snapped = true;\n                vertex =\n                    squaredDist1 > squaredDist2 ? c
 losestSegment[1] : closestSegment[0];\n                vertexPixel = map.getPixelFromCoordinate(vertex);\n            }\n        }\n        else if (this.edge_) {\n            var isCircle = closestSegmentData.feature.getGeometry().getType() ===\n                GeometryType.CIRCLE;\n            if (isCircle) {\n                var circleGeometry = closestSegmentData.feature.getGeometry();\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    circleGeometry = circleGeometry\n                        .clone()\n                        .transform(userProjection, projection);\n                }\n                vertex = toUserCoordinate(closestOnCircle(projectedCoordinate, \n                /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)), projection);\n            }\n            else {\n                tempSegment[0] = fromUserCoordinate(closestSegment[0], projection);\n                tempSegment[1] 
 = fromUserCoordinate(closestSegment[1], projection);\n                vertex = toUserCoordinate(closestOnSegment(projectedCoordinate, tempSegment), projection);\n            }\n            vertexPixel = map.getPixelFromCoordinate(vertex);\n            if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n                snapped = true;\n                if (this.vertex_ && !isCircle) {\n                    var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n                    var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n                    var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                    var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                    var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                    if (dist <= this.pixelTolerance_) {\n                        vertex =\n                            squaredDist1 > squaredDist2\n                        
         ? closestSegment[1]\n                                : closestSegment[0];\n                        vertexPixel = map.getPixelFromCoordinate(vertex);\n                    }\n                }\n            }\n        }\n        if (snapped) {\n            vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];\n        }\n        return {\n            snapped: snapped,\n            vertex: vertex,\n            vertexPixel: vertexPixel,\n        };\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Snap.prototype.updateFeature_ = function (feature) {\n        this.removeFeature(feature, false);\n        this.addFeature(feature, false);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeCircleGeometry_ = function (feature, geometry) {\n        v
 ar projection = this.getMap().getView().getProjection();\n        var circleGeometry = geometry;\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry\n                .clone()\n                .transform(userProjection, projection));\n        }\n        var polygon = fromCircle(circleGeometry);\n        if (userProjection) {\n            polygon.transform(projection, userProjection);\n        }\n        var coordinates = polygon.getCoordinates()[0];\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            var segmentData = {\n                feature: feature,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n    
  * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeGeometryCollectionGeometry_ = function (feature, geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0; i < geometries.length; ++i) {\n            var segmentWriter = this.SEGMENT_WRITERS_[geometries[i].getType()];\n            if (segmentWriter) {\n                segmentWriter(feature, geometries[i]);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeLineStringGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            var segmentData = {\n                
 feature: feature,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiLineStringGeometry_ = function (feature, geometry) {\n        var lines = geometry.getCoordinates();\n        for (var j = 0, jj = lines.length; j < jj; ++j) {\n            var coordinates = lines[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                var segmentData = {\n                    feature: feature,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.
 js\").default} feature Feature\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiPointGeometry_ = function (feature, geometry) {\n        var points = geometry.getCoordinates();\n        for (var i = 0, ii = points.length; i < ii; ++i) {\n            var coordinates = points[i];\n            var segmentData = {\n                feature: feature,\n                segment: [coordinates, coordinates],\n            };\n            this.rBush_.insert(geometry.getExtent(), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiPolygonGeometry_ = function (feature, geometry) {\n        var polygons = geometry.getCoordinates();\n        for (var k = 0, kk = polygons.length; k < kk; ++k) {\n            var rings = polygons
 [k];\n            for (var j = 0, jj = rings.length; j < jj; ++j) {\n                var coordinates = rings[j];\n                for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                    var segment = coordinates.slice(i, i + 2);\n                    var segmentData = {\n                        feature: feature,\n                        segment: segment,\n                    };\n                    this.rBush_.insert(boundingExtent(segment), segmentData);\n                }\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writePointGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        var segmentData = {\n            feature: feature,\n            segment: [coordinates, coordinates],\n        };\n        this.rBush_.insert(geometry
 .getExtent(), segmentData);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writePolygonGeometry_ = function (feature, geometry) {\n        var rings = geometry.getCoordinates();\n        for (var j = 0, jj = rings.length; j < jj; ++j) {\n            var coordinates = rings[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                var segmentData = {\n                    feature: feature,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    return Snap;\n}(PointerInteraction));\nexport default Snap;\n//# sourceMappingURL=Snap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics =
  function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Translate\n */\nimport Collection from '../Collection.js';\nimport Event from '../events/Event.js';\nimport InteractionProperty from './Property.js';\nimport PointerInteraction from './Pointer.js';\nimport { TRUE } from '../functions.js';\nimport { getChangeEventType } from '../Object.js';\nimport { includes } from '../array.js';\n/**\n * @enum {string}\n */\nvar TranslateEventType = {\n    /**\n     * Triggered upon feature translation start.\n 
     * @event TranslateEvent#translatestart\n     * @api\n     */\n    TRANSLATESTART: 'translatestart',\n    /**\n     * Triggered upon feature translation.\n     * @event TranslateEvent#translating\n     * @api\n     */\n    TRANSLATING: 'translating',\n    /**\n     * Triggered upon feature translation end.\n     * @event TranslateEvent#translateend\n     * @api\n     */\n    TRANSLATEEND: 'translateend',\n};\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n/**\n * @typedef {Object} Options\n * @property {Collection<import(\"../Feature.js\").default>} [features] Only features contained in this collection will be able to be translated. If\n * not specified, all features on the map will 
 be able to be translated.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers] A list of layers from which features should be\n * translated. Alternatively, a filter function can be provided. The\n * function will be called for each layer in the map and should return\n * `true` for layers that you want to be translatable. If the option is\n * absent, all visible layers will be considered translatable.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Translate~Translate} instances\n * are instances of this type.\n */\nvar Trans
 lateEvent = /** @class */ (function (_super) {\n    __extends(TranslateEvent, _super);\n    /**\n     * @param {TranslateEventType} type Type.\n     * @param {Collection<import(\"../Feature.js\").default>} features The features translated.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} startCoordinate The original coordinates before.translation started\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     */\n    function TranslateEvent(type, features, coordinate, startCoordinate, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features being translated.\n         * @type {Collection<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.features = features;\n        /**\n         * The coordinate of the drag event.\n         * @const\n         * @type {import(
 \"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.coordinate = coordinate;\n        /**\n         * The coordinate of the start position before translation started.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.startCoordinate = startCoordinate;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return TranslateEvent;\n}(Event));\nexport { TranslateEvent };\n/**\n * @classdesc\n * Interaction for translating (moving) features.\n *\n * @fires TranslateEvent\n * @api\n */\nvar Translate = /** @class */ (function (_super) {\n    __extends(Translate, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function Translate(opt_options) {\n        var _this = this;\
 n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * The last position we translated to.\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.lastCoordinate_ = null;\n        /**\n         * The start position before translation started.\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.startCoordinate_ = null;\n        /**\n         * @type {Collection<import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.features_ = options.features !== undefined ? options.features : null;\n        /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n        var layerFilter;\n        if (options.layers) {\n            if (typeof options.layers === 'function') {\n                layerFilter = options.layers;
 \n            }\n            else {\n                var layers_1 = options.layers;\n                layerFilter = function (layer) {\n                    return includes(layers_1, layer);\n                };\n            }\n        }\n        else {\n            layerFilter = TRUE;\n        }\n        /**\n         * @private\n         * @type {function(import(\"../layer/Layer.js\").default): boolean}\n         */\n        _this.layerFilter_ = layerFilter;\n        /**\n         * @private\n         * @type {FilterFunction}\n         */\n        _this.filter_ = options.filter ? options.filter : TRUE;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n        /**\n         * @type {import(\"../Feature.js\").default}\n         * @private\n         */\n        _this.lastFeature_ = null;\n        _this.addEventListener(getChangeEventType(InteractionProperty.ACTIVE), _this.handleActiv
 eChanged_);\n        return _this;\n    }\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Translate.prototype.handleDownEvent = function (event) {\n        this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);\n        if (!this.lastCoordinate_ && this.lastFeature_) {\n            this.startCoordinate_ = event.coordinate;\n            this.lastCoordinate_ = event.coordinate;\n            this.handleMoveEvent(event);\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATESTART, features, event.coordinate, this.startCoordinate_, event));\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return 
 {boolean} If the event was consumed.\n     */\n    Translate.prototype.handleUpEvent = function (event) {\n        if (this.lastCoordinate_) {\n            this.lastCoordinate_ = null;\n            this.handleMoveEvent(event);\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATEEND, features, event.coordinate, this.startCoordinate_, event));\n            // cleanup\n            this.startCoordinate_ = null;\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    Translate.prototype.handleDragEvent = function (event) {\n        if (this.lastCoordinate_) {\n            var newCoordinate = event.coordinate;\n            var deltaX_1 = newCoordinate[0] - this.lastCoordinate_[0];\n            var deltaY_1 = newCoordinate[1] - this.lastCoor
 dinate_[1];\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            features.forEach(function (feature) {\n                var geom = feature.getGeometry();\n                geom.translate(deltaX_1, deltaY_1);\n                feature.setGeometry(geom);\n            });\n            this.lastCoordinate_ = newCoordinate;\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATING, features, newCoordinate, this.startCoordinate_, event));\n        }\n    };\n    /**\n     * Handle pointer move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    Translate.prototype.handleMoveEvent = function (event) {\n        var elem = event.map.getViewport();\n        // Change the cursor to grab/grabbing if hovering any of the features managed\n        // by the interaction\n        if (this.featuresAtPixel_(event.pixel, event.map)) {\n            elem.classList.remove(this.lastCoordinate_ ? 'ol-g
 rab' : 'ol-grabbing');\n            elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');\n        }\n        else {\n            elem.classList.remove('ol-grab', 'ol-grabbing');\n        }\n    };\n    /**\n     * Tests to see if the given coordinates intersects any of our selected\n     * features.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel coordinate to test for intersection.\n     * @param {import(\"../PluggableMap.js\").default} map Map to test the intersection on.\n     * @return {import(\"../Feature.js\").default} Returns the feature found at the specified pixel\n     * coordinates.\n     * @private\n     */\n    Translate.prototype.featuresAtPixel_ = function (pixel, map) {\n        return map.forEachFeatureAtPixel(pixel, function (feature, layer) {\n            if (this.filter_(feature, layer)) {\n                if (!this.features_ || includes(this.features_.getArray(), feature)) {\n                    return feature;\n                }\n   
          }\n        }.bind(this), {\n            layerFilter: this.layerFilter_,\n            hitTolerance: this.hitTolerance_,\n        });\n    };\n    /**\n     * Returns the Hit-detection tolerance.\n     * @returns {number} Hit tolerance in pixels.\n     * @api\n     */\n    Translate.prototype.getHitTolerance = function () {\n        return this.hitTolerance_;\n    };\n    /**\n     * Hit-detection tolerance. Pixels inside the radius around the given position\n     * will be checked for features.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @api\n     */\n    Translate.prototype.setHitTolerance = function (hitTolerance) {\n        this.hitTolerance_ = hitTolerance;\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Translate.prot
 otype.setMap = function (map) {\n        var oldMap = this.getMap();\n        _super.prototype.setMap.call(this, map);\n        this.updateState_(oldMap);\n    };\n    /**\n     * @private\n     */\n    Translate.prototype.handleActiveChanged_ = function () {\n        this.updateState_(null);\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").default} oldMap Old map.\n     * @private\n     */\n    Translate.prototype.updateState_ = function (oldMap) {\n        var map = this.getMap();\n        var active = this.getActive();\n        if (!map || !active) {\n            map = map || oldMap;\n            if (map) {\n                var elem = map.getViewport();\n                elem.classList.remove('ol-grab', 'ol-grabbing');\n            }\n        }\n    };\n    return Translate;\n}(PointerInteraction));\nexport default Translate;\n//# sourceMappingURL=Translate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {
 \n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.js';\nimport GeometryType from './GeometryType.js';\nimport { closestSquaredDistanceXY, createOrUpdateEmpty, extend, getCenter, } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry} objects.\n *\n * @api\n */\nvar GeometryCollection = /** @class */ (function (_super) {\n    _
 _extends(GeometryCollection, _super);\n    /**\n     * @param {Array<Geometry>=} opt_geometries Geometries.\n     */\n    function GeometryCollection(opt_geometries) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {Array<Geometry>}\n         */\n        _this.geometries_ = opt_geometries ? opt_geometries : null;\n        /**\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.changeEventsKeys_ = [];\n        _this.listenGeometriesChange_();\n        return _this;\n    }\n    /**\n     * @private\n     */\n    GeometryCollection.prototype.unlistenGeometriesChange_ = function () {\n        this.changeEventsKeys_.forEach(unlistenByKey);\n        this.changeEventsKeys_.length = 0;\n    };\n    /**\n     * @private\n     */\n    GeometryCollection.prototype.listenGeometriesChange_ = function () {\n        if (!this.geometries_) {\n            return;\n        }\n        for (var i = 0, ii = this.g
 eometries_.length; i < ii; ++i) {\n            this.changeEventsKeys_.push(listen(this.geometries_[i], EventType.CHANGE, this.changed, this));\n        }\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!GeometryCollection} Clone.\n     * @api\n     */\n    GeometryCollection.prototype.clone = function () {\n        var geometryCollection = new GeometryCollection(null);\n        geometryCollection.setGeometries(this.geometries_);\n        return geometryCollection;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    GeometryCollection.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            retur
 n minSquaredDistance;\n        }\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            minSquaredDistance = geometries[i].closestPointXY(x, y, closestPoint, minSquaredDistance);\n        }\n        return minSquaredDistance;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    GeometryCollection.prototype.containsXY = function (x, y) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].containsXY(x, y)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    GeometryCollection.prototype.computeExtent = function (extent) {\n        createOrUpdateEmpty(ex
 tent);\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            extend(extent, geometries[i].getExtent());\n        }\n        return extent;\n    };\n    /**\n     * Return the geometries that make up this geometry collection.\n     * @return {Array<Geometry>} Geometries.\n     * @api\n     */\n    GeometryCollection.prototype.getGeometries = function () {\n        return cloneGeometries(this.geometries_);\n    };\n    /**\n     * @return {Array<Geometry>} Geometries.\n     */\n    GeometryCollection.prototype.getGeometriesArray = function () {\n        return this.geometries_;\n    };\n    /**\n     * @return {Array<Geometry>} Geometries.\n     */\n    GeometryCollection.prototype.getGeometriesArrayRecursive = function () {\n        /** @type {Array<Geometry>} */\n        var geometriesArray = [];\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            i
 f (geometries[i].getType() === this.getType()) {\n                geometriesArray = geometriesArray.concat(\n                /** @type {GeometryCollection} */ (geometries[i]).getGeometriesArrayRecursive());\n            }\n            else {\n                geometriesArray.push(geometries[i]);\n            }\n        }\n        return geometriesArray;\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {GeometryCollection} Simplified GeometryCollection.\n     */\n    GeometryCollection.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        if (this.simplifiedGeometryRevision !== this.getRevision()) {\n            this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n            this.simplifiedGeometryRevision = this.getRevision();\n        }\n        if (squaredTolerance < 0 ||\n            (this.simplifiedGeometryMaxMinSquaredTolerance 
 !== 0 &&\n                squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {\n            return this;\n        }\n        var simplifiedGeometries = [];\n        var geometries = this.geometries_;\n        var simplified = false;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            var geometry = geometries[i];\n            var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n            simplifiedGeometries.push(simplifiedGeometry);\n            if (simplifiedGeometry !== geometry) {\n                simplified = true;\n            }\n        }\n        if (simplified) {\n            var simplifiedGeometryCollection = new GeometryCollection(null);\n            simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n            return simplifiedGeometryCollection;\n        }\n        else {\n            this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n            return this;\n       
  }\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    GeometryCollection.prototype.getType = function () {\n        return GeometryType.GEOMETRY_COLLECTION;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    GeometryCollection.prototype.intersectsExtent = function (extent) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].intersectsExtent(extent)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    GeometryCollection.prototype.isEmpty = function () {\n        return this.geometries_.length === 0;\n    };\n  
   /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    GeometryCollection.prototype.rotate = function (angle, anchor) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].rotate(angle, anchor);\n        }\n        this.changed();\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n     *     of the geometry extent).\n  
    * @api\n     */\n    GeometryCollection.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        var anchor = opt_anchor;\n        if (!anchor) {\n            anchor = getCenter(this.getExtent());\n        }\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].scale(sx, opt_sy, anchor);\n        }\n        this.changed();\n    };\n    /**\n     * Set the geometries that make up this geometry collection.\n     * @param {Array<Geometry>} geometries Geometries.\n     * @api\n     */\n    GeometryCollection.prototype.setGeometries = function (geometries) {\n        this.setGeometriesArray(cloneGeometries(geometries));\n    };\n    /**\n     * @param {Array<Geometry>} geometries Geometries.\n     */\n    GeometryCollection.prototype.setGeometriesArray = function (geometries) {\n        this.unlistenGeometriesChange_();\n        this.geometries_ = geometries;\n        this.listenGeometriesChange_();
 \n        this.changed();\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     * @api\n     */\n    GeometryCollection.prototype.applyTransform = function (transformFn) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].applyTransform(transformFn);\n        }\n        this.changed();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api
 \n     */\n    GeometryCollection.prototype.translate = function (deltaX, deltaY) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].translate(deltaX, deltaY);\n        }\n        this.changed();\n    };\n    /**\n     * Clean up.\n     */\n    GeometryCollection.prototype.disposeInternal = function () {\n        this.unlistenGeometriesChange_();\n        _super.prototype.disposeInternal.call(this);\n    };\n    return GeometryCollection;\n}(Geometry));\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n    var clonedGeometries = [];\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        clonedGeometries.push(geometries[i].clone());\n    }\n    return clonedGeometries;\n}\nexport default GeometryCollection;\n//# sourceMappingURL=GeometryCollection.js.map","var __extends = (this && this
 .__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/JSONFeature\n */\nimport FeatureFormat from './Feature.js';\nimport FormatType from './FormatType.js';\nimport { abstract } from '../util.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\nvar JSONFeature = /** @class */ (function (_super) {\n    __extends(JSO
 NFeature, _super);\n    function JSONFeature() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    JSONFeature.prototype.getType = function () {\n        return FormatType.JSON;\n    };\n    /**\n     * Read a feature.  Only works for a single feature. Use `readFeatures` to\n     * read a feature collection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    JSONFeature.prototype.readFeature = function (source, opt_options) {\n        return this.readFeatureFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * Read all features.  Works with both a single feature and a feature\n     * collection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|stri
 ng} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    JSONFeature.prototype.readFeatures = function (source, opt_options) {\n        return this.readFeaturesFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    JSONFeature.prototype.readFeatureFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    JSONFeature.
 prototype.readFeaturesFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a geometry.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     * @api\n     */\n    JSONFeature.prototype.readGeometry = function (source, opt_options) {\n        return this.readGeometryFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    JSONFeature.prototype.readGeometryFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection.\n     *\n     
 * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    JSONFeature.prototype.readProjection = function (source) {\n        return this.readProjectionFromObject(getObject(source));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    JSONFeature.prototype.readProjectionFromObject = function (object) {\n        return abstract();\n    };\n    /**\n     * Encode a feature as string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded feature.\n     * @api\n     */\n    JSONFeature.prototype.writeFeature = function (feature, opt_options) {\n        return JSON.stringify(this.writeFeatureObject(feature, opt_options)
 );\n    };\n    /**\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeFeatureObject = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded features.\n     * @api\n     */\n    JSONFeature.prototype.writeFeatures = function (features, opt_options) {\n        return JSON.stringify(this.writeFeaturesObject(features, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n    
  * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeFeaturesObject = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode a geometry as string.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded geometry.\n     * @api\n     */\n    JSONFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        return JSON.stringify(this.writeGeometryObject(geometry, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return abstract();\n    };\n    return JSONFeature;\n}(FeatureFormat));\n/
 **\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n    if (typeof source === 'string') {\n        var object = JSON.parse(source);\n        return object ? /** @type {Object} */ (object) : null;\n    }\n    else if (source !== null) {\n        return source;\n    }\n    else {\n        return null;\n    }\n}\nexport default JSONFeature;\n//# sourceMappingURL=JSONFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b
 ) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/EsriJSON\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { assert } from '../asserts.js';\nimport { assign, isEmpty } from '../obj.js';\nimport { containsExtent } from '../extent.js';\nimport { deflateCoordinates } from '../geom/flat/deflate.js';\nimport { get as getProjection } from '../proj.js';\nimport { linearRingIsClockwise } from '../geom/flat/orient.js';\nimport { transformGeometryWithOptions } from '.
 /Feature.js';\n/**\n * @typedef {import(\"arcgis-rest-api\").Feature} EsriJSONFeature\n * @typedef {import(\"arcgis-rest-api\").FeatureSet} EsriJSONFeatureSet\n * @typedef {import(\"arcgis-rest-api\").Geometry} EsriJSONGeometry\n * @typedef {import(\"arcgis-rest-api\").Point} EsriJSONPoint\n * @typedef {import(\"arcgis-rest-api\").Polyline} EsriJSONPolyline\n * @typedef {import(\"arcgis-rest-api\").Polygon} EsriJSONPolygon\n * @typedef {import(\"arcgis-rest-api\").Multipoint} EsriJSONMultipoint\n * @typedef {import(\"arcgis-rest-api\").HasZM} EsriJSONHasZM\n * @typedef {import(\"arcgis-rest-api\").Position} EsriJSONPosition\n * @typedef {import(\"arcgis-rest-api\").SpatialReferenceWkid} EsriJSONSpatialReferenceWkid\n */\n/**\n * @typedef {Object} EsriJSONMultiPolygon\n * @property {Array<Array<Array<Array<number>>>>} rings Rings for the MultiPolygon.\n * @property {boolean} [hasM] If the polygon coordinates have an M value.\n * @property {boolean} [hasZ] If the polygon coordinates h
 ave a Z value.\n * @property {EsriJSONSpatialReferenceWkid} [spatialReference] The coordinate reference system.\n */\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default, function(EsriJSONGeometry): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {};\nGEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;\nGEOMETRY_READERS[GeometryType.LINE_STRING] = readLineStringGeometry;\nGEOMETRY_READERS[GeometryType.POLYGON] = readPolygonGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POINT] = readMultiPointGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_LINE_STRING] = readMultiLineStringGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default, import(\"./Feature.js\").WriteOptions=): (EsriJSONGeometry)>}\n */\nvar GEOMETRY_WRITERS = {};\nGEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;\nGEOMETRY_WRITERS[GeometryType.LIN
 E_STRING] = writeLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.POLYGON] = writePolygonGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POINT] = writeMultiPointGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_LINE_STRING] = writeMultiLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;\n/**\n * @typedef {Object} Options\n * @property {string} [geometryName] Geometry name to use when creating features.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the EsriJSON format.\n *\n * @api\n */\nvar EsriJSON = /** @class */ (function (_super) {\n    __extends(EsriJSON, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function EsriJSON(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this) || this;\n        /**\n         * Name of the geometry attribute for features.\n         * @type {string|undefined}\n         * @p
 rivate\n         */\n        _this.geometryName_ = options.geometryName;\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @param {string=} opt_idField Name of the field where to get the id from.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    EsriJSON.prototype.readFeatureFromObject = function (object, opt_options, opt_idField) {\n        var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);\n        var geometry = readGeometry(esriJSONFeature.geometry, opt_options);\n        var feature = new Feature();\n        if (this.geometryName_) {\n            feature.setGeometryName(this.geometryName_);\n        }\n        feature.setGeometry(geometry);\n        if (esriJSONFeature.attributes) {\n            feature.setProperties(esriJSONFeature.attributes, true);\n            var id = esriJSONFeature.attributes[opt_idFi
 eld];\n            if (id !== undefined) {\n                feature.setId(/** @type {number} */ (id));\n            }\n        }\n        return feature;\n    };\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    EsriJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        var options = opt_options ? opt_options : {};\n        if (object['features']) {\n            var esriJSONFeatureSet = /** @type {EsriJSONFeatureSet} */ (object);\n            /** @type {Array<import(\"../Feature.js\").default>} */\n            var features = [];\n            var esriJSONFeatures = esriJSONFeatureSet.features;\n            for (var i = 0, ii = esriJSONFeatures.length; i < ii; ++i) {\n                features.push(this.readFeatureFromObject(esriJSONFeatures[i], options, object.objectIdFieldName));\n            }\n         
    return features;\n        }\n        else {\n            return [this.readFeatureFromObject(object, options)];\n        }\n    };\n    /**\n     * @param {EsriJSONGeometry} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    EsriJSON.prototype.readGeometryFromObject = function (object, opt_options) {\n        return readGeometry(object, opt_options);\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    EsriJSON.prototype.readProjectionFromObject = function (object) {\n        if (object['spatialReference'] &&\n            object['spatialReference']['wkid'] !== undefined) {\n            var spatialReference = /** @type {EsriJSONSpatialReferenceWkid} */ (object['spatialReference']);\n            var crs = spatialReference.wkid;\n    
         return getProjection('EPSG:' + crs);\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * Encode a geometry as a EsriJSON object.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {EsriJSONGeometry} Object.\n     * @api\n     */\n    EsriJSON.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return writeGeometry(geometry, this.adaptOptions(opt_options));\n    };\n    /**\n     * Encode a feature as a esriJSON Feature object.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {Object} Object.\n     * @api\n     */\n    EsriJSON.prototype.writeFeatureObject = function (feature, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var obje
 ct = {};\n        if (!feature.hasProperties()) {\n            object['attributes'] = {};\n            return object;\n        }\n        var properties = feature.getProperties();\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            object['geometry'] = writeGeometry(geometry, opt_options);\n            if (opt_options && opt_options.featureProjection) {\n                object['geometry']['spatialReference'] = /** @type {EsriJSONSpatialReferenceWkid} */ ({\n                    wkid: Number(getProjection(opt_options.featureProjection)\n                        .getCode()\n                        .split(':')\n                        .pop()),\n                });\n            }\n            delete properties[feature.getGeometryName()];\n        }\n        if (!isEmpty(properties)) {\n            object['attributes'] = properties;\n        }\n        else {\n            object['attributes'] = {};\n        }\n        return object;\n    };\n    /**\n     *
  Encode an array of features as a EsriJSON object.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {EsriJSONFeatureSet} EsriJSON Object.\n     * @api\n     */\n    EsriJSON.prototype.writeFeaturesObject = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var objects = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            objects.push(this.writeFeatureObject(features[i], opt_options));\n        }\n        return {\n            'features': objects,\n        };\n    };\n    return EsriJSON;\n}(JSONFeature));\n/**\n * @param {EsriJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n    var _a, _b;\n    if (!object)
  {\n        return null;\n    }\n    /** @type {import(\"../geom/GeometryType.js\").default} */\n    var type;\n    if (typeof object['x'] === 'number' && typeof object['y'] === 'number') {\n        type = GeometryType.POINT;\n    }\n    else if (object['points']) {\n        type = GeometryType.MULTI_POINT;\n    }\n    else if (object['paths']) {\n        var esriJSONPolyline = /** @type {EsriJSONPolyline} */ (object);\n        if (esriJSONPolyline.paths.length === 1) {\n            type = GeometryType.LINE_STRING;\n        }\n        else {\n            type = GeometryType.MULTI_LINE_STRING;\n        }\n    }\n    else if (object['rings']) {\n        var esriJSONPolygon = /** @type {EsriJSONPolygon} */ (object);\n        var layout = getGeometryLayout(esriJSONPolygon);\n        var rings = convertRings(esriJSONPolygon.rings, layout);\n        if (rings.length === 1) {\n            type = GeometryType.POLYGON;\n            object = assign({}, object, (_a = {}, _a['rings'] = rings[0]
 , _a));\n        }\n        else {\n            type = GeometryType.MULTI_POLYGON;\n            object = assign({}, object, (_b = {}, _b['rings'] = rings, _b));\n        }\n    }\n    var geometryReader = GEOMETRY_READERS[type];\n    return transformGeometryWithOptions(geometryReader(object), false, opt_options);\n}\n/**\n * Determines inner and outer rings.\n * Checks if any polygons in this array contain any other polygons in this\n * array. It is used for checking for holes.\n * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser\n * @param {Array<!Array<!Array<number>>>} rings Rings.\n * @param {import(\"../geom/GeometryLayout.js\").default} layout Geometry layout.\n * @return {Array<!Array<!Array<!Array<number>>>>} Transformed rings.\n */\nfunction convertRings(rings, layout) {\n    var flatRing = [];\n    var outerRings = [];\n    var holes = [];\n    var i, ii;\n    for (i = 0, ii = rings.length; i < ii; ++i) {\n        flatRing.length = 0;\n        deflateCo
 ordinates(flatRing, 0, rings[i], layout.length);\n        // is this ring an outer ring? is it clockwise?\n        var clockwise = linearRingIsClockwise(flatRing, 0, flatRing.length, layout.length);\n        if (clockwise) {\n            outerRings.push([rings[i]]);\n        }\n        else {\n            holes.push(rings[i]);\n        }\n    }\n    while (holes.length) {\n        var hole = holes.shift();\n        var matched = false;\n        // loop over all outer rings and see if they contain our hole.\n        for (i = outerRings.length - 1; i >= 0; i--) {\n            var outerRing = outerRings[i][0];\n            var containsHole = containsExtent(new LinearRing(outerRing).getExtent(), new LinearRing(hole).getExtent());\n            if (containsHole) {\n                // the hole is contained push it into our polygon\n                outerRings[i].push(hole);\n                matched = true;\n                break;\n            }\n        }\n        if (!matched) {\n         
    // no outer rings contain this hole turn it into and outer\n            // ring (reverse it)\n            outerRings.push([hole.reverse()]);\n        }\n    }\n    return outerRings;\n}\n/**\n * @param {EsriJSONPoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Point.\n */\nfunction readPointGeometry(object) {\n    var point;\n    if (object.m !== undefined && object.z !== undefined) {\n        point = new Point([object.x, object.y, object.z, object.m], GeometryLayout.XYZM);\n    }\n    else if (object.z !== undefined) {\n        point = new Point([object.x, object.y, object.z], GeometryLayout.XYZ);\n    }\n    else if (object.m !== undefined) {\n        point = new Point([object.x, object.y, object.m], GeometryLayout.XYM);\n    }\n    else {\n        point = new Point([object.x, object.y]);\n    }\n    return point;\n}\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} LineString.\n */\nfunction readLi
 neStringGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new LineString(object.paths[0], layout);\n}\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiLineString(object.paths, layout);\n}\n/**\n * @param {EsriJSONHasZM} object Object.\n * @return {import(\"../geom/GeometryLayout.js\").default} The geometry layout to use.\n */\nfunction getGeometryLayout(object) {\n    var layout = GeometryLayout.XY;\n    if (object.hasZ === true && object.hasM === true) {\n        layout = GeometryLayout.XYZM;\n    }\n    else if (object.hasZ === true) {\n        layout = GeometryLayout.XYZ;\n    }\n    else if (object.hasM === true) {\n        layout = GeometryLayout.XYM;\n    }\n    return layout;\n}\n/**\n * @param {EsriJSONMultipoint} object Object.\n * @return {import(\"../geom/Geo
 metry.js\").default} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiPoint(object.points, layout);\n}\n/**\n * @param {EsriJSONMultiPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiPolygon(object.rings, layout);\n}\n/**\n * @param {EsriJSONPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Polygon.\n */\nfunction readPolygonGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new Polygon(object.rings, layout);\n}\n/**\n * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPoint} EsriJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n    var coordinates = geometry.ge
 tCoordinates();\n    /** @type {EsriJSONPoint} */\n    var esriJSON;\n    var layout = geometry.getLayout();\n    if (layout === GeometryLayout.XYZ) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            z: coordinates[2],\n        };\n    }\n    else if (layout === GeometryLayout.XYM) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            m: coordinates[2],\n        };\n    }\n    else if (layout === GeometryLayout.XYZM) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            z: coordinates[2],\n            m: coordinates[3],\n        };\n    }\n    else if (layout === GeometryLayout.XY) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n        };\n    }\n    else {\n        assert(false, 34); // Invalid geometry layout\n    }\n    return esriJSON;\n}\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").def
 ault} geometry Geometry.\n * @return {Object} Object with boolean hasZ and hasM keys.\n */\nfunction getHasZM(geometry) {\n    var layout = geometry.getLayout();\n    return {\n        hasZ: layout === GeometryLayout.XYZ || layout === GeometryLayout.XYZM,\n        hasM: layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM,\n    };\n}\n/**\n * @param {import(\"../geom/LineString.js\").default} lineString Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeLineStringGeometry(lineString, opt_options) {\n    var hasZM = getHasZM(lineString);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        paths: [\n            /** @type {Array<EsriJSONPosition>} */ (lineString.getCoordinates()),\n        ],\n    };\n}\n/**\n * @param {import(\"../geom/Polygon.js\").default} polygon Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Writ
 e options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writePolygonGeometry(polygon, opt_options) {\n    // Esri geometries use the left-hand rule\n    var hasZM = getHasZM(polygon);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        rings: /** @type {Array<Array<EsriJSONPosition>>} */ (polygon.getCoordinates(false)),\n    };\n}\n/**\n * @param {import(\"../geom/MultiLineString.js\").default} multiLineString Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeMultiLineStringGeometry(multiLineString, opt_options) {\n    var hasZM = getHasZM(multiLineString);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        paths: /** @type {Array<Array<EsriJSONPosition>>} */ (multiLineString.getCoordinates()),\n    };\n}\n/**\n * @param {import(\"../geom/MultiPoint.js\").default} multiPoint Geometry.\n * @param {import(\".
 /Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONMultipoint} EsriJSON geometry.\n */\nfunction writeMultiPointGeometry(multiPoint, opt_options) {\n    var hasZM = getHasZM(multiPoint);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        points: /** @type {Array<EsriJSONPosition>} */ (multiPoint.getCoordinates()),\n    };\n}\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n    var hasZM = getHasZM(geometry);\n    var coordinates = geometry.getCoordinates(false);\n    var output = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        for (var x = coordinates[i].length - 1; x >= 0; x--) {\n            output.push(coordinates[i][x]);\n        }\n    }\n    return {\n        hasZ: hasZM.hasZ,\n       
  hasM: hasZM.hasM,\n        rings: /** @type {Array<Array<EsriJSONPosition>>} */ (output),\n    };\n}\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONGeometry} EsriJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n    var geometryWriter = GEOMETRY_WRITERS[geometry.getType()];\n    return geometryWriter(transformGeometryWithOptions(geometry, true, opt_options), opt_options);\n}\nexport default EsriJSON;\n//# sourceMappingURL=EsriJSON.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d
 , b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/XMLFeature\n */\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport { abstract } from '../util.js';\nimport { extend } from '../array.js';\nimport { getXMLSerializer, isDocument, parse } from '../xml.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for XML feature formats.\n *\n * @abstract\n */\nvar XMLFeature = /** @class */ (function (_super) {\n    __extends(XMLFeature, _super);\n    function XMLFeature() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {XMLSerializer}\n         * @private\n         */\n        _this.xmlSerializer_ = getXMLSerializer();\n        return _this;\n   
  }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    XMLFeature.prototype.getType = function () {\n        return FormatType.XML;\n    };\n    /**\n     * Read a single feature.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    XMLFeature.prototype.readFeature = function (source, opt_options) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeatureFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readFeatureFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readFeatureFromNode(\n            /** @type {El
 ement} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    XMLFeature.prototype.readFeatureFromDocument = function (doc, opt_options) {\n        var features = this.readFeaturesFromDocument(doc, opt_options);\n        if (features.length > 0) {\n            return features[0];\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    XMLFeature.prototype.readFeatureFromNode = function (node, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Read all features from a feature collection.\n     *\n     * @param {Document|Element|Object|string} source Source.\n
      * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    XMLFeature.prototype.readFeatures = function (source, opt_options) {\n        if (!source) {\n            return [];\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeaturesFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readFeaturesFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readFeaturesFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    
 XMLFeature.prototype.readFeaturesFromDocument = function (doc, opt_options) {\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = [];\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(features, this.readFeaturesFromNode(/** @type {Element} */ (n), opt_options));\n            }\n        }\n        return features;\n    };\n    /**\n     * @abstract\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    XMLFeature.prototype.readFeaturesFromNode = function (node, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a single geometry from a source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read
  options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometry = function (source, opt_options) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readGeometryFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readGeometryFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readGeometryFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometryFromDocument = function (doc, opt_options) {\
 n        return null; // not implemented\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometryFromNode = function (node, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    XMLFeature.prototype.readProjection = function (source) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readProjectionFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readProjectionFromDocument(/** @type {D
 ocument} */ (source));\n        }\n        else {\n            return this.readProjectionFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    XMLFeature.prototype.readProjectionFromDocument = function (doc) {\n        return this.dataProjection;\n    };\n    /**\n     * @param {Element} node Node.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    XMLFeature.prototype.readProjectionFromNode = function (node) {\n        return this.dataProjection;\n    };\n    /**\n     * Encode a feature as string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded feature.\n     */\n    XMLFeature.prototype.writeFeature = function (feature, opt_op
 tions) {\n        var node = this.writeFeatureNode(feature, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @protected\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeFeatureNode = function (feature, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Result.\n     * @api\n     */\n    XMLFeature.prototype.writeFeatures = function (features, opt_options) {\n        var node = this.writeFeaturesNode(features, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param
  {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeFeaturesNode = function (features, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Encode a geometry as string.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded geometry.\n     */\n    XMLFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        var node = this.writeGeometryNode(geometry, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     */\n    XMLFea
 ture.prototype.writeGeometryNode = function (geometry, opt_options) {\n        return null; // not implemented\n    };\n    return XMLFeature;\n}(FeatureFormat));\nexport default XMLFeature;\n//# sourceMappingURL=XMLFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GMLBase\n */\n// FIXME Envelopes should not be treated as geometries! readEnvelope_ is part\n// of GEOMETRY_PARSERS_ and methods using GEOM
 ETRY_PARSERS_ do not expect\n// envelopes/extents, only geometries!\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport XMLFeature from './XMLFeature.js';\nimport { assign } from '../obj.js';\nimport { extend } from '../array.js';\nimport { getAllTextContent, getAttributeNS, makeArrayPusher, makeReplacer, parseNode, pushParseAndPop, } from '../xml.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\n/**\n * @const\n * @type {string}\n */\nexport var GMLNS = 'http://www.opengis.net/gml';\n/**\n * A regula
 r expression that matches if a string only contains whitespace\n * characters. It will e.g. match `''`, `' '`, `'\\n'` etc. The non-breaking\n * space (0xa0) is explicitly included as IE doesn't include it in its\n * definition of `\\s`.\n *\n * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160\n *\n * @const\n * @type {RegExp}\n */\nvar ONLY_WHITESPACE_RE = /^[\\s\\xa0]*$/;\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] Feature\n * namespace. If not defined will be derived from GML. If multiple\n * feature types have been configured which come from different feature\n * namespaces, this will be an object with the keys being the prefixes used\n * in the entries of featureType array. The values of the object will be the\n * feature namespaces themselves. So for instance there might be a featureType\n * item `topp:states` in the `featureType` a
 rray and then there will be a key\n * `topp` in the featureNS object with value `http://www.openplans.org/topp`.\n * @property {Array<string>|string} [featureType] Feature type(s) to parse.\n * If multiple feature types need to be configured\n * which come from different feature namespaces, `featureNS` will be an object\n * with the keys being the prefixes used in the entries of featureType array.\n * The values of the object will be the feature namespaces themselves.\n * So for instance there might be a featureType item `topp:states` and then\n * there will be a key named `topp` in the featureNS object with value\n * `http://www.openplans.org/topp`.\n * @property {string} srsName srsName to use when writing geometries.\n * @property {boolean} [surface=false] Write gml:Surface instead of gml:Polygon\n * elements. This also affects the elements in multi-part geometries.\n * @property {boolean} [curve=false] Write gml:Curve instead of gml:LineString\n * elements. This also affects the
  elements in multi-part geometries.\n * @property {boolean} [multiCurve=true] Write gml:MultiCurve instead of gml:MultiLineString.\n * Since the latter is deprecated in GML 3.\n * @property {boolean} [multiSurface=true] Write gml:multiSurface instead of\n * gml:MultiPolygon. Since the latter is deprecated in GML 3.\n * @property {string} [schemaLocation] Optional schemaLocation to use when\n * writing out the GML, this will override the default provided.\n * @property {boolean} [hasZ=false] If coordinates have a Z value.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Feature base format for reading and writing data in the GML format.\n * This class cannot be instantiated, it contains only base content that\n * is shared with versioned format classes GML2 and GML3.\n *\n * @abstract\n */\nvar GMLBase = /** @class */ (function (_super) {\n    __extends(GMLBase, _super);\n    /**\n     * @param {Options
 =} opt_options Optional configuration object.\n     */\n    function GMLBase(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = /** @type {Options} */ (opt_options ? opt_options : {});\n        /**\n         * @protected\n         * @type {Array<string>|string|undefined}\n         */\n        _this.featureType = options.featureType;\n        /**\n         * @protected\n         * @type {Object<string, string>|string|undefined}\n         */\n        _this.featureNS = options.featureNS;\n        /**\n         * @protected\n         * @type {string}\n         */\n        _this.srsName = options.srsName;\n        /**\n         * @protected\n         * @type {string}\n         */\n        _this.schemaLocation = '';\n        /**\n         * @type {Object<string, Object<string, Object>>}\n         */\n        _this.FEATURE_COLLECTION_PARSERS = {};\n        _this.FEATURE_COLLECTION_PARSERS[_this.namespace] = {\n            'featureMember': makeArrayPusher(
 _this.readFeaturesInternal),\n            'featureMembers': makeReplacer(_this.readFeaturesInternal),\n        };\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<Feature> | undefined} Features.\n     */\n    GMLBase.prototype.readFeaturesInternal = function (node, objectStack) {\n        var localName = node.localName;\n        var features = null;\n        if (localName == 'FeatureCollection') {\n            features = pushParseAndPop([], this.FEATURE_COLLECTION_PARSERS, node, objectStack, this);\n        }\n        else if (localName == 'featureMembers' || localName == 'featureMember') {\n            var context = objectStack[0];\n            var featureType = context['featureType'];\n            var featureNS = context['featureNS'];\n            var prefix = 'p';\n            var defaultPrefix = 'p0';\n            if (!featureType && node.childNodes) {\n                (featureTy
 pe = []), (featureNS = {});\n                for (var i = 0, ii = node.childNodes.length; i < ii; ++i) {\n                    var child = node.childNodes[i];\n                    if (child.nodeType === 1) {\n                        var ft = child.nodeName.split(':').pop();\n                        if (featureType.indexOf(ft) === -1) {\n                            var key = '';\n                            var count = 0;\n                            var uri = child.namespaceURI;\n                            for (var candidate in featureNS) {\n                                if (featureNS[candidate] === uri) {\n                                    key = candidate;\n                                    break;\n                                }\n                                ++count;\n                            }\n                            if (!key) {\n                                key = prefix + count;\n                                featureNS[key] = uri;\n                       
      }\n                            featureType.push(key + ':' + ft);\n                        }\n                    }\n                }\n                if (localName != 'featureMember') {\n                    // recheck featureType for each featureMember\n                    context['featureType'] = featureType;\n                    context['featureNS'] = featureNS;\n                }\n            }\n            if (typeof featureNS === 'string') {\n                var ns = featureNS;\n                featureNS = {};\n                featureNS[defaultPrefix] = ns;\n            }\n            /** @type {Object<string, Object<string, import(\"../xml.js\").Parser>>} */\n            var parsersNS = {};\n            var featureTypes = Array.isArray(featureType)\n                ? featureType\n                : [featureType];\n            for (var p in featureNS) {\n                /** @type {Object<string, import(\"../xml.js\").Parser>} */\n                var parsers = {};\n        
         for (var i = 0, ii = featureTypes.length; i < ii; ++i) {\n                    var featurePrefix = featureTypes[i].indexOf(':') === -1\n                        ? defaultPrefix\n                        : featureTypes[i].split(':')[0];\n                    if (featurePrefix === p) {\n                        parsers[featureTypes[i].split(':').pop()] =\n                            localName == 'featureMembers'\n                                ? makeArrayPusher(this.readFeatureElement, this)\n                                : makeReplacer(this.readFeatureElement, this);\n                    }\n                }\n                parsersNS[featureNS[p]] = parsers;\n            }\n            if (localName == 'featureMember') {\n                features = pushParseAndPop(undefined, parsersNS, node, objectStack);\n            }\n            else {\n                features = pushParseAndPop([], parsersNS, node, objectStack);\n            }\n        }\n        if (features === null) {\
 n            features = [];\n        }\n        return features;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent|undefined} Geometry.\n     */\n    GMLBase.prototype.readGeometryElement = function (node, objectStack) {\n        var context = /** @type {Object} */ (objectStack[0]);\n        context['srsName'] = node.firstElementChild.getAttribute('srsName');\n        context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension');\n        var geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS, node, objectStack, this);\n        if (geometry) {\n            if (Array.isArray(geometry)) {\n                return transformExtentWithOptions(\n                /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n            }\n            else {\n                return transformGeometryWithOptions(\n           
      /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), false, context);\n            }\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {boolean} asFeature whether result should be wrapped as a feature.\n     * @return {Feature|Object} Feature\n     */\n    GMLBase.prototype.readFeatureElementInternal = function (node, objectStack, asFeature) {\n        var geometryName;\n        var values = {};\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var value = void 0;\n            var localName = n.localName;\n            // first, check if it is simple attribute\n            if (n.childNodes.length === 0 ||\n                (n.childNodes.length === 1 &&\n                    (n.firstChild.nodeType === 3 || n.firstChild.nodeType === 4))) {\n                value = getAllTextContent(n, false);\
 n                if (ONLY_WHITESPACE_RE.test(value)) {\n                    value = undefined;\n                }\n            }\n            else {\n                if (asFeature) {\n                    //if feature, try it as a geometry\n                    value = this.readGeometryElement(n, objectStack);\n                }\n                if (!value) {\n                    //if not a geometry or not a feature, treat it as a complex attribute\n                    value = this.readFeatureElementInternal(n, objectStack, false);\n                }\n                else if (localName !== 'boundedBy') {\n                    // boundedBy is an extent and must not be considered as a geometry\n                    geometryName = localName;\n                }\n            }\n            if (values[localName]) {\n                if (!(values[localName] instanceof Array)) {\n                    values[localName] = [values[localName]];\n                }\n                values[localName].pu
 sh(value);\n            }\n            else {\n                values[localName] = value;\n            }\n            var len = n.attributes.length;\n            if (len > 0) {\n                values[localName] = { _content_: values[localName] };\n                for (var i = 0; i < len; i++) {\n                    var attName = n.attributes[i].name;\n                    values[localName][attName] = n.attributes[i].value;\n                }\n            }\n        }\n        if (!asFeature) {\n            return values;\n        }\n        else {\n            var feature = new Feature(values);\n            if (geometryName) {\n                feature.setGeometryName(geometryName);\n            }\n            var fid = node.getAttribute('fid') || getAttributeNS(node, this.namespace, 'id');\n            if (fid) {\n                feature.setId(fid);\n            }\n            return feature;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} o
 bjectStack Object stack.\n     * @return {Feature} Feature.\n     */\n    GMLBase.prototype.readFeatureElement = function (node, objectStack) {\n        return this.readFeatureElementInternal(node, objectStack, true);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Point|undefined} Point.\n     */\n    GMLBase.prototype.readPoint = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            return new Point(flatCoordinates, GeometryLayout.XYZ);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPoint|undefined} MultiPoint.\n     */\n    GMLBase.prototype.readMultiPoint = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var coordinates = pushParseAndPop([], this.MULTIPOINT_PARSERS, node, obje
 ctStack, this);\n        if (coordinates) {\n            return new MultiPoint(coordinates);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiLineString|undefined} MultiLineString.\n     */\n    GMLBase.prototype.readMultiLineString = function (node, objectStack) {\n        /** @type {Array<LineString>} */\n        var lineStrings = pushParseAndPop([], this.MULTILINESTRING_PARSERS, node, objectStack, this);\n        if (lineStrings) {\n            return new MultiLineString(lineStrings);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPolygon|undefined} MultiPolygon.\n     */\n    GMLBase.prototype.readMultiPolygon = function (node, objectStack) {\n        /** @type {Array<Polygon>} */\n        var polygons = pushParseAndPop([], this.MULTIPOLYGON_PAR
 SERS, node, objectStack, this);\n        if (polygons) {\n            return new MultiPolygon(polygons);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.pointMemberParser = function (node, objectStack) {\n        parseNode(this.POINTMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.lineStringMemberParser = function (node, objectStack) {\n        parseNode(this.LINESTRINGMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.polygonMemberParser = function (node, objectStack) {\n        parseNode(this.POLYGONMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack
  Object stack.\n     * @return {LineString|undefined} LineString.\n     */\n    GMLBase.prototype.readLineString = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n            return lineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} LinearRing flat coordinates.\n     */\n    GMLBase.prototype.readFlatLinearRing = function (node, objectStack) {\n        var ring = pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n        if (ring) {\n            return ring;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param
  {Array<*>} objectStack Object stack.\n     * @return {LinearRing|undefined} LinearRing.\n     */\n    GMLBase.prototype.readLinearRing = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            return new LinearRing(flatCoordinates, GeometryLayout.XYZ);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Polygon|undefined} Polygon.\n     */\n    GMLBase.prototype.readPolygon = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var flatLinearRings = pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n        if (flatLinearRings && flatLinearRings[0]) {\n            var flatCoordinates = flatLinearRings[0];\n            var ends = [flatCoordinates.length];\n            var i = void 0, ii = void 0;\n            for (i = 1, ii = flatLinearRi
 ngs.length; i < ii; ++i) {\n                extend(flatCoordinates, flatLinearRings[i]);\n                ends.push(flatCoordinates.length);\n            }\n            return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>} Flat coordinates.\n     */\n    GMLBase.prototype.readFlatCoordinatesFromNode = function (node, objectStack) {\n        return pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} Geometry.\n     */\n    //@ts-ignore\n    GMLBase.prototype.readGeometryFromNode = function (node, opt_opt
 ions) {\n        var geometry = this.readGeometryElement(node, [\n            this.getReadOptions(node, opt_options ? opt_options : {}),\n        ]);\n        return geometry ? geometry : null;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    GMLBase.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = {\n            featureType: this.featureType,\n            featureNS: this.featureNS,\n        };\n        if (opt_options) {\n            assign(options, this.getReadOptions(node, opt_options));\n        }\n        var features = this.readFeaturesInternal(node, [options]);\n        return features || [];\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    GMLBase.prototype.readProjectionFromNode = functio
 n (node) {\n        return getProjection(this.srsName\n            ? this.srsName\n            : node.firstElementChild.getAttribute('srsName'));\n    };\n    return GMLBase;\n}(XMLFeature));\nGMLBase.prototype.namespace = GMLNS;\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTIPOINT_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeArrayPush
 er(GMLBase.prototype.pointMemberParser),\n        'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTILINESTRING_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n        'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTIPOLYGON_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n        'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.POINTMEMBER_PARSERS = {\n    'htt
 p://www.opengis.net/gml': {\n        'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.LINESTRINGMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.POLYGONMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.RING_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing),\n    },\n};\nexport default GMLBase;\n//# sourceMappingURL=GMLBase.js.map","/**\n * @module ol/format/xsd\n */\n
 import { getAllTextContent, getDocument } from '../xml.js';\nimport { padNumber } from '../string.js';\n/**\n * @param {Node} node Node.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBoolean(node) {\n    var s = getAllTextContent(node, false);\n    return readBooleanString(s);\n}\n/**\n * @param {string} string String.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBooleanString(string) {\n    var m = /^\\s*(true|1)|(false|0)\\s*$/.exec(string);\n    if (m) {\n        return m[1] !== undefined || false;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} DateTime in seconds.\n */\nexport function readDateTime(node) {\n    var s = getAllTextContent(node, false);\n    var dateTime = Date.parse(s);\n    return isNaN(dateTime) ? undefined : dateTime / 1000;\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimal(node) {\n   
  var s = getAllTextContent(node, false);\n    return readDecimalString(s);\n}\n/**\n * @param {string} string String.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimalString(string) {\n    // FIXME check spec\n    var m = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*$/i.exec(string);\n    if (m) {\n        return parseFloat(m[1]);\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeInteger(node) {\n    var s = getAllTextContent(node, false);\n    return readNonNegativeIntegerString(s);\n}\n/**\n * @param {string} string String.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeIntegerString(string) {\n    var m = /^\\s*(\\d+)\\s*$/.exec(string);\n    if (m) {\n        return parseInt(m[1], 10);\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @ret
 urn {string|undefined} String.\n */\nexport function readString(node) {\n    return getAllTextContent(node, false).trim();\n}\n/**\n * @param {Node} node Node to append a TextNode with the boolean to.\n * @param {boolean} bool Boolean.\n */\nexport function writeBooleanTextNode(node, bool) {\n    writeStringTextNode(node, bool ? '1' : '0');\n}\n/**\n * @param {Node} node Node to append a CDATA Section with the string to.\n * @param {string} string String.\n */\nexport function writeCDATASection(node, string) {\n    node.appendChild(getDocument().createCDATASection(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the dateTime to.\n * @param {number} dateTime DateTime in seconds.\n */\nexport function writeDateTimeTextNode(node, dateTime) {\n    var date = new Date(dateTime * 1000);\n    var string = date.getUTCFullYear() +\n        '-' +\n        padNumber(date.getUTCMonth() + 1, 2) +\n        '-' +\n        padNumber(date.getUTCDate(), 2) +\n        'T' +\n   
      padNumber(date.getUTCHours(), 2) +\n        ':' +\n        padNumber(date.getUTCMinutes(), 2) +\n        ':' +\n        padNumber(date.getUTCSeconds(), 2) +\n        'Z';\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} decimal Decimal.\n */\nexport function writeDecimalTextNode(node, decimal) {\n    var string = decimal.toPrecision();\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} nonNegativeInteger Non negative integer.\n */\nexport function writeNonNegativeIntegerTextNode(node, nonNegativeInteger) {\n    var string = nonNegativeInteger.toString();\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the string to.\n * @param {string} string String.\n */\nexport function writeStringTextNod
 e(node, string) {\n    node.appendChild(getDocument().createTextNode(string));\n}\n//# sourceMappingURL=xsd.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML3\n */\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPolygon from '../ge
 om/MultiPolygon.js';\nimport Polygon from '../geom/Polygon.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender, makeReplacer, makeSimpleNodeFactory, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { assign } from '../obj.js';\nimport { createOrUpdate } from '../extent.js';\nimport { extend } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { readNonNegativeIntegerString, writeStringTextNode } from './xsd.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\n/**\n * @const\n * @type {string}\n * @private\n */\nvar schemaLocation = GMLNS +\n    ' http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +\n    '1.0.0/gmlsf.xsd';\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n    'MultiLineString': 'lineStringMember',\n    'MultiCurve': 'curve
 Member',\n    'MultiPolygon': 'polygonMember',\n    'MultiSurface': 'surfaceMember',\n};\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @api\n */\nvar GML3 = /** @class */ (function (_super) {\n    __extends(GML3, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options=} opt_options Optional configuration object.\n     */\n    function GML3(opt_options) {\n        var _this = this;\n        var options = \n        /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.surface_ = options.surface !== undefined ? options.surface : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.curve_ = options.curve !== undefined ? options.
 curve : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multiCurve_ =\n            options.multiCurve !== undefined ? options.multiCurve : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multiSurface_ =\n            options.multiSurface !== undefined ? options.multiSurface : true;\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : schemaLocation;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hasZ = options.hasZ !== undefined ? options.hasZ : false;\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiLineString|undefined} MultiLineString.\n     */\n    GML3.prototype.readMultiCurve = function (node, objectStack) {\n        /** @type {Array<Li
 neString>} */\n        var lineStrings = pushParseAndPop([], this.MULTICURVE_PARSERS, node, objectStack, this);\n        if (lineStrings) {\n            var multiLineString = new MultiLineString(lineStrings);\n            return multiLineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPolygon|undefined} MultiPolygon.\n     */\n    GML3.prototype.readMultiSurface = function (node, objectStack) {\n        /** @type {Array<Polygon>} */\n        var polygons = pushParseAndPop([], this.MULTISURFACE_PARSERS, node, objectStack, this);\n        if (polygons) {\n            return new MultiPolygon(polygons);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.curveMemberParser = function (node, objectStack) {\n        parseNode(this.CURVEMEMBER_PA
 RSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.surfaceMemberParser = function (node, objectStack) {\n        parseNode(this.SURFACEMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<(Array<number>)>|undefined} flat coordinates.\n     */\n    GML3.prototype.readPatch = function (node, objectStack) {\n        return pushParseAndPop([null], this.PATCHES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} flat coordinates.\n     */\n    GML3.prototype.readSegment = function (node, objectStack) {\n        return pushParseAndPop([null], this.SEGMENTS_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} 
 node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<(Array<number>)>|undefined} flat coordinates.\n     */\n    GML3.prototype.readPolygonPatch = function (node, objectStack) {\n        return pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} flat coordinates.\n     */\n    GML3.prototype.readLineStringSegment = function (node, objectStack) {\n        return pushParseAndPop([null], this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.interiorParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n
         if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings.push(flatLinearRing);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.exteriorParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings[0] = flatLinearRing;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Polygon|undefined} Polygon.\n     */\n    GML3.prototype.readSurface = function (node
 , objectStack) {\n        /** @type {Array<Array<number>>} */\n        var flatLinearRings = pushParseAndPop([null], this.SURFACE_PARSERS, node, objectStack, this);\n        if (flatLinearRings && flatLinearRings[0]) {\n            var flatCoordinates = flatLinearRings[0];\n            var ends = [flatCoordinates.length];\n            var i = void 0, ii = void 0;\n            for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n                extend(flatCoordinates, flatLinearRings[i]);\n                ends.push(flatCoordinates.length);\n            }\n            return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LineString|undefined} LineString.\n     */\n    GML3.prototype.readCurve = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoord
 inates = pushParseAndPop([null], this.CURVE_PARSERS, node, objectStack, this);\n        if (flatCoordinates) {\n            var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n            return lineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n     */\n    GML3.prototype.readEnvelope = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.ENVELOPE_PARSERS, node, objectStack, this);\n        return createOrUpdate(flatCoordinates[1][0], flatCoordinates[1][1], flatCoordinates[2][0], flatCoordinates[2][1]);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML3.proto
 type.readFlatPos = function (node, objectStack) {\n        var s = getAllTextContent(node, false);\n        var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:[eE][+\\-]?\\d+)?)\\s*/;\n        /** @type {Array<number>} */\n        var flatCoordinates = [];\n        var m;\n        while ((m = re.exec(s))) {\n            flatCoordinates.push(parseFloat(m[1]));\n            s = s.substr(m[0].length);\n        }\n        if (s !== '') {\n            return undefined;\n        }\n        var context = objectStack[0];\n        var containerSrs = context['srsName'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            axisOrientation = proj.getAxisOrientation();\n        }\n        if (axisOrientation === 'neu') {\n            var i = void 0, ii = void 0;\n            for (i = 0, ii = flatCoordinates.length; i < ii; i += 3) {\n                var y = flatCoordinates[i];\n                var x = flatCoordinates[i + 1];\n   
              flatCoordinates[i] = x;\n                flatCoordinates[i + 1] = y;\n            }\n        }\n        var len = flatCoordinates.length;\n        if (len == 2) {\n            flatCoordinates.push(0);\n        }\n        if (len === 0) {\n            return undefined;\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML3.prototype.readFlatPosList = function (node, objectStack) {\n        var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n        var context = objectStack[0];\n        var containerSrs = context['srsName'];\n        var contextDimension = context['srsDimension'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            axisOrientation = proj.getAxisOrientation();\n        }\n        var coord
 s = s.split(/\\s+/);\n        // The \"dimension\" attribute is from the GML 3.0.1 spec.\n        var dim = 2;\n        if (node.getAttribute('srsDimension')) {\n            dim = readNonNegativeIntegerString(node.getAttribute('srsDimension'));\n        }\n        else if (node.getAttribute('dimension')) {\n            dim = readNonNegativeIntegerString(node.getAttribute('dimension'));\n        }\n        else if (\n        /** @type {Element} */ (node.parentNode).getAttribute('srsDimension')) {\n            dim = readNonNegativeIntegerString(\n            /** @type {Element} */ (node.parentNode).getAttribute('srsDimension'));\n        }\n        else if (contextDimension) {\n            dim = readNonNegativeIntegerString(contextDimension);\n        }\n        var x, y, z;\n        var flatCoordinates = [];\n        for (var i = 0, ii = coords.length; i < ii; i += dim) {\n            x = parseFloat(coords[i]);\n            y = parseFloat(coords[i + 1]);\n            z = dim === 3 ? 
 parseFloat(coords[i + 2]) : 0;\n            if (axisOrientation.substr(0, 2) === 'en') {\n                flatCoordinates.push(x, y, z);\n            }\n            else {\n                flatCoordinates.push(y, x, z);\n            }\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} value Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writePos_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsDimension = hasZ ? '3' : '2';\n        node.setAttribute('srsDimension', srsDimension);\n        var srsName = context['srsName'];\n        var axisOrientation = 'enu';\n        if (srsName) {\n            axisOrientation = getProjection(srsName).getAxisOrientation();\n        }\n        var point = value.getCoordinates();\n    
     var coords;\n        // only 2d for simple features profile\n        if (axisOrientation.substr(0, 2) === 'en') {\n            coords = point[0] + ' ' + point[1];\n        }\n        else {\n            coords = point[1] + ' ' + point[0];\n        }\n        if (hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ' ' + z;\n        }\n        writeStringTextNode(node, coords);\n    };\n    /**\n     * @param {Array<number>} point Point geometry.\n     * @param {string=} opt_srsName Optional srsName\n     * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.\n     * @return {string} The coords string.\n     * @private\n     */\n    GML3.prototype.getCoords_ = function (point, opt_srsName, opt_hasZ) {\n        var axisOrientation = 'enu';\n        if (opt_srsName) {\n            axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n        }\n        var coords 
 = axisOrientation.substr(0, 2) === 'en'\n            ? point[0] + ' ' + point[1]\n            : point[1] + ' ' + point[0];\n        if (opt_hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ' ' + z;\n        }\n        return coords;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {LineString|import(\"../geom/LinearRing.js\").default} value Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writePosList_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsDimension = hasZ ? '3' : '2';\n        node.setAttribute('srsDimension', srsDimension);\n        var srsName = context['srsName'];\n        // only 2d for simple features profile\n        var points = value.getCoordinates();\n        var len = points.length;\n        var parts = ne
 w Array(len);\n        var point;\n        for (var i = 0; i < len; ++i) {\n            point = points[i];\n            parts[i] = this.getCoords_(point, srsName, hasZ);\n        }\n        writeStringTextNode(node, parts.join(' '));\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writePoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var pos = createElementNS(node.namespaceURI, 'pos');\n        node.appendChild(pos);\n        this.writePos_(pos, geometry, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {Array<*>} objectStack Node s
 tack.\n     */\n    GML3.prototype.writeEnvelope = function (node, extent, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var keys = ['lowerCorner', 'upperCorner'];\n        var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: node }), this.ENVELOPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, keys, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeLinearRing = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srs
 Name'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var posList = createElementNS(node.namespaceURI, 'posList');\n        node.appendChild(posList);\n        this.writePosList_(posList, geometry, objectStack);\n    };\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     * @private\n     */\n    GML3.prototype.RING_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var parentNode = context.node;\n        var exteriorWritten = context['exteriorWritten'];\n        if (exteriorWritten === undefined) {\n            context['exteriorWritten'] = true;\n        }\n        return createElementNS(parentNode.namespaceURI, exteriorWritten !== undefined ? 'interior' : 'exterior');\n    };\n    /**\n     * @param {Element} node Node.\n     * @pa
 ram {Polygon} geometry Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'PolygonPatch' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n            var rings = geometry.getLinearRings();\n            pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, rings, objectStack, undefined, this);\n        }\n        else if (node.nodeName === 'Surface') {\n            var patches = createElementNS(node.namespaceURI, 'patches');\n            node.appendChild(patches);\n            this.writeSurfacePatches_(patches, geometry, objectStack);\n     
    }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {LineString} geometry LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'LineStringSegment' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'LineString' ||\n            node.nodeName === 'LineStringSegment') {\n            var posList = createElementNS(node.namespaceURI, 'posList');\n            node.appendChild(posList);\n            this.writePosList_(posList, geometry, objectStack);\n        }\n        else if (node.nodeName === 'Curve') {\n            var segments = createElementNS(node.namespaceURI, 'segments');\n            node.appendChild(segments);\n            this.writeCurveSegments_(segments, ge
 ometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {MultiPolygon} geometry MultiPolygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var surface = context['surface'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var polygons = geometry.getPolygons();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, surface: surface }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons, objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n     * @param {Array<*>
 } objectStack Node stack.\n     */\n    GML3.prototype.writeMultiPoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        var hasZ = context['hasZ'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var points = geometry.getPoints();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.POINTMEMBER_SERIALIZERS, makeSimpleNodeFactory('pointMember'), points, objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {MultiLineString} geometry MultiLineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var curve 
 = context['curve'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var lines = geometry.getLineStrings();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, curve: curve }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeRing = function (node, ring, objectStack) {\n        var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n        node.appendChild(linearRing);\n        this.writeLinearRing(linearRing, ring, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Polygon} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeSurface
 OrPolygonMember = function (node, polygon, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(polygon, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeSurfaceOrPolygon(child, polygon, objectStack);\n        }\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Point.js\").default} point Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writePointMember = function (node, point, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'Point');\n        node.appendChild(child);\n        this.writePoint(child, point, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {LineString} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeLineStringOrCurveMember = function (node, line, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(line, objec
 tStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeCurveOrLineString(child, line, objectStack);\n        }\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Polygon} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeSurfacePatches_ = function (node, polygon, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n        node.appendChild(child);\n        this.writeSurfaceOrPolygon(child, polygon, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {LineString} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeCurveSegments_ = function (node, line, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'LineStringSegment');\n        node.appendChild(child);\n        this.writeCurveOrLineString(child, l
 ine, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeGeometryElement = function (node, geometry, objectStack) {\n        var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n        var item = assign({}, context);\n        item['node'] = node;\n        var value;\n        if (Array.isArray(geometry)) {\n            value = transformExtentWithOptions(\n            /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n        }\n        else {\n            value = transformGeometryWithOptions(\n            /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), this.GEO
 METRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [value], objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeFeatureElement = function (node, feature, objectStack) {\n        var fid = feature.getId();\n        if (fid) {\n            node.setAttribute('fid', /** @type {string} */ (fid));\n        }\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureNS = context['featureNS'];\n        var geometryName = feature.getGeometryName();\n        if (!context.serializers) {\n            context.serializers = {};\n            context.serializers[featureNS] = {};\n        }\n        var keys = [];\n        var values = [];\n        if (feature.hasProperties()) {\n            var properties = feature.getProperties();\n            for (var key in properties) {\n
                 var value = properties[key];\n                if (value !== null) {\n                    keys.push(key);\n                    values.push(value);\n                    if (key == geometryName ||\n                        typeof ( /** @type {?} */(value).getSimplifiedGeometry) ===\n                            'function') {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(this.writeGeometryElement, this);\n                        }\n                    }\n                    else {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(writeStringTextNode);\n                        }\n                    }\n                }\n            }\n        }\n        var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @ty
 pe {import(\"../xml.js\").NodeStackItem} */\n        (item), context.serializers, makeSimpleNodeFactory(undefined, featureNS), values, objectStack, keys);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeFeatureMembers_ = function (node, features, objectStack) {\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureType = context['featureType'];\n        var featureNS = context['featureNS'];\n        /** @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>} */\n        var serializers = {};\n        serializers[featureNS] = {};\n        serializers[featureNS][featureType] = makeChildAppender(this.writeFeatureElement, this);\n        var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type 
 {import(\"../xml.js\").NodeStackItem} */\n        (item), serializers, makeSimpleNodeFactory(featureType, featureNS), features, objectStack);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node|undefined} Node.\n     * @private\n     */\n    GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS(this.namespace, MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Element|undefined} Node.\n     * @private\n     */\n    GML3.prototype.GEOMETRY_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = obj
 ectStack[objectStack.length - 1];\n        var multiSurface = context['multiSurface'];\n        var surface = context['surface'];\n        var curve = context['curve'];\n        var multiCurve = context['multiCurve'];\n        var nodeName;\n        if (!Array.isArray(value)) {\n            nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n            if (nodeName === 'MultiPolygon' && multiSurface === true) {\n                nodeName = 'MultiSurface';\n            }\n            else if (nodeName === 'Polygon' && surface === true) {\n                nodeName = 'Surface';\n            }\n            else if (nodeName === 'LineString' && curve === true) {\n                nodeName = 'Curve';\n            }\n            else if (nodeName === 'MultiLineString' && multiCurve === true) {\n                nodeName = 'MultiCurve';\n            }\n        }\n        else {\n            nodeName = 'Envelope';\n        }\n        return createElementNS(thi
 s.namespace, nodeName);\n    };\n    /**\n     * Encode a geometry in GML 3.1.1 Simple Features.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     * @api\n     */\n    GML3.prototype.writeGeometryNode = function (geometry, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var geom = createElementNS(this.namespace, 'geom');\n        var context = {\n            node: geom,\n            hasZ: this.hasZ,\n            srsName: this.srsName,\n            curve: this.curve_,\n            surface: this.surface_,\n            multiSurface: this.multiSurface_,\n            multiCurve: this.multiCurve_,\n        };\n        if (opt_options) {\n            assign(context, opt_options);\n        }\n        this.writeGeometryElement(geom, geometry, [context]);\n        return geom;\n    };\n    /**\n     * Encode an array o
 f features in the GML 3.1.1 format as an XML node.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Element} Node.\n     * @api\n     */\n    GML3.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var node = createElementNS(this.namespace, 'featureMembers');\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation);\n        var context = {\n            srsName: this.srsName,\n            hasZ: this.hasZ,\n            curve: this.curve_,\n            surface: this.surface_,\n            multiSurface: this.multiSurface_,\n            multiCurve: this.multiCurve_,\n            featureNS: this.featureNS,\n            featureType: this.featureType,\n        };\n        if (opt_options) {\n            assign(context, opt_options);\n        }\n 
        this.writeFeatureMembers_(node, features, [context]);\n        return node;\n    };\n    return GML3;\n}(GMLBase));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'pos': makeReplacer(GML3.prototype.readFlatPos),\n        'posList': makeReplacer(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'interior': GML3.prototype.interiorParser,\n        'exterior': GML3.prototype.exteriorParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeRepl
 acer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Surface': makeReplacer(GML3.prototype.readSurface),\n        'MultiSurface': makeReplacer(GML3.prototype.readMultiSurface),\n        'Curve': makeReplacer(GML3.prototype.readCurve),\n        'MultiCurve': makeReplacer(GML3.prototype.readMultiCurve),\n        'Envelope': makeReplacer(GML3.prototype.readEnvelope),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.MULTICURVE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'curveMember': makeArrayPusher(GML3.prototype.curveMemberParser),\n        'cur
 veMembers': makeArrayPusher(GML3.prototype.curveMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.MULTISURFACE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n        'surfaceMembers': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.CURVEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n        'Curve': makeArrayPusher(GML3.prototype.readCurve),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SURFACEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n        'Surface': 
 makeArrayPusher(GML3.prototype.readSurface),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SURFACE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'patches': makeReplacer(GML3.prototype.readPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.CURVE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'segments': makeReplacer(GML3.prototype.readSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.ENVELOPE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n        'upperCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.PATCHES_PARSERS = {\n    
 'http://www.opengis.net/gml': {\n        'PolygonPatch': makeReplacer(GML3.prototype.readPolygonPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SEGMENTS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineStringSegment': makeReplacer(GML3.prototype.readLineStringSegment),\n    },\n};\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {string} Result.\n * @api\n */\nGML3.prototype.writeFeatures;\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'exterior': makeChildAppender(GML3.prototype.writeRing),\n        'interior': makeChildAppender(GML3.prototype.writeRing),\n    },\n};\n/**\n * 
 @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeChildAppender(GML3.prototype.writePointMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializ
 er>>}\n */\nGML3.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'Curve': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML3.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML3.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML3.prototype.writeLi
 nearRing),\n        'Polygon': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML3.prototype.writeEnvelope),\n    },\n};\nexport default GML3;\n//# sourceMappingURL=GML3.js.map","/**\n * @module ol/format/GML\n */\nimport GML3 from './GML3.js';\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @param {import(\"./GMLBase.js\").Options=} opt_options\n *     Optional configuration object.\n * @api\n */\nvar GML = GML3;\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Fea
 tures.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {string} Result.\n * @api\n */\nGML.prototype.writeFeatures;\n/**\n * Encode an array of features in the GML 3.1.1 format as an XML node.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {Node} Node.\n * @api\n */\nGML.prototype.writeFeaturesNode;\nexport default GML;\n//# sourceMappingURL=GML.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.const
 ructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML2\n */\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender, makeReplacer, makeSimpleNodeFactory, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { assign } from '../obj.js';\nimport { createOrUpdate } from '../extent.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\nimport { writeStringTextNode } from './xsd.js';\n/**\n * @const\n * @type {string}\n */\nvar schemaLocation = GMLNS + ' http://schemas.opengis.net/gml/2.1.2/feature.xsd';\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n    'MultiLineString': 'lineStringMember',\n    'MultiCurve': 'curveMember',\n    
 'MultiPolygon': 'polygonMember',\n    'MultiSurface': 'surfaceMember',\n};\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format,\n * version 2.1.2.\n *\n * @api\n */\nvar GML2 = /** @class */ (function (_super) {\n    __extends(GML2, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options=} opt_options Optional configuration object.\n     */\n    function GML2(opt_options) {\n        var _this = this;\n        var options = \n        /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        _this.FEATURE_COLLECTION_PARSERS[GMLNS]['featureMember'] = makeArrayPusher(_this.readFeaturesInternal);\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : schemaLocation;\n        return _this;\n    }\n    /**\n     * @param {Node} node Node.\n     * @
 param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML2.prototype.readFlatCoordinates = function (node, objectStack) {\n        var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n        var context = /** @type {import(\"../xml.js\").NodeStackItem} */ (objectStack[0]);\n        var containerSrs = context['srsName'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            if (proj) {\n                axisOrientation = proj.getAxisOrientation();\n            }\n        }\n        var coordsGroups = s.trim().split(/\\s+/);\n        var flatCoordinates = [];\n        for (var i = 0, ii = coordsGroups.length; i < ii; i++) {\n            var coords = coordsGroups[i].split(/,+/);\n            var x = parseFloat(coords[0]);\n            var y = parseFloat(coords[1]);\n            var z = coords.length === 3 ? parseFloat(coords[2]) :
  0;\n            if (axisOrientation.substr(0, 2) === 'en') {\n                flatCoordinates.push(x, y, z);\n            }\n            else {\n                flatCoordinates.push(y, x, z);\n            }\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n     */\n    GML2.prototype.readBox = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.BOX_PARSERS_, node, objectStack, this);\n        return createOrUpdate(flatCoordinates[1][0], flatCoordinates[1][1], flatCoordinates[1][3], flatCoordinates[1][4]);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML2.prototype.innerBoundaryIsParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n
         var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings.push(flatLinearRing);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML2.prototype.outerBoundaryIsParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings[0] = flatLinearRing;\n        }\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectSt
 ack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Element|undefined} Node.\n     * @private\n     */\n    GML2.prototype.GEOMETRY_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var multiSurface = context['multiSurface'];\n        var surface = context['surface'];\n        var multiCurve = context['multiCurve'];\n        var nodeName;\n        if (!Array.isArray(value)) {\n            nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n            if (nodeName === 'MultiPolygon' && multiSurface === true) {\n                nodeName = 'MultiSurface';\n            }\n            else if (nodeName === 'Polygon' && surface === true) {\n                nodeName = 'Surface';\n            }\n            else if (nodeName === 'MultiLineString' && multiCurve === true) {\n                nodeName = 'MultiCurve';\n            }\n        }\n     
    else {\n            nodeName = 'Envelope';\n        }\n        return createElementNS('http://www.opengis.net/gml', nodeName);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeFeatureElement = function (node, feature, objectStack) {\n        var fid = feature.getId();\n        if (fid) {\n            node.setAttribute('fid', /** @type {string} */ (fid));\n        }\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureNS = context['featureNS'];\n        var geometryName = feature.getGeometryName();\n        if (!context.serializers) {\n            context.serializers = {};\n            context.serializers[featureNS] = {};\n        }\n        var keys = [];\n        var values = [];\n        if (feature.hasProperties()) {\n            var properties = feature.getProperties();\n 
            for (var key in properties) {\n                var value = properties[key];\n                if (value !== null) {\n                    keys.push(key);\n                    values.push(value);\n                    if (key == geometryName ||\n                        typeof ( /** @type {?} */(value).getSimplifiedGeometry) ===\n                            'function') {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(this.writeGeometryElement, this);\n                        }\n                    }\n                    else {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(writeStringTextNode);\n                        }\n                    }\n                }\n            }\n        }\n        var item = assign({}, context);\n        item.node = node;\n   
      pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), context.serializers, makeSimpleNodeFactory(undefined, featureNS), values, objectStack, keys);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LineString.js\").default} geometry LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'LineStringSegment' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'LineString' ||\n            node.nodeName === 'LineStringSegment') {\n            var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n            node.appendChild(coordinates);\n            this.writeCoordinates_(coordinates, geometry,
  objectStack);\n        }\n        else if (node.nodeName === 'Curve') {\n            var segments = createElementNS(node.namespaceURI, 'segments');\n            node.appendChild(segments);\n            this.writeCurveSegments_(segments, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeLineStringOrCurveMember = function (node, line, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeCurveOrLineString(child, line, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry MultiLineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.
 writeMultiCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var curve = context['curve'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var lines = geometry.getLineStrings();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, curve: curve }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeGeometryElement = function (node, geometry, objectStack) {\n        var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.
 length - 1]);\n        var item = assign({}, context);\n        item['node'] = node;\n        var value;\n        if (Array.isArray(geometry)) {\n            value = transformExtentWithOptions(\n            /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n        }\n        else {\n            value = transformGeometryWithOptions(\n            /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [value], objectStack, undefined, this);\n    };\n    /**\n     * @param {string} namespaceURI XML namespace.\n     * @returns {Element} coordinates node.\n     * @private\n     */\n    GML2.prototype.createCoordinatesNode_ = function (namespaceURI) {\n        var coordinates = createElementNS(namespaceURI, 'coordinates');\n        coordinates.setAttribute('decimal', '.')
 ;\n        coordinates.setAttribute('cs', ',');\n        coordinates.setAttribute('ts', ' ');\n        return coordinates;\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LineString.js\").default|import(\"../geom/LinearRing.js\").default} value Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeCoordinates_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        // only 2d for simple features profile\n        var points = value.getCoordinates();\n        var len = points.length;\n        var parts = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            var point = points[i];\n            parts[i] = this.getCoords_(point, srsName, hasZ);\n        }\n        writeStringTextNode(node, parts.join(' '));\n    };\n    /**\n     * @param {Node} node 
 Node.\n     * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeCurveSegments_ = function (node, line, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'LineStringSegment');\n        node.appendChild(child);\n        this.writeCurveOrLineString(child, line, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'PolygonPatch' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === '
 Polygon' || node.nodeName === 'PolygonPatch') {\n            var rings = geometry.getLinearRings();\n            pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, rings, objectStack, undefined, this);\n        }\n        else if (node.nodeName === 'Surface') {\n            var patches = createElementNS(node.namespaceURI, 'patches');\n            node.appendChild(patches);\n            this.writeSurfacePatches_(patches, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     * @private\n     */\n    GML2.prototype.RING_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var parentNode = context.node;\n        var exteriorWritten = context['exteriorWritten'];\n        if (exteriorWri
 tten === undefined) {\n            context['exteriorWritten'] = true;\n        }\n        return createElementNS(parentNode.namespaceURI, exteriorWritten !== undefined ? 'innerBoundaryIs' : 'outerBoundaryIs');\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeSurfacePatches_ = function (node, polygon, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n        node.appendChild(child);\n        this.writeSurfaceOrPolygon(child, polygon, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeRing = function (node, ring, objectStack) {\n        var linearRing = createElementNS(node.namespaceURI,
  'LinearRing');\n        node.appendChild(linearRing);\n        this.writeLinearRing(linearRing, ring, objectStack);\n    };\n    /**\n     * @param {Array<number>} point Point geometry.\n     * @param {string=} opt_srsName Optional srsName\n     * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.\n     * @return {string} The coords string.\n     * @private\n     */\n    GML2.prototype.getCoords_ = function (point, opt_srsName, opt_hasZ) {\n        var axisOrientation = 'enu';\n        if (opt_srsName) {\n            axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n        }\n        var coords = axisOrientation.substr(0, 2) === 'en'\n            ? point[0] + ',' + point[1]\n            : point[1] + ',' + point[0];\n        if (opt_hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ',' + z;\n        }\n        return coords;\n    };\n    /**\n     * @para
 m {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writePoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n        node.appendChild(coordinates);\n        var point = geometry.getCoordinates();\n        var coord = this.getCoords_(point, srsName, hasZ);\n        writeStringTextNode(coordinates, coord);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiPoint = function (node, geometr
 y, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var points = geometry.getPoints();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.POINTMEMBER_SERIALIZERS, makeSimpleNodeFactory('pointMember'), points, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Point.js\").default} point Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writePointMember = function (node, point, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'Point');\n        node.appendChild(child);\n        this.writePoint(child, point, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default}
  geometry LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeLinearRing = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n        node.appendChild(coordinates);\n        this.writeCoordinates_(coordinates, geometry, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var surfac
 e = context['surface'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var polygons = geometry.getPolygons();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, surface: surface }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeSurfaceOrPolygonMember = function (node, polygon, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(polygon, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeSurfaceOrPolygon(child, polygon, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @pa
 ram {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeEnvelope = function (node, extent, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var keys = ['lowerCorner', 'upperCorner'];\n        var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: node }), this.ENVELOPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, keys, this);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node|undefined} Node.\n     * @private\n     */\n    GML2.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        
 var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS('http://www.opengis.net/gml', MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n    };\n    return GML2;\n}(GMLBase));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'innerBoundaryIs': GML2.prototype.innerBoundaryIsParser,\n        'outerBoundaryIs': GML2.prototype.outerBoundaryIsParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.BOX_PARSERS_ = {\n    'http://www.opengis.net/gml': {\n        'coordinates': 
 makeArrayPusher(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Box': makeReplacer(GML2.prototype.readBox),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'Curve': makeChild
 Appender(GML2.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML2.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML2.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML2.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML2.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML2.prototype.writeEnvelope),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").
 Serializer>>}\n */\nGML2.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'outerBoundaryIs': makeChildAppender(GML2.prototype.writeRing),\n        'innerBoundaryIs': makeChildAppender(GML2.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeChildAppender(GML2.prototype.writePointMember),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.SUR
 FACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\nexport default GML2;\n//# sourceMappingURL=GML2.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\
 n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML32\n */\nimport GML3 from './GML3.js';\nimport GMLBase from './GMLBase.js';\nimport { makeArrayPusher, makeChildAppender, makeReplacer } from '../xml.js';\nimport { writeStringTextNode } from '../format/xsd.js';\n/**\n * @classdesc Feature format for reading and writing data in the GML format\n *            version 3.2.1.\n * @api\n */\nvar GML32 = /** @class */ (function (_super) {\n    __extends(GML32, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options=} opt_options Optional configuration object.\n     */\n    function GML32(opt_options) {\n        var _this = this;\n        var options = /** @type {import(\"./GMLBase.js\").Options} */ (opt_options\n            ? opt_options\n            : {});\n        _this = _
 super.call(this, options) || this;\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : _this.namespace + ' http://schemas.opengis.net/gml/3.2.1/gml.xsd';\n        return _this;\n    }\n    return GML32;\n}(GML3));\nGML32.prototype.namespace = 'http://www.opengis.net/gml/3.2';\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pos': makeReplacer(GML3.prototype.readFlatPos),\n        'posList': makeReplacer(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'interior': GML3.prototype.interiorParser,\n        'exterior': GML3.prototype.exteriorParser,
 \n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Surface': makeReplacer(GML32.prototype.readSurface),\n        'MultiSurface': makeReplacer(GML3.prototype.readMultiSurface),\n        'Curve': makeReplacer(GML32.prototype.readCurve),\n        'MultiCurve': makeReplacer(GML3.prototype.readMultiCurve),\n        'Envelope': makeReplacer(GML32.prototype.read
 Envelope),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTICURVE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'curveMember': makeArrayPusher(GML3.prototype.curveMemberParser),\n        'curveMembers': makeArrayPusher(GML3.prototype.curveMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTISURFACE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'surfaceMember': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n        'surfaceMembers': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.CURVEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n        'Curve': makeArrayPusher(GML3
 .prototype.readCurve),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SURFACEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n        'Surface': makeArrayPusher(GML3.prototype.readSurface),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SURFACE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'patches': makeReplacer(GML3.prototype.readPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.CURVE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'segments': makeReplacer(GML3.prototype.readSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.ENVELOPE_PARSERS = {\n    'http://www.o
 pengis.net/gml/3.2': {\n        'lowerCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n        'upperCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.PATCHES_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'PolygonPatch': makeReplacer(GML3.prototype.readPolygonPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SEGMENTS_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineStringSegment': makeReplacer(GML3.prototype.readLineStringSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTIPOINT_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n        'pointMembers': makeArrayPusher
 (GMLBase.prototype.pointMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTILINESTRING_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n        'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTIPOLYGON_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n        'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.POINTMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Point': makeArrayPusher(GMLBase.proto
 type.readFlatCoordinatesFromNode),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.LINESTRINGMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.POLYGONMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.RING_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n  
       'exterior': makeChildAppender(GML3.prototype.writeRing),\n        'interior': makeChildAppender(GML3.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'surfaceMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {
 \n        'pointMember': makeChildAppender(GML3.prototype.writePointMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lineStringMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Curve': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML32.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML3.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML3.prototype.wri
 teCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML3.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML3.prototype.writeEnvelope),\n    },\n};\nexport default GML32;\n//# sourceMappingURL=GML32.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n     
    return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GPX\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport Point from '../geom/Point.js';\nimport XMLFeature from './XMLFeature.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender, makeObjectPropertySetter, makeSequence, makeSimpleNodeFactory, makeStructureNS, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { get as getProjection } from '../proj.js';\nimport { includes } from
  '../array.js';\nimport { readDateTime, readDecimal, readNonNegativeInteger, readString, writeDateTimeTextNode, writeDecimalTextNode, writeNonNegativeIntegerTextNode, writeStringTextNode, } from './xsd.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n    null,\n    'http://www.topografix.com/GPX/1/0',\n    'http://www.topografix.com/GPX/1/1',\n];\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +\n    'http://www.topografix.com/GPX/1/1/gpx.xsd';\n/**\n * @const\n * @type {Object<string, function(Node, Array<*>): (Feature|undefined)>}\n */\nvar FEATURE_READER = {\n    'rte': readRte,\n    'trk': readTrk,\n    'wpt': readWpt,\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GPX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'rte': makeArrayPusher(readRte),\n    'trk': mak
 eArrayPusher(readTrk),\n    'wpt': makeArrayPusher(readWpt),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'text': makeObjectPropertySetter(readString, 'linkText'),\n    'type': makeObjectPropertySetter(readString, 'linkType'),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar GPX_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'rte': makeChildAppender(writeRte),\n    'trk': makeChildAppender(writeTrk),\n    'wpt': makeChildAppender(writeWpt),\n});\n/**\n * @typedef {Object} Options\n * @property {function(Feature, Node):void} [readExtensions] Callback function\n * to process `extensions` nodes. To prevent memory leaks, this callback function must\n * not store any references to the node. Note that the `extensions`\n * node is not allowed in GPX 1.0. Moreover, only `extensions`\n *
  nodes from `wpt`, `rte` and `trk` can be processed, as those are\n * directly mapped to a feature.\n */\n/**\n * @typedef {Object} LayoutOptions\n * @property {boolean} [hasZ]\n * @property {boolean} [hasM]\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the GPX format.\n *\n * Note that {@link module:ol/format/GPX~GPX#readFeature} only reads the first\n * feature of the source.\n *\n * When reading, routes (`<rte>`) are converted into LineString geometries, and\n * tracks (`<trk>`) into MultiLineString. Any properties on route and track\n * waypoints are ignored.\n *\n * When writing, LineString geometries are output as routes (`<rte>`), and\n * MultiLineString as tracks (`<trk>`).\n *\n * @api\n */\nvar GPX = /** @class */ (function (_super) {\n    __extends(GPX, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function GPX(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? 
 opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @type {function(Feature, Node): void|undefined}\n         * @private\n         */\n        _this.readExtensions_ = options.readExtensions;\n        return _this;\n    }\n    /**\n     * @param {Array<Feature>} features List of features.\n     * @private\n     */\n    GPX.prototype.handleReadExtensions_ = function (features) {\n        if (!features) {\n            features = [];\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            var feature = features[i];\n            if (this.readExtensions_) {\n                var extensionsNode = feature.get('extensionsNode_') || null;\n                this.readExtensions_(feature, extensionsNode);\n            }\n            feature.set('extensionsNode_', undefined);\n        }\n    };\n    /**\n     * @param {Element} node
  Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    GPX.prototype.readFeatureFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return null;\n        }\n        var featureReader = FEATURE_READER[node.localName];\n        if (!featureReader) {\n            return null;\n        }\n        var feature = featureReader(node, [\n            this.getReadOptions(node, opt_options),\n        ]);\n        if (!feature) {\n            return null;\n        }\n        this.handleReadExtensions_([feature]);\n        return feature;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    GPX.prototype.readFeaturesFromNode = function (node, opt_options) {\n        if (!inclu
 des(NAMESPACE_URIS, node.namespaceURI)) {\n            return [];\n        }\n        if (node.localName == 'gpx') {\n            /** @type {Array<Feature>} */\n            var features = pushParseAndPop([], GPX_PARSERS, node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (features) {\n                this.handleReadExtensions_(features);\n                return features;\n            }\n            else {\n                return [];\n            }\n        }\n        return [];\n    };\n    /**\n     * Encode an array of features in the GPX format as an XML node.\n     * LineString geometries are output as routes (`<rte>`), and MultiLineString\n     * as tracks (`<trk>`).\n     *\n     * @param {Array<Feature>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n     * @api\n     */\n    GPX.prototype.writeFeaturesNode = function (features, opt_options) {\n       
  opt_options = this.adaptOptions(opt_options);\n        //FIXME Serialize metadata\n        var gpx = createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');\n        var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n        gpx.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n        gpx.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n        gpx.setAttribute('version', '1.1');\n        gpx.setAttribute('creator', 'OpenLayers');\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: gpx }), GPX_SERIALIZERS, GPX_NODE_FACTORY, features, [opt_options]);\n        return gpx;\n    };\n    return GPX;\n}(XMLFeature));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar RTE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'd
 esc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n    'type': makeObjectPropertySetter(readString),\n    'rtept': parseRtePt,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar RTEPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySe
 tter(readNonNegativeInteger),\n    'type': makeObjectPropertySetter(readString),\n    'extensions': parseExtensions,\n    'trkseg': parseTrkSeg,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRKSEG_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'trkpt': parseTrkPt,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRKPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n    'magvar': makeObjectPropertySetter(readDecimal),\n    'geoidheight': makeObjectPropertySetter(readDecimal),
 \n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'sym': makeObjectPropertySetter(readString),\n    'type': makeObjectPropertySetter(readString),\n    'fix': makeObjectPropertySetter(readString),\n    'sat': makeObjectPropertySetter(readNonNegativeInteger),\n    'hdop': makeObjectPropertySetter(readDecimal),\n    'vdop': makeObjectPropertySetter(readDecimal),\n    'pdop': makeObjectPropertySetter(readDecimal),\n    'ageofdgpsdata': makeObjectPropertySetter(readDecimal),\n    'dgpsid': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n});\n/**\n * @const\n * @type {Array<string>}\n */\nvar LINK_SEQUENCE = ['text', 'type'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LINK_SERIALIZERS = makeStructu
 reNS(NAMESPACE_URIS, {\n    'text': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar RTE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'number',\n    'type',\n    'rtept',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar RTE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'rtept': makeArraySerializer(makeChildAppender(writeWptType)),\n});\n/**\
 n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar RTEPT_TYPE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['ele', 'time']);\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar TRK_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'number',\n    'type',\n    'trkseg',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar TRK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'trkseg': makeArraySerializer(makeChildAppender(writeTrk
 Seg)),\n});\n/**\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar TRKSEG_NODE_FACTORY = makeSimpleNodeFactory('trkpt');\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar TRKSEG_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'trkpt': makeChildAppender(writeWptType),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar WPT_TYPE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'ele',\n    'time',\n    'magvar',\n    'geoidheight',\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'sym',\n    'type',\n    'fix',\n    'sat',\n    'hdop',\n    'vdop',\n    'pdop',\n    'ageofdgpsdata',\n    'dgpsid',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar WPT_TYPE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeChildAppender(writeDecimalTextNode),\n
     'time': makeChildAppender(writeDateTimeTextNode),\n    'magvar': makeChildAppender(writeDecimalTextNode),\n    'geoidheight': makeChildAppender(writeDecimalTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'sym': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'fix': makeChildAppender(writeStringTextNode),\n    'sat': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'hdop': makeChildAppender(writeDecimalTextNode),\n    'vdop': makeChildAppender(writeDecimalTextNode),\n    'pdop': makeChildAppender(writeDecimalTextNode),\n    'ageofdgpsdata': makeChildAppender(writeDecimalTextNode),\n    'dgpsid': makeChildAppender(writeNonNegativeIntegerTextNode),\n});\n/**\n * @const\n * @type {Object<string, string>}\n */
 \nvar GEOMETRY_TYPE_TO_NODENAME = {\n    'Point': 'wpt',\n    'LineString': 'rte',\n    'MultiLineString': 'trk',\n};\n/**\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nfunction GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {\n    var geometry = /** @type {Feature} */ (value).getGeometry();\n    if (geometry) {\n        var nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];\n        if (nodeName) {\n            var parentNode = objectStack[objectStack.length - 1].node;\n            return createElementNS(parentNode.namespaceURI, nodeName);\n        }\n    }\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Element} node Node.\n * @param {!Object} values Values.\n * @return {Array<number>} Flat coordinates.\n */\nfunction appendCoordinate(flatCoordinates, layoutOptions, n
 ode, values) {\n    flatCoordinates.push(parseFloat(node.getAttribute('lon')), parseFloat(node.getAttribute('lat')));\n    if ('ele' in values) {\n        flatCoordinates.push(/** @type {number} */ (values['ele']));\n        delete values['ele'];\n        layoutOptions.hasZ = true;\n    }\n    else {\n        flatCoordinates.push(0);\n    }\n    if ('time' in values) {\n        flatCoordinates.push(/** @type {number} */ (values['time']));\n        delete values['time'];\n        layoutOptions.hasM = true;\n    }\n    else {\n        flatCoordinates.push(0);\n    }\n    return flatCoordinates;\n}\n/**\n * Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates\n * and ends arrays by shrinking them accordingly (removing unused zero entries).\n *\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {Array<number>=} ends Ends.\n * @return {import(\"../geom/GeometryLayout.js\").default} L
 ayout.\n */\nfunction applyLayoutOptions(layoutOptions, flatCoordinates, ends) {\n    var layout = GeometryLayout.XY;\n    var stride = 2;\n    if (layoutOptions.hasZ && layoutOptions.hasM) {\n        layout = GeometryLayout.XYZM;\n        stride = 4;\n    }\n    else if (layoutOptions.hasZ) {\n        layout = GeometryLayout.XYZ;\n        stride = 3;\n    }\n    else if (layoutOptions.hasM) {\n        layout = GeometryLayout.XYM;\n        stride = 3;\n    }\n    if (stride !== 4) {\n        for (var i = 0, ii = flatCoordinates.length / 4; i < ii; i++) {\n            flatCoordinates[i * stride] = flatCoordinates[i * 4];\n            flatCoordinates[i * stride + 1] = flatCoordinates[i * 4 + 1];\n            if (layoutOptions.hasZ) {\n                flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 2];\n            }\n            if (layoutOptions.hasM) {\n                flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 3];\n            }\n        }\n        flatCoor
 dinates.length = (flatCoordinates.length / 4) * stride;\n        if (ends) {\n            for (var i = 0, ii = ends.length; i < ii; i++) {\n                ends[i] = (ends[i] / 4) * stride;\n            }\n        }\n    }\n    return layout;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseLink(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var href = node.getAttribute('href');\n    if (href !== null) {\n        values['link'] = href;\n    }\n    parseNode(LINK_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseExtensions(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values['extensionsNode_'] = node;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseRtePt(node, objectSta
 ck) {\n    var values = pushParseAndPop({}, RTEPT_PARSERS, node, objectStack);\n    if (values) {\n        var rteValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var flatCoordinates = /** @type {Array<number>} */ (rteValues['flatCoordinates']);\n        var layoutOptions = /** @type {LayoutOptions} */ (rteValues['layoutOptions']);\n        appendCoordinate(flatCoordinates, layoutOptions, node, values);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkPt(node, objectStack) {\n    var values = pushParseAndPop({}, TRKPT_PARSERS, node, objectStack);\n    if (values) {\n        var trkValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var flatCoordinates = /** @type {Array<number>} */ (trkValues['flatCoordinates']);\n        var layoutOptions = /** @type {LayoutOptions} */ (trkValues['layoutOptions']);\n        appendCoordinate(flatCoordinates, layoutOptions, 
 node, values);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkSeg(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    parseNode(TRKSEG_PARSERS, node, objectStack);\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    var ends = /** @type {Array<number>} */ (values['ends']);\n    ends.push(flatCoordinates.length);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readRte(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({\n        'flatCoordinates': [],\n        'layoutOptions': {},\n    }, RTE_PARSERS, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var flatCoordinates = \n    /** @type {Array<number>
 } */\n    (values['flatCoordinates']);\n    delete values['flatCoordinates'];\n    var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n    delete values['layoutOptions'];\n    var layout = applyLayoutOptions(layoutOptions, flatCoordinates);\n    var geometry = new LineString(flatCoordinates, layout);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readTrk(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({\n        'flatCoordinates': [],\n        'ends': [],\n        'layoutOptions': {},\n    }, TRK_PARSERS, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var flatCoordinates = \n 
    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    delete values['flatCoordinates'];\n    var ends = /** @type {Array<number>} */ (values['ends']);\n    delete values['ends'];\n    var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n    delete values['layoutOptions'];\n    var layout = applyLayoutOptions(layoutOptions, flatCoordinates, ends);\n    var geometry = new MultiLineString(flatCoordinates, layout, ends);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Waypoint.\n */\nfunction readWpt(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);\n    if (!values) {\n        return
  undefined;\n    }\n    var layoutOptions = /** @type {LayoutOptions} */ ({});\n    var coordinates = appendCoordinate([], layoutOptions, node, values);\n    var layout = applyLayoutOptions(layoutOptions, coordinates);\n    var geometry = new Point(coordinates, layout);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {string} value Value for the link's `href` attribute.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLink(node, value, objectStack) {\n    node.setAttribute('href', value);\n    var context = objectStack[objectStack.length - 1];\n    var properties = context['properties'];\n    var link = [properties['linkText'], properties['linkType']];\n    pushSerializeAndPop(\n    /** @type {import(\"../xml.js\").NodeStackItem} */ ({ node: node }), LINK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, li
 nk, objectStack, LINK_SEQUENCE);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWptType(node, coordinate, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var parentNode = context.node;\n    var namespaceURI = parentNode.namespaceURI;\n    var properties = context['properties'];\n    //FIXME Projection handling\n    node.setAttributeNS(null, 'lat', String(coordinate[1]));\n    node.setAttributeNS(null, 'lon', String(coordinate[0]));\n    var geometryLayout = context['geometryLayout'];\n    switch (geometryLayout) {\n        case GeometryLayout.XYZM:\n            if (coordinate[3] !== 0) {\n                properties['time'] = coordinate[3];\n            }\n        // fall through\n        case GeometryLayout.XYZ:\n            if (coordinate[2] !== 0) {\n                properties['ele'] = coordinate[2];\n            }\n  
           break;\n        case GeometryLayout.XYM:\n            if (coordinate[2] !== 0) {\n                properties['time'] = coordinate[2];\n            }\n            break;\n        default:\n        // pass\n    }\n    var orderedKeys = node.nodeName == 'rtept'\n        ? RTEPT_TYPE_SEQUENCE[namespaceURI]\n        : WPT_TYPE_SEQUENCE[namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    ({ node: node, 'properties': properties }), WPT_TYPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeRte(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var properties = feature.getProperties();\n    var context = { node: node };\n    context['p
 roperties'] = properties;\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.LINE_STRING) {\n        var lineString = /** @type {LineString} */ (transformGeometryWithOptions(geometry, true, options));\n        context['geometryLayout'] = lineString.getLayout();\n        properties['rtept'] = lineString.getCoordinates();\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = RTE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, RTE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrk(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var properties = feature.getProperties();\n    /** @type {imp
 ort(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    context['properties'] = properties;\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.MULTI_LINE_STRING) {\n        var multiLineString = /** @type {MultiLineString} */ (transformGeometryWithOptions(geometry, true, options));\n        properties['trkseg'] = multiLineString.getLineStrings();\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = TRK_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, TRK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {LineString} lineString LineString.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrkSeg(node, lineString, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n 
    context['geometryLayout'] = lineString.getLayout();\n    context['properties'] = {};\n    pushSerializeAndPop(context, TRKSEG_SERIALIZERS, TRKSEG_NODE_FACTORY, lineString.getCoordinates(), objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWpt(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var context = objectStack[objectStack.length - 1];\n    context['properties'] = feature.getProperties();\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.POINT) {\n        var point = /** @type {Point} */ (transformGeometryWithOptions(geometry, true, options));\n        context['geometryLayout'] = point.getLayout();\n        writeWptType(node, point.getCoordinates(), objectStack);\n    }\n}\nexport default GPX;\n//# sourceMappingURL=GPX.js.map","/**\n * @module ol/format/Ge
 oJSON\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '..
 /geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { assert } from '../asserts.js';\nimport { assign, isEmpty } from '../obj.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollecti
 on} GeoJSONGeometryCollection\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format.  Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @api\n */\nvar GeoJSON = /** @class */ (function (_super) {\n    __extends(GeoJSON, _super);
 \n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function GeoJSON(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection(options.dataProjection ? options.dataProjection : 'EPSG:4326');\n        if (options.featureProjection) {\n            _this.defaultFeatureProjection = getProjection(options.featureProjection);\n        }\n        /**\n         * Name of the geometry attribute for features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * Look for the geometry name in the feature GeoJSON\n         * @type {boolean|undefined}\n         * @private\n         */\n        _this.extractGeometryName_ = options.extractGeometryName;\n        return _this
 ;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    GeoJSON.prototype.readFeatureFromObject = function (object, opt_options) {\n        /**\n         * @type {GeoJSONFeature}\n         */\n        var geoJSONFeature = null;\n        if (object['type'] === 'Feature') {\n            geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n        }\n        else {\n            geoJSONFeature = {\n                'type': 'Feature',\n                'geometry': /** @type {GeoJSONGeometry} */ (object),\n                'properties': null,\n            };\n        }\n        var geometry = readGeometry(geoJSONFeature['geometry'], opt_options);\n        var feature = new Feature();\n        if (this.geometryName_) {\n            feature.setGeometryName(this.geometryName_);\n        }\n        else if (this.extra
 ctGeometryName_ &&\n            'geometry_name' in geoJSONFeature !== undefined) {\n            feature.setGeometryName(geoJSONFeature['geometry_name']);\n        }\n        feature.setGeometry(geometry);\n        if ('id' in geoJSONFeature) {\n            feature.setId(geoJSONFeature['id']);\n        }\n        if (geoJSONFeature['properties']) {\n            feature.setProperties(geoJSONFeature['properties'], true);\n        }\n        return feature;\n    };\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    GeoJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        var geoJSONObject = /** @type {GeoJSONObject} */ (object);\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = null;\n        if (geoJSONObject['type'] === 'FeatureCollection') {\n            var geoJSONF
 eatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);\n            features = [];\n            var geoJSONFeatures = geoJSONFeatureCollection['features'];\n            for (var i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n                features.push(this.readFeatureFromObject(geoJSONFeatures[i], opt_options));\n            }\n        }\n        else {\n            features = [this.readFeatureFromObject(object, opt_options)];\n        }\n        return features;\n    };\n    /**\n     * @param {GeoJSONGeometry} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    GeoJSON.prototype.readGeometryFromObject = function (object, opt_options) {\n        return readGeometry(object, opt_options);\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default
 } Projection.\n     */\n    GeoJSON.prototype.readProjectionFromObject = function (object) {\n        var crs = object['crs'];\n        var projection;\n        if (crs) {\n            if (crs['type'] == 'name') {\n                projection = getProjection(crs['properties']['name']);\n            }\n            else if (crs['type'] === 'EPSG') {\n                projection = getProjection('EPSG:' + crs['properties']['code']);\n            }\n            else {\n                assert(false, 36); // Unknown SRS type\n            }\n        }\n        else {\n            projection = this.dataProjection;\n        }\n        return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n    };\n    /**\n     * Encode a feature as a GeoJSON Feature object.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {GeoJSONFeature} Object.\n     * @api\n   
   */\n    GeoJSON.prototype.writeFeatureObject = function (feature, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        /** @type {GeoJSONFeature} */\n        var object = {\n            'type': 'Feature',\n            geometry: null,\n            properties: null,\n        };\n        var id = feature.getId();\n        if (id !== undefined) {\n            object.id = id;\n        }\n        if (!feature.hasProperties()) {\n            return object;\n        }\n        var properties = feature.getProperties();\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            object.geometry = writeGeometry(geometry, opt_options);\n            delete properties[feature.getGeometryName()];\n        }\n        if (!isEmpty(properties)) {\n            object.properties = properties;\n        }\n        return object;\n    };\n    /**\n     * Encode an array of features as a GeoJSON object.\n     *\n     * @param {Array<import(\"../Feature.j
 s\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {GeoJSONFeatureCollection} GeoJSON Object.\n     * @api\n     */\n    GeoJSON.prototype.writeFeaturesObject = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var objects = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            objects.push(this.writeFeatureObject(features[i], opt_options));\n        }\n        return {\n            type: 'FeatureCollection',\n            features: objects,\n        };\n    };\n    /**\n     * Encode a geometry as a GeoJSON object.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n     * @api\n     */\n    GeoJSON.prototype.writeGeometryObject = function (geometry
 , opt_options) {\n        return writeGeometry(geometry, this.adaptOptions(opt_options));\n    };\n    return GeoJSON;\n}(JSONFeature));\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n    if (!object) {\n        return null;\n    }\n    /**\n     * @type {import(\"../geom/Geometry.js\").default}\n     */\n    var geometry;\n    switch (object['type']) {\n        case GeometryType.POINT: {\n            geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n            break;\n        }\n        case GeometryType.LINE_STRING: {\n            geometry = readLineStringGeometry(\n            /** @type {GeoJSONLineString} */ (object));\n            break;\n        }\n        case GeometryType.POLYGON: {\n            geometry = readPolygonGeometry(/** @type {G
 eoJSONPolygon} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_POINT: {\n            geometry = readMultiPointGeometry(\n            /** @type {GeoJSONMultiPoint} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING: {\n            geometry = readMultiLineStringGeometry(\n            /** @type {GeoJSONMultiLineString} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            geometry = readMultiPolygonGeometry(\n            /** @type {GeoJSONMultiPolygon} */ (object));\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            geometry = readGeometryCollectionGeometry(\n            /** @type {GeoJSONGeometryCollection} */ (object));\n            break;\n        }\n        default: {\n            throw new Error('Unsupported GeoJSON type: ' + object.type);\n        }\n    }\n    return transformGeometryWithOptions(geometry, false, opt_optio
 ns);\n}\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, opt_options) {\n    var geometries = object['geometries'].map(\n    /**\n     * @param {GeoJSONGeometry} geometry Geometry.\n     * @return {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     */\n    function (geometry) {\n        return readGeometry(geometry, opt_options);\n    });\n    return new GeometryCollection(geometries);\n}\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n    return new Point(object['coordinates']);\n}\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n    return new LineString(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiLineString}
  object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n    return new MultiLineString(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n    return new MultiPoint(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {MultiPolygon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n    return new MultiPolygon(object['coordinates']);\n}\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n    return new Polygon(object['coordinates']);\n}\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {
 \n    geometry = transformGeometryWithOptions(geometry, true, opt_options);\n    var type = geometry.getType();\n    /** @type {GeoJSONGeometry} */\n    var geoJSON;\n    switch (type) {\n        case GeometryType.POINT: {\n            geoJSON = writePointGeometry(\n            /** @type {Point} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.LINE_STRING: {\n            geoJSON = writeLineStringGeometry(\n            /** @type {LineString} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.POLYGON: {\n            geoJSON = writePolygonGeometry(\n            /** @type {Polygon} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_POINT: {\n            geoJSON = writeMultiPointGeometry(\n            /** @type {MultiPoint} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING: {\n            geoJSON = writeMultiLineStringG
 eometry(\n            /** @type {MultiLineString} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            geoJSON = writeMultiPolygonGeometry(\n            /** @type {MultiPolygon} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            geoJSON = writeGeometryCollectionGeometry(\n            /** @type {GeometryCollection} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.CIRCLE: {\n            geoJSON = {\n                type: 'GeometryCollection',\n                geometries: [],\n            };\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return geoJSON;\n}\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometryColle
 ction} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, opt_options) {\n    var geometries = geometry.getGeometriesArray().map(function (geometry) {\n        var options = assign({}, opt_options);\n        delete options.featureProjection;\n        return writeGeometry(geometry, options);\n    });\n    return {\n        type: 'GeometryCollection',\n        geometries: geometries,\n    };\n}\n/**\n * @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n    return {\n        type: 'LineString',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(
 geometry, opt_options) {\n    return {\n        type: 'MultiLineString',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n    return {\n        type: 'MultiPoint',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n    var right;\n    if (opt_options) {\n        right = opt_options.rightHanded;\n    }\n    return {\n        type: 'MultiPolygon',\n        coordinates: geometry.getCoordinates(right),\n    };\n}\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").
 WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n    return {\n        type: 'Point',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, opt_options) {\n    var right;\n    if (opt_options) {\n        right = opt_options.rightHanded;\n    }\n    return {\n        type: 'Polygon',\n        coordinates: geometry.getCoordinates(right),\n    };\n}\nexport default GeoJSON;\n//# sourceMappingURL=GeoJSON.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            f
 unction (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/TextFeature\n */\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport { abstract } from '../util.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for text feature formats.\n *\n * @abstract\n */\nvar TextFeature = /** @class */ (function (_super) {\n    __extends(TextFeature, _super);\n    function TextFeature() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    TextFeature.prototype.getType 
 = function () {\n        return FormatType.TEXT;\n    };\n    /**\n     * Read the feature from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    TextFeature.prototype.readFeature = function (source, opt_options) {\n        return this.readFeatureFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    TextFeature.prototype.readFeatureFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the features from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @p
 aram {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    TextFeature.prototype.readFeatures = function (source, opt_options) {\n        return this.readFeaturesFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    TextFeature.prototype.readFeaturesFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the geometry from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     * @api\n     */\n    Text
 Feature.prototype.readGeometry = function (source, opt_options) {\n        return this.readGeometryFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    TextFeature.prototype.readGeometryFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    TextFeature.prototype.readProjection = function (source) {\n        return this.readProjectionFromText(getText(source));\n    };\n    /**\n     * @param {string} text Text.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default}
  Projection.\n     */\n    TextFeature.prototype.readProjectionFromText = function (text) {\n        return this.dataProjection;\n    };\n    /**\n     * Encode a feature as a string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded feature.\n     * @api\n     */\n    TextFeature.prototype.writeFeature = function (feature, opt_options) {\n        return this.writeFeatureText(feature, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeFeatureText = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * 
 @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Encoded features.\n     * @api\n     */\n    TextFeature.prototype.writeFeatures = function (features, opt_options) {\n        return this.writeFeaturesText(features, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeFeaturesText = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Write a single geometry.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @return {string} Geometry.\n   
   * @api\n     */\n    TextFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        return this.writeGeometryText(geometry, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeGeometryText = function (geometry, opt_options) {\n        return abstract();\n    };\n    return TextFeature;\n}(FeatureFormat));\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {string} Text.\n */\nfunction getText(source) {\n    if (typeof source === 'string') {\n        return source;\n    }\n    else {\n        return '';\n    }\n}\nexport default TextFeature;\n//# sourceMappingURL=TextFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d
 , b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/KML\n */\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Icon from '../style/Icon.js';\nimport IconAnchorUnits from '../style/IconAnchorUnits.js';\nimport IconOrigin from '../style/IconOrigin.js';\nimport LineString from '../geom/LineString.js';\nimport Mu
 ltiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport XMLFeature from './XMLFeature.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, getAllTextContent, isDocument, makeArrayExtender, makeArrayPusher, makeChildAppender, makeObjectPropertySetter, makeReplacer, makeSequence, makeSimpleNodeFactory, makeStructureNS, parse, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { asArray } from '../color.js';\nimport { assert } from '../asserts.js';\nimport { extend, includes } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { readBoolean, readDecimal, readString, writeBooleanTextNode, writeCDATAS
 ection, writeDecimalTextNode, writeStringTextNode, } from './xsd.js';\nimport { toRadians } from '../math.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {Object} Vec2\n * @property {number} x\n * @property {import(\"../style/IconAnchorUnits\").default} xunits\n * @property {number} y\n * @property {import(\"../style/IconAnchorUnits\").default} yunits\n * @property {import(\"../style/IconOrigin.js\").default} origin\n */\n/**\n * @typedef {Object} GxTrackObject\n * @property {Array<number>} flatCoordinates\n * @property {Array<number>} whens\n */\n/**\n * @const\n * @type {Array<string>}\n */\nvar GX_NAMESPACE_URIS = ['http://www.google.com/kml/ext/2.2'];\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n    null,\n    'http://earth.google.com/kml/2.0',\n    'http://earth.google.com/kml/2.1',\n    'http://earth.google.com/kml/2.2',\n    'http://www.opengis.net/kml/2.2',\n];\n/**\n * @const\n * @type {string}\n */\nvar S
 CHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +\n    'https://developers.google.com/kml/schema/kml22gx.xsd';\n/**\n * @type {Object<string, import(\"../style/IconAnchorUnits\").default>}\n */\nvar ICON_ANCHOR_UNITS_MAP = {\n    'fraction': IconAnchorUnits.FRACTION,\n    'pixels': IconAnchorUnits.PIXELS,\n    'insetPixels': IconAnchorUnits.PIXELS,\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PLACEMARK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'MultiGeometry': makeObjectPropertySetter(readMultiGeometry, 'geometry'),\n    'LineString': makeObjectPropertySetter(readLineString, 'geometry'),\n    'LinearRing': makeObjectPropertySetter(readLinearRing, 'geometry'),\n    'Point': makeObjectPropertySetter(readPoint, 'geometry'),\n    'Polygon': makeObjectPropertySetter(readPolygon, 'geometry'),\n    'Style': makeObjectPropertySetter(readSty
 le),\n    'StyleMap': placemarkStyleMapParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readURI),\n    'visibility': makeObjectPropertySetter(readBoolean),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'MultiTrack': makeObjectPropertySetter(readGxMultiTrack, 'geometry'),\n    'Track': makeObjectPropertySetter(readGxTrack, 'geometry'),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar NETWORK_LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'Link': linkParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n 
    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'visibility': makeObjectPropertySetter(readBoolean),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REGION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LatLonAltBox': latLonAltBoxParser,\n    'Lod': lodParser,\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar KML_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['Document', 'Placemark']);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar KML_SERIALIZERS = makeStructureNS(NAMESPACE_URIS,
  {\n    'Document': makeChildAppender(writeDocument),\n    'Placemark': makeChildAppender(writePlacemark),\n});\n/**\n * @type {import(\"../color.js\").Color}\n */\nvar DEFAULT_COLOR;\n/**\n * @type {Fill}\n */\nvar DEFAULT_FILL_STYLE = null;\n/**\n * Get the default fill style (or null if not yet set).\n * @return {Fill} The default fill style.\n */\nexport function getDefaultFillStyle() {\n    return DEFAULT_FILL_STYLE;\n}\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR;\n/**\n * @type {import(\"../style/IconAnchorUnits\").default}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n/**\n * @type {import(\"../style/IconAnchorUnits\").default}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_SIZE;\n/**\n * @type {string}\n */\nvar DEFAULT_IMAGE_STYLE_SRC;\n/**\n * @type {number}\n */\nvar DEFAULT_IMAGE_SCALE_MULTIPLIER;\n/**\n * @type {import(\"../style/Image.js\").default}\n */\nva
 r DEFAULT_IMAGE_STYLE = null;\n/**\n * Get the default image style (or null if not yet set).\n * @return {import(\"../style/Image.js\").default} The default image style.\n */\nexport function getDefaultImageStyle() {\n    return DEFAULT_IMAGE_STYLE;\n}\n/**\n * @type {string}\n */\nvar DEFAULT_NO_IMAGE_STYLE;\n/**\n * @type {Stroke}\n */\nvar DEFAULT_STROKE_STYLE = null;\n/**\n * Get the default stroke style (or null if not yet set).\n * @return {Stroke} The default stroke style.\n */\nexport function getDefaultStrokeStyle() {\n    return DEFAULT_STROKE_STYLE;\n}\n/**\n * @type {Stroke}\n */\nvar DEFAULT_TEXT_STROKE_STYLE;\n/**\n * @type {Text}\n */\nvar DEFAULT_TEXT_STYLE = null;\n/**\n * Get the default text style (or null if not yet set).\n * @return {Text} The default text style.\n */\nexport function getDefaultTextStyle() {\n    return DEFAULT_TEXT_STYLE;\n}\n/**\n * @type {Style}\n */\nvar DEFAULT_STYLE = null;\n/**\n * Get the default style (or null if not yet set).\n * @retu
 rn {Style} The default style.\n */\nexport function getDefaultStyle() {\n    return DEFAULT_STYLE;\n}\n/**\n * @type {Array<Style>}\n */\nvar DEFAULT_STYLE_ARRAY = null;\n/**\n * Get the default style array (or null if not yet set).\n * @return {Array<Style>} The default style.\n */\nexport function getDefaultStyleArray() {\n    return DEFAULT_STYLE_ARRAY;\n}\nfunction createStyleDefaults() {\n    DEFAULT_COLOR = [255, 255, 255, 1];\n    DEFAULT_FILL_STYLE = new Fill({\n        color: DEFAULT_COLOR,\n    });\n    DEFAULT_IMAGE_STYLE_ANCHOR = [20, 2]; // FIXME maybe [8, 32] ?\n    DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS = IconAnchorUnits.PIXELS;\n    DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS = IconAnchorUnits.PIXELS;\n    DEFAULT_IMAGE_STYLE_SIZE = [64, 64];\n    DEFAULT_IMAGE_STYLE_SRC =\n        'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';\n    DEFAULT_IMAGE_SCALE_MULTIPLIER = 0.5;\n    DEFAULT_IMAGE_STYLE = new Icon({\n        anchor: DEFAULT_IMAGE_STYLE_ANCHOR,\n        an
 chorOrigin: IconOrigin.BOTTOM_LEFT,\n        anchorXUnits: DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,\n        anchorYUnits: DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,\n        crossOrigin: 'anonymous',\n        rotation: 0,\n        scale: DEFAULT_IMAGE_SCALE_MULTIPLIER,\n        size: DEFAULT_IMAGE_STYLE_SIZE,\n        src: DEFAULT_IMAGE_STYLE_SRC,\n    });\n    DEFAULT_NO_IMAGE_STYLE = 'NO_IMAGE';\n    DEFAULT_STROKE_STYLE = new Stroke({\n        color: DEFAULT_COLOR,\n        width: 1,\n    });\n    DEFAULT_TEXT_STROKE_STYLE = new Stroke({\n        color: [51, 51, 51, 1],\n        width: 2,\n    });\n    DEFAULT_TEXT_STYLE = new Text({\n        font: 'bold 16px Helvetica',\n        fill: DEFAULT_FILL_STYLE,\n        stroke: DEFAULT_TEXT_STROKE_STYLE,\n        scale: 0.8,\n    });\n    DEFAULT_STYLE = new Style({\n        fill: DEFAULT_FILL_STYLE,\n        image: DEFAULT_IMAGE_STYLE,\n        text: DEFAULT_TEXT_STYLE,\n        stroke: DEFAULT_STROKE_STYLE,\n        zIndex: 0,\n    });\n    DEF
 AULT_STYLE_ARRAY = [DEFAULT_STYLE];\n}\n/**\n * @type {HTMLTextAreaElement}\n */\nvar TEXTAREA;\n/**\n * @typedef {Object} Options\n * @property {boolean} [extractStyles=true] Extract styles from the KML.\n * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.\n * @property {Array<Style>} [defaultStyle] Default style. The\n * default default style is the same as Google Earth.\n * @property {boolean} [writeStyles=true] Write styles into KML.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the KML format.\n *\n * {@link module:ol/format/KML~KML#readFeature} will read the first feature from\n * a KML source.\n *\n * MultiGeometries are converted into GeometryCollections if they are a mix of\n * geometr
 y types, and into MultiPoint/MultiLineString/MultiPolygon if they are\n * all of the same type.\n *\n * Note that the KML format uses the URL() constructor. Older browsers such as IE\n * which do not support this will need a URL polyfill to be loaded before use.\n *\n * @api\n */\nvar KML = /** @class */ (function (_super) {\n    __extends(KML, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function KML(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        if (!DEFAULT_STYLE_ARRAY) {\n            createStyleDefaults();\n        }\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {Array<Style>}\n         */\n        _this.defaultStyle_ = options.defaultStyle\n            ? options.defaultStyle\n            : DEFAULT_STYLE_ARRAY;\n   
      /**\n         * @private\n         * @type {boolean}\n         */\n        _this.extractStyles_ =\n            options.extractStyles !== undefined ? options.extractStyles : true;\n        /**\n         * @type {boolean}\n         */\n        _this.writeStyles_ =\n            options.writeStyles !== undefined ? options.writeStyles : true;\n        /**\n         * @private\n         * @type {!Object<string, (Array<Style>|string)>}\n         */\n        _this.sharedStyles_ = {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.showPointNames_ =\n            options.showPointNames !== undefined ? options.showPointNames : true;\n        /**\n         * @type {null|string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n        return _this;\n    }\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     *
  @return {Array<Feature>|undefined} Features.\n     */\n    KML.prototype.readDocumentOrFolder_ = function (node, objectStack) {\n        // FIXME use scope somehow\n        var parsersNS = makeStructureNS(NAMESPACE_URIS, {\n            'Document': makeArrayExtender(this.readDocumentOrFolder_, this),\n            'Folder': makeArrayExtender(this.readDocumentOrFolder_, this),\n            'Placemark': makeArrayPusher(this.readPlacemark_, this),\n            'Style': this.readSharedStyle_.bind(this),\n            'StyleMap': this.readSharedStyleMap_.bind(this),\n        });\n        /** @type {Array<Feature>} */\n        // @ts-ignore\n        var features = pushParseAndPop([], parsersNS, node, objectStack, this);\n        if (features) {\n            return features;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     * @return {Feature|unde
 fined} Feature.\n     */\n    KML.prototype.readPlacemark_ = function (node, objectStack) {\n        var object = pushParseAndPop({ 'geometry': null }, PLACEMARK_PARSERS, node, objectStack, this);\n        if (!object) {\n            return undefined;\n        }\n        var feature = new Feature();\n        var id = node.getAttribute('id');\n        if (id !== null) {\n            feature.setId(id);\n        }\n        var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n        var geometry = object['geometry'];\n        if (geometry) {\n            transformGeometryWithOptions(geometry, false, options);\n        }\n        feature.setGeometry(geometry);\n        delete object['geometry'];\n        if (this.extractStyles_) {\n            var style = object['Style'];\n            var styleUrl = object['styleUrl'];\n            var styleFunction = createFeatureStyleFunction(style, styleUrl, this.defaultStyle_, this.sharedStyles_, this.showPointNames_)
 ;\n            feature.setStyle(styleFunction);\n        }\n        delete object['Style'];\n        // we do not remove the styleUrl property from the object, so it\n        // gets stored on feature when setProperties is called\n        feature.setProperties(object, true);\n        return feature;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     */\n    KML.prototype.readSharedStyle_ = function (node, objectStack) {\n        var id = node.getAttribute('id');\n        if (id !== null) {\n            var style = readStyle.call(this, node, objectStack);\n            if (style) {\n                var styleUri = void 0;\n                var baseURI = node.baseURI;\n                if (!baseURI || baseURI == 'about:blank') {\n                    baseURI = window.location.href;\n                }\n                if (baseURI) {\n                    var url = new URL('#' + id, baseURI);\n                    sty
 leUri = url.href;\n                }\n                else {\n                    styleUri = '#' + id;\n                }\n                this.sharedStyles_[styleUri] = style;\n            }\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     */\n    KML.prototype.readSharedStyleMap_ = function (node, objectStack) {\n        var id = node.getAttribute('id');\n        if (id === null) {\n            return;\n        }\n        var styleMapValue = readStyleMapValue.call(this, node, objectStack);\n        if (!styleMapValue) {\n            return;\n        }\n        var styleUri;\n        var baseURI = node.baseURI;\n        if (!baseURI || baseURI == 'about:blank') {\n            baseURI = window.location.href;\n        }\n        if (baseURI) {\n            var url = new URL('#' + id, baseURI);\n            styleUri = url.href;\n        }\n        else {\n            styleUri = '#' + id;\n       
  }\n        this.sharedStyles_[styleUri] = styleMapValue;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    KML.prototype.readFeatureFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return null;\n        }\n        var feature = this.readPlacemark_(node, [\n            this.getReadOptions(node, opt_options),\n        ]);\n        if (feature) {\n            return feature;\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    KML.prototype.readFeaturesFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS
 , node.namespaceURI)) {\n            return [];\n        }\n        var features;\n        var localName = node.localName;\n        if (localName == 'Document' || localName == 'Folder') {\n            features = this.readDocumentOrFolder_(node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (features) {\n                return features;\n            }\n            else {\n                return [];\n            }\n        }\n        else if (localName == 'Placemark') {\n            var feature = this.readPlacemark_(node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (feature) {\n                return [feature];\n            }\n            else {\n                return [];\n            }\n        }\n        else if (localName == 'kml') {\n            features = [];\n            for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n                var fs = this.readFeaturesFromN
 ode(n, opt_options);\n                if (fs) {\n                    extend(features, fs);\n                }\n            }\n            return features;\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * Read the name of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {string|undefined} Name.\n     * @api\n     */\n    KML.prototype.readName = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readNameFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readNameFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readNameFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {string|undefined} Name.\n   
   */\n    KML.prototype.readNameFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                var name_1 = this.readNameFromNode(/** @type {Element} */ (n));\n                if (name_1) {\n                    return name_1;\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {string|undefined} Name.\n     */\n    KML.prototype.readNameFromNode = function (node) {\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) && n.localName == 'name') {\n                return readString(n);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n         
        (localName == 'Document' ||\n                    localName == 'Folder' ||\n                    localName == 'Placemark' ||\n                    localName == 'kml')) {\n                var name_2 = this.readNameFromNode(n);\n                if (name_2) {\n                    return name_2;\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * Read the network links of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {Array<Object>} Network links.\n     * @api\n     */\n    KML.prototype.readNetworkLinks = function (source) {\n        var networkLinks = [];\n        if (typeof source === 'string') {\n            var doc = parse(source);\n            extend(networkLinks, this.readNetworkLinksFromDocument(doc));\n        }\n        else if (isDocument(source)) {\n            extend(networkLinks, this.readNetworkLinksFromDocument(/** @type {Document} */ (source)));\n        }\n        else {\n      
       extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (source)));\n        }\n        return networkLinks;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Array<Object>} Network links.\n     */\n    KML.prototype.readNetworkLinksFromDocument = function (doc) {\n        var networkLinks = [];\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (n)));\n            }\n        }\n        return networkLinks;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {Array<Object>} Network links.\n     */\n    KML.prototype.readNetworkLinksFromNode = function (node) {\n        var networkLinks = [];\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                n.
 localName == 'NetworkLink') {\n                var obj = pushParseAndPop({}, NETWORK_LINK_PARSERS, n, []);\n                networkLinks.push(obj);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' || localName == 'Folder' || localName == 'kml')) {\n                extend(networkLinks, this.readNetworkLinksFromNode(n));\n            }\n        }\n        return networkLinks;\n    };\n    /**\n     * Read the regions of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {Array<Object>} Regions.\n     * @api\n     */\n    KML.prototype.readRegion = function (source) {\n        var regions = [];\n        if (typeof source === 'string') {\n            var doc = parse(source);\n            extend(regions, this.readRegionFromDocument(doc));\n        }\n    
     else if (isDocument(source)) {\n            extend(regions, this.readRegionFromDocument(/** @type {Document} */ (source)));\n        }\n        else {\n            extend(regions, this.readRegionFromNode(/** @type {Element} */ (source)));\n        }\n        return regions;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Array<Object>} Region.\n     */\n    KML.prototype.readRegionFromDocument = function (doc) {\n        var regions = [];\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(regions, this.readRegionFromNode(/** @type {Element} */ (n)));\n            }\n        }\n        return regions;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {Array<Object>} Region.\n     * @api\n     */\n    KML.prototype.readRegionFromNode = function (node) {\n        var regions = [];\n        for (var n = node.firstElementChild; n; n
  = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) && n.localName == 'Region') {\n                var obj = pushParseAndPop({}, REGION_PARSERS, n, []);\n                regions.push(obj);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' || localName == 'Folder' || localName == 'kml')) {\n                extend(regions, this.readRegionFromNode(n));\n            }\n        }\n        return regions;\n    };\n    /**\n     * Encode an array of features in the KML format as an XML node. GeometryCollections,\n     * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.\n     *\n     * @param {Array<Feature>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n     * @return {Node} Node.\n 
     * @api\n     */\n    KML.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var kml = createElementNS(NAMESPACE_URIS[4], 'kml');\n        var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n        kml.setAttributeNS(xmlnsUri, 'xmlns:gx', GX_NAMESPACE_URIS[0]);\n        kml.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n        kml.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n        var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {\n            node: kml,\n        };\n        /** @type {!Object<string, (Array<Feature>|Feature|undefined)>} */\n        var properties = {};\n        if (features.length > 1) {\n            properties['Document'] = features;\n        }\n        else if (features.length == 1) {\n            properties['Placemark'] = features[0];\n        }\n        var orderedKeys = KML_SEQUENCE[kml.namespaceURI];\n        
 var values = makeSequence(properties, orderedKeys);\n        pushSerializeAndPop(context, KML_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, [opt_options], orderedKeys, this);\n        return kml;\n    };\n    return KML;\n}(XMLFeature));\n/**\n * @param {Style|undefined} foundStyle Style.\n * @param {string} name Name.\n * @return {Style} style Style.\n */\nfunction createNameStyleFunction(foundStyle, name) {\n    var textOffset = [0, 0];\n    var textAlign = 'start';\n    var imageStyle = foundStyle.getImage();\n    if (imageStyle) {\n        var imageSize = imageStyle.getImageSize();\n        if (imageSize === null) {\n            imageSize = DEFAULT_IMAGE_STYLE_SIZE;\n        }\n        if (imageSize.length == 2) {\n            var imageScale = imageStyle.getScaleArray();\n            // Offset the label to be centered to the right of the icon,\n            // if there is one.\n            textOffset[0] = (imageScale[0] * imageSize[0]) / 2;\n            textOffset[1] = (-ima
 geScale[1] * imageSize[1]) / 2;\n            textAlign = 'left';\n        }\n    }\n    var textStyle = foundStyle.getText();\n    if (textStyle) {\n        // clone the text style, customizing it with name, alignments and offset.\n        // Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).\n        textStyle = textStyle.clone();\n        textStyle.setFont(textStyle.getFont() || DEFAULT_TEXT_STYLE.getFont());\n        textStyle.setScale(textStyle.getScale() || DEFAULT_TEXT_STYLE.getScale());\n        textStyle.setFill(textStyle.getFill() || DEFAULT_TEXT_STYLE.getFill());\n        textStyle.setStroke(textStyle.getStroke() || DEFAULT_TEXT_STROKE_STYLE);\n    }\n    else {\n        textStyle = DEFAULT_TEXT_STYLE.clone();\n    }\n    textStyle.setText(name);\n    textStyle.setOffsetX(textOffset[0]);\n    textStyle.setOffsetY(textOffset[1]);\n    textStyle.setTextAlign(textAlign);\n    var nameStyle = new Style({\n        image: imageStyle,\
 n        text: textStyle,\n    });\n    return nameStyle;\n}\n/**\n * @param {Array<Style>|undefined} style Style.\n * @param {string} styleUrl Style URL.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles Shared styles.\n * @param {boolean|undefined} showPointNames true to show names for point placemarks.\n * @return {import(\"../style/Style.js\").StyleFunction} Feature style function.\n */\nfunction createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, showPointNames) {\n    return (\n    /**\n     * @param {Feature} feature feature.\n     * @param {number} resolution Resolution.\n     * @return {Array<Style>|Style} Style.\n     */\n    function (feature, resolution) {\n        var drawName = showPointNames;\n        var name = '';\n        var multiGeometryPoints = [];\n        if (drawName) {\n            var geometry = feature.getGeometry();\n            if (geometry) {\n                var ty
 pe = geometry.getType();\n                if (type === GeometryType.GEOMETRY_COLLECTION) {\n                    multiGeometryPoints = geometry\n                        .getGeometriesArrayRecursive()\n                        .filter(function (geometry) {\n                        var type = geometry.getType();\n                        return (type === GeometryType.POINT ||\n                            type === GeometryType.MULTI_POINT);\n                    });\n                    drawName = multiGeometryPoints.length > 0;\n                }\n                else {\n                    drawName =\n                        type === GeometryType.POINT || type === GeometryType.MULTI_POINT;\n                }\n            }\n        }\n        if (drawName) {\n            name = /** @type {string} */ (feature.get('name'));\n            drawName = drawName && !!name;\n            // convert any html character codes\n            if (drawName && name.search(/&[^&]+;/) > -1) {\n              
   if (!TEXTAREA) {\n                    TEXTAREA = document.createElement('textarea');\n                }\n                TEXTAREA.innerHTML = name;\n                name = TEXTAREA.value;\n            }\n        }\n        var featureStyle = defaultStyle;\n        if (style) {\n            featureStyle = style;\n        }\n        else if (styleUrl) {\n            featureStyle = findStyle(styleUrl, defaultStyle, sharedStyles);\n        }\n        if (drawName) {\n            var nameStyle = createNameStyleFunction(featureStyle[0], name);\n            if (multiGeometryPoints.length > 0) {\n                // in multigeometries restrict the name style to points and create a\n                // style without image or text for geometries requiring fill or stroke\n                // including any polygon specific style if there is one\n                nameStyle.setGeometry(new GeometryCollection(multiGeometryPoints));\n                var baseStyle = new Style({\n                    ge
 ometry: featureStyle[0].getGeometry(),\n                    image: null,\n                    fill: featureStyle[0].getFill(),\n                    stroke: featureStyle[0].getStroke(),\n                    text: null,\n                });\n                return [nameStyle, baseStyle].concat(featureStyle.slice(1));\n            }\n            return nameStyle;\n        }\n        return featureStyle;\n    });\n}\n/**\n * @param {Array<Style>|string|undefined} styleValue Style value.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles\n * Shared styles.\n * @return {Array<Style>} Style.\n */\nfunction findStyle(styleValue, defaultStyle, sharedStyles) {\n    if (Array.isArray(styleValue)) {\n        return styleValue;\n    }\n    else if (typeof styleValue === 'string') {\n        // KML files in the wild occasionally forget the leading `#` on styleUrls\n        // defined in the same document.  Add a leading `#` if it
  enables to find\n        // a style.\n        if (!(styleValue in sharedStyles) && '#' + styleValue in sharedStyles) {\n            styleValue = '#' + styleValue;\n        }\n        return findStyle(sharedStyles[styleValue], defaultStyle, sharedStyles);\n    }\n    else {\n        return defaultStyle;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {import(\"../color.js\").Color|undefined} Color.\n */\nfunction readColor(node) {\n    var s = getAllTextContent(node, false);\n    // The KML specification states that colors should not include a leading `#`\n    // but we tolerate them.\n    var m = /^\\s*#?\\s*([0-9A-Fa-f]{8})\\s*$/.exec(s);\n    if (m) {\n        var hexColor = m[1];\n        return [\n            parseInt(hexColor.substr(6, 2), 16),\n            parseInt(hexColor.substr(4, 2), 16),\n            parseInt(hexColor.substr(2, 2), 16),\n            parseInt(hexColor.substr(0, 2), 16) / 255,\n        ];\n    }\n    else {\n        return undefined;\n    }\n}\n/**
 \n * @param {Node} node Node.\n * @return {Array<number>|undefined} Flat coordinates.\n */\nexport function readFlatCoordinates(node) {\n    var s = getAllTextContent(node, false);\n    var flatCoordinates = [];\n    // The KML specification states that coordinate tuples should not include\n    // spaces, but we tolerate them.\n    var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*,\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)(?:\\s*,\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?))?\\s*/i;\n    var m;\n    while ((m = re.exec(s))) {\n        var x = parseFloat(m[1]);\n        var y = parseFloat(m[2]);\n        var z = m[3] ? parseFloat(m[3]) : 0;\n        flatCoordinates.push(x, y, z);\n        s = s.substr(m[0].length);\n    }\n    if (s !== '') {\n        return undefined;\n    }\n    return flatCoordinates;\n}\n/**\n * @param {Node} node Node.\n * @return {string} URI.\n */\nfunction readURI(node) {\n    var s = getAllTextContent(node, false).trim();\n    var baseURI = node.baseUR
 I;\n    if (!baseURI || baseURI == 'about:blank') {\n        baseURI = window.location.href;\n    }\n    if (baseURI) {\n        var url = new URL(s, baseURI);\n        return url.href;\n    }\n    else {\n        return s;\n    }\n}\n/**\n * @param {Element} node Node.\n * @return {Vec2} Vec2.\n */\nfunction readVec2(node) {\n    var xunits = node.getAttribute('xunits');\n    var yunits = node.getAttribute('yunits');\n    var origin;\n    if (xunits !== 'insetPixels') {\n        if (yunits !== 'insetPixels') {\n            origin = IconOrigin.BOTTOM_LEFT;\n        }\n        else {\n            origin = IconOrigin.TOP_LEFT;\n        }\n    }\n    else {\n        if (yunits !== 'insetPixels') {\n            origin = IconOrigin.BOTTOM_RIGHT;\n        }\n        else {\n            origin = IconOrigin.TOP_RIGHT;\n        }\n    }\n    return {\n        x: parseFloat(node.getAttribute('x')),\n        xunits: ICON_ANCHOR_UNITS_MAP[xunits],\n        y: parseFloat(node.getAttribute('y')),
 \n        yunits: ICON_ANCHOR_UNITS_MAP[yunits],\n        origin: origin,\n    };\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Scale.\n */\nfunction readScale(node) {\n    return readDecimal(node);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_MAP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Pair': pairDataParser,\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>|string|undefined} StyleMap.\n */\nfunction readStyleMapValue(node, objectStack) {\n    return pushParseAndPop(undefined, STYLE_MAP_PARSERS, node, objectStack, this);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ICON_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Icon': makeObjectPropertySetter(readIcon),\n    'color': makeObjectPropertySetter(readColor),\n    '
 heading': makeObjectPropertySetter(readDecimal),\n    'hotSpot': makeObjectPropertySetter(readVec2),\n    'scale': makeObjectPropertySetter(readScale),\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction iconStyleParser(node, objectStack) {\n    // FIXME refreshMode\n    // FIXME refreshInterval\n    // FIXME viewRefreshTime\n    // FIXME viewBoundScale\n    // FIXME viewFormat\n    // FIXME httpQuery\n    var object = pushParseAndPop({}, ICON_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var IconObject = 'Icon' in object ? object['Icon'] : {};\n    var drawIcon = !('Icon' in object) || Object.keys(IconObject).length > 0;\n    var src;\n    var href = /** @type {string|undefined} */ (IconObject['href']);\n    if (href) {\n        src = href;\n    }\n    else if (drawIcon) {\n        src = DEFAUL
 T_IMAGE_STYLE_SRC;\n    }\n    var anchor, anchorXUnits, anchorYUnits;\n    var anchorOrigin = IconOrigin.BOTTOM_LEFT;\n    var hotSpot = /** @type {Vec2|undefined} */ (object['hotSpot']);\n    if (hotSpot) {\n        anchor = [hotSpot.x, hotSpot.y];\n        anchorXUnits = hotSpot.xunits;\n        anchorYUnits = hotSpot.yunits;\n        anchorOrigin = hotSpot.origin;\n    }\n    else if (src === DEFAULT_IMAGE_STYLE_SRC) {\n        anchor = DEFAULT_IMAGE_STYLE_ANCHOR;\n        anchorXUnits = DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n        anchorYUnits = DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n    }\n    else if (/^http:\\/\\/maps\\.(?:google|gstatic)\\.com\\//.test(src)) {\n        anchor = [0.5, 0];\n        anchorXUnits = IconAnchorUnits.FRACTION;\n        anchorYUnits = IconAnchorUnits.FRACTION;\n    }\n    var offset;\n    var x = /** @type {number|undefined} */ (IconObject['x']);\n    var y = /** @type {number|undefined} */ (IconObject['y']);\n    if (x !== undefined && y !== undefin
 ed) {\n        offset = [x, y];\n    }\n    var size;\n    var w = /** @type {number|undefined} */ (IconObject['w']);\n    var h = /** @type {number|undefined} */ (IconObject['h']);\n    if (w !== undefined && h !== undefined) {\n        size = [w, h];\n    }\n    var rotation;\n    var heading = /** @type {number} */ (object['heading']);\n    if (heading !== undefined) {\n        rotation = toRadians(heading);\n    }\n    var scale = /** @type {number|undefined} */ (object['scale']);\n    var color = /** @type {Array<number>|undefined} */ (object['color']);\n    if (drawIcon) {\n        if (src == DEFAULT_IMAGE_STYLE_SRC) {\n            size = DEFAULT_IMAGE_STYLE_SIZE;\n            if (scale === undefined) {\n                scale = DEFAULT_IMAGE_SCALE_MULTIPLIER;\n            }\n        }\n        var imageStyle = new Icon({\n            anchor: anchor,\n            anchorOrigin: anchorOrigin,\n            anchorXUnits: anchorXUnits,\n            anchorYUnits: anchorYUnits,\n     
        crossOrigin: this.crossOrigin_,\n            offset: offset,\n            offsetOrigin: IconOrigin.BOTTOM_LEFT,\n            rotation: rotation,\n            scale: scale,\n            size: size,\n            src: src,\n            color: color,\n        });\n        styleObject['imageStyle'] = imageStyle;\n    }\n    else {\n        // handle the case when we explicitly want to draw no icon.\n        styleObject['imageStyle'] = DEFAULT_NO_IMAGE_STYLE;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'scale': makeObjectPropertySetter(readScale),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction labelStyleParser(node, objectStack) {\n    // FIXME colorMode\n    var object = pushParseAndPop({}, LABEL_STYLE_PARSERS, node, objectStack);\n   
  if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var textStyle = new Text({\n        fill: new Fill({\n            color: \n            /** @type {import(\"../color.js\").Color} */\n            ('color' in object ? object['color'] : DEFAULT_COLOR),\n        }),\n        scale: /** @type {number|undefined} */ (object['scale']),\n    });\n    styleObject['textStyle'] = textStyle;\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINE_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'width': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lineStyleParser(node, objectStack) {\n    // FIXME colorMode\n    // FIXME gx:outerColor\n    // FIXME gx:outerWidth\n    // FIXME gx:physicalWidth\n    // FIXME gx:labelVisibilit
 y\n    var object = pushParseAndPop({}, LINE_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var strokeStyle = new Stroke({\n        color: \n        /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n        width: /** @type {number} */ ('width' in object ? object['width'] : 1),\n    });\n    styleObject['strokeStyle'] = strokeStyle;\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar POLY_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'fill': makeObjectPropertySetter(readBoolean),\n    'outline': makeObjectPropertySetter(readBoolean),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction polyStyleParser(node, objectStack) {\n    // FIXME colorMode\n    var 
 object = pushParseAndPop({}, POLY_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var fillStyle = new Fill({\n        color: \n        /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n    });\n    styleObject['fillStyle'] = fillStyle;\n    var fill = /** @type {boolean|undefined} */ (object['fill']);\n    if (fill !== undefined) {\n        styleObject['fill'] = fill;\n    }\n    var outline = /** @type {boolean|undefined} */ (object['outline']);\n    if (outline !== undefined) {\n        styleObject['outline'] = outline;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FLAT_LINEAR_RING_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectSta
 ck Object stack.\n * @return {Array<number>} LinearRing flat coordinates.\n */\nfunction readFlatLinearRing(node, objectStack) {\n    return pushParseAndPop(null, FLAT_LINEAR_RING_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction gxCoordParser(node, objectStack) {\n    var gxTrackObject = \n    /** @type {GxTrackObject} */\n    (objectStack[objectStack.length - 1]);\n    var flatCoordinates = gxTrackObject.flatCoordinates;\n    var s = getAllTextContent(node, false);\n    var re = /^\\s*([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s*$/i;\n    var m = re.exec(s);\n    if (m) {\n        var x = parseFloat(m[1]);\n        var y = parseFloat(m[2]);\n        var z = parseFloat(m[3]);\n        flatCoordinates.push(x, y, z, 0);\n    }\n    else {\n        flatCoordinates.push(0, 0, 0, 0);\n    }\n}\n/**\n * @const\n * @typ
 e {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(GX_NAMESPACE_URIS, {\n    'Track': makeArrayPusher(readGxTrack),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {MultiLineString|undefined} MultiLineString.\n */\nfunction readGxMultiTrack(node, objectStack) {\n    var lineStrings = pushParseAndPop([], GX_MULTITRACK_GEOMETRY_PARSERS, node, objectStack);\n    if (!lineStrings) {\n        return undefined;\n    }\n    return new MultiLineString(lineStrings);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GX_TRACK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'when': whenParser,\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'coord': gxCoordParser,\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} Li
 neString.\n */\nfunction readGxTrack(node, objectStack) {\n    var gxTrackObject = pushParseAndPop(\n    /** @type {GxTrackObject} */ ({\n        flatCoordinates: [],\n        whens: [],\n    }), GX_TRACK_PARSERS, node, objectStack);\n    if (!gxTrackObject) {\n        return undefined;\n    }\n    var flatCoordinates = gxTrackObject.flatCoordinates;\n    var whens = gxTrackObject.whens;\n    for (var i = 0, ii = Math.min(flatCoordinates.length, whens.length); i < ii; ++i) {\n        flatCoordinates[4 * i + 3] = whens[i];\n    }\n    return new LineString(flatCoordinates, GeometryLayout.XYZM);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ICON_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'x': makeObjectPropertySetter(readDecimal),\n    'y': makeObjectPropertySetter(readDecimal),\n    'w': makeObjectPropertySetter(readDeci
 mal),\n    'h': makeObjectPropertySetter(readDecimal),\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Icon object.\n */\nfunction readIcon(node, objectStack) {\n    var iconObject = pushParseAndPop({}, ICON_PARSERS, node, objectStack);\n    if (iconObject) {\n        return iconObject;\n    }\n    else {\n        return null;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GEOMETRY_FLAT_COORDINATES_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} Flat coordinates.\n */\nfunction readFlatCoordinatesFromNode(node, objectStack) {\n    return pushParseAndPop(null, GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import
 (\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'extrude': makeObjectPropertySetter(readBoolean),\n    'tessellate': makeObjectPropertySetter(readBoolean),\n    'altitudeMode': makeObjectPropertySetter(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readLineString(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n        lineString.setProperties(properties, true);\n        return lineString;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Po
 lygon|undefined} Polygon.\n */\nfunction readLinearRing(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, [\n            flatCoordinates.length,\n        ]);\n        polygon.setProperties(properties, true);\n        return polygon;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar MULTI_GEOMETRY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LineString': makeArrayPusher(readLineString),\n    'LinearRing': makeArrayPusher(readLinearRing),\n    'MultiGeometry': makeArrayPusher(readMultiGeometry),\n    'Point': makeArrayPusher(readPoint),\n    'Polygon': makeArrayPusher(readPolygon),\n});\n/**\n * @param {Element} node Node.\
 n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readMultiGeometry(node, objectStack) {\n    var geometries = pushParseAndPop([], MULTI_GEOMETRY_PARSERS, node, objectStack);\n    if (!geometries) {\n        return null;\n    }\n    if (geometries.length === 0) {\n        return new GeometryCollection(geometries);\n    }\n    var multiGeometry;\n    var homogeneous = true;\n    var type = geometries[0].getType();\n    var geometry;\n    for (var i = 1, ii = geometries.length; i < ii; ++i) {\n        geometry = geometries[i];\n        if (geometry.getType() != type) {\n            homogeneous = false;\n            break;\n        }\n    }\n    if (homogeneous) {\n        var layout = void 0;\n        var flatCoordinates = void 0;\n        if (type == GeometryType.POINT) {\n            var point = geometries[0];\n            layout = point.getLayout();\n            flatCoordinates = point.getFlatCoordinates()
 ;\n            for (var i = 1, ii = geometries.length; i < ii; ++i) {\n                geometry = geometries[i];\n                extend(flatCoordinates, geometry.getFlatCoordinates());\n            }\n            multiGeometry = new MultiPoint(flatCoordinates, layout);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.LINE_STRING) {\n            multiGeometry = new MultiLineString(geometries);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.POLYGON) {\n            multiGeometry = new MultiPolygon(geometries);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.GEOMETRY_COLLECTION) {\n            multiGeometry = new GeometryCollection(geometries);\n        }\n        else {\n            assert(false, 37); // Unknown geometry type found\n        }\n    }\n    else {\n        multi
 Geometry = new GeometryCollection(geometries);\n    }\n    return /** @type {import(\"../geom/Geometry.js\").default} */ (multiGeometry);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Point|undefined} Point.\n */\nfunction readPoint(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var point = new Point(flatCoordinates, GeometryLayout.XYZ);\n        point.setProperties(properties, true);\n        return point;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'innerBoundaryIs': innerBoundaryIsParser,\n    'outerBoundaryIs': outerBoundaryIsParser,\n});\n/**\n * @param {
 Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readPolygon(node, objectStack) {\n    var properties = pushParseAndPop(\n    /** @type {Object<string,*>} */ ({}), EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatLinearRings = pushParseAndPop([null], FLAT_LINEAR_RINGS_PARSERS, node, objectStack);\n    if (flatLinearRings && flatLinearRings[0]) {\n        var flatCoordinates = flatLinearRings[0];\n        var ends = [flatCoordinates.length];\n        for (var i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n            extend(flatCoordinates, flatLinearRings[i]);\n            ends.push(flatCoordinates.length);\n        }\n        var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        polygon.setProperties(properties, true);\n        return polygon;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, impor
 t(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'IconStyle': iconStyleParser,\n    'LabelStyle': labelStyleParser,\n    'LineStyle': lineStyleParser,\n    'PolyStyle': polyStyleParser,\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>} Style.\n */\nfunction readStyle(node, objectStack) {\n    var styleObject = pushParseAndPop({}, STYLE_PARSERS, node, objectStack, this);\n    if (!styleObject) {\n        return null;\n    }\n    var fillStyle = \n    /** @type {Fill} */\n    ('fillStyle' in styleObject\n        ? styleObject['fillStyle']\n        : DEFAULT_FILL_STYLE);\n    var fill = /** @type {boolean|undefined} */ (styleObject['fill']);\n    if (fill !== undefined && !fill) {\n        fillStyle = null;\n    }\n    var imageStyle;\n    if ('imageStyle' in styleObject) {\n        if (styleObject['imageStyle'] != DEFAULT_NO_IMAGE_STYLE) {\n     
        imageStyle = styleObject['imageStyle'];\n        }\n    }\n    else {\n        imageStyle = DEFAULT_IMAGE_STYLE;\n    }\n    var textStyle = \n    /** @type {Text} */\n    ('textStyle' in styleObject\n        ? styleObject['textStyle']\n        : DEFAULT_TEXT_STYLE);\n    var strokeStyle = \n    /** @type {Stroke} */\n    ('strokeStyle' in styleObject\n        ? styleObject['strokeStyle']\n        : DEFAULT_STROKE_STYLE);\n    var outline = /** @type {boolean|undefined} */ (styleObject['outline']);\n    if (outline !== undefined && !outline) {\n        // if the polystyle specifies no outline two styles are needed,\n        // one for non-polygon geometries where linestrings require a stroke\n        // and one for polygons where there should be no stroke\n        return [\n            new Style({\n                geometry: function (feature) {\n                    var geometry = feature.getGeometry();\n                    var type = geometry.getType();\n                    i
 f (type === GeometryType.GEOMETRY_COLLECTION) {\n                        return new GeometryCollection(geometry\n                            .getGeometriesArrayRecursive()\n                            .filter(function (geometry) {\n                            var type = geometry.getType();\n                            return (type !== GeometryType.POLYGON &&\n                                type !== GeometryType.MULTI_POLYGON);\n                        }));\n                    }\n                    else if (type !== GeometryType.POLYGON &&\n                        type !== GeometryType.MULTI_POLYGON) {\n                        return geometry;\n                    }\n                },\n                fill: fillStyle,\n                image: imageStyle,\n                stroke: strokeStyle,\n                text: textStyle,\n                zIndex: undefined,\n            }),\n            new Style({\n                geometry: function (feature) {\n                    var geometr
 y = feature.getGeometry();\n                    var type = geometry.getType();\n                    if (type === GeometryType.GEOMETRY_COLLECTION) {\n                        return new GeometryCollection(geometry\n                            .getGeometriesArrayRecursive()\n                            .filter(function (geometry) {\n                            var type = geometry.getType();\n                            return (type === GeometryType.POLYGON ||\n                                type === GeometryType.MULTI_POLYGON);\n                        }));\n                    }\n                    else if (type === GeometryType.POLYGON ||\n                        type === GeometryType.MULTI_POLYGON) {\n                        return geometry;\n                    }\n                },\n                fill: fillStyle,\n                stroke: null,\n                zIndex: undefined,\n            }),\n        ];\n    }\n    return [\n        new Style({\n            fill: fillStyl
 e,\n            image: imageStyle,\n            stroke: strokeStyle,\n            text: textStyle,\n            zIndex: undefined,\n        }),\n    ];\n}\n/**\n * Reads an array of geometries and creates arrays for common geometry\n * properties. Then sets them to the multi geometry.\n * @param {MultiPoint|MultiLineString|MultiPolygon} multiGeometry A multi-geometry.\n * @param {Array<import(\"../geom/Geometry.js\").default>} geometries List of geometries.\n */\nfunction setCommonGeometryProperties(multiGeometry, geometries) {\n    var ii = geometries.length;\n    var extrudes = new Array(geometries.length);\n    var tessellates = new Array(geometries.length);\n    var altitudeModes = new Array(geometries.length);\n    var hasExtrude, hasTessellate, hasAltitudeMode;\n    hasExtrude = false;\n    hasTessellate = false;\n    hasAltitudeMode = false;\n    for (var i = 0; i < ii; ++i) {\n        var geometry = geometries[i];\n        extrudes[i] = geometry.get('extrude');\n        tess
 ellates[i] = geometry.get('tessellate');\n        altitudeModes[i] = geometry.get('altitudeMode');\n        hasExtrude = hasExtrude || extrudes[i] !== undefined;\n        hasTessellate = hasTessellate || tessellates[i] !== undefined;\n        hasAltitudeMode = hasAltitudeMode || altitudeModes[i];\n    }\n    if (hasExtrude) {\n        multiGeometry.set('extrude', extrudes);\n    }\n    if (hasTessellate) {\n        multiGeometry.set('tessellate', tessellates);\n    }\n    if (hasAltitudeMode) {\n        multiGeometry.set('altitudeMode', altitudeModes);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'displayName': makeObjectPropertySetter(readString),\n    'value': makeObjectPropertySetter(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction dataParser(node, objectStack) {\n    var name = no
 de.getAttribute('name');\n    parseNode(DATA_PARSERS, node, objectStack);\n    var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    if (name && featureObject.displayName) {\n        featureObject[name] = {\n            value: featureObject.value,\n            displayName: featureObject.displayName,\n            toString: function () {\n                return featureObject.value;\n            },\n        };\n    }\n    else if (name !== null) {\n        featureObject[name] = featureObject.value;\n    }\n    else if (featureObject.displayName !== null) {\n        featureObject[featureObject.displayName] = featureObject.value;\n    }\n    delete featureObject['value'];\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXTENDED_DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Data': dataParser,\n    'SchemaData': schemaDataParser,\n});\n/**\n * @param {Element} node Node.\n * @param
  {Array<*>} objectStack Object stack.\n */\nfunction extendedDataParser(node, objectStack) {\n    parseNode(EXTENDED_DATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction regionParser(node, objectStack) {\n    parseNode(REGION_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PAIR_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Style': makeObjectPropertySetter(readStyle),\n    'key': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readURI),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction pairDataParser(node, objectStack) {\n    var pairObject = pushParseAndPop({}, PAIR_PARSERS, node, objectStack, this);\n    if (!pairObject) {\n        return;\n    }\n    var key = /** @type {string|undefined} */ (pairObject['key']);\
 n    if (key && key == 'normal') {\n        var styleUrl = /** @type {string|undefined} */ (pairObject['styleUrl']);\n        if (styleUrl) {\n            objectStack[objectStack.length - 1] = styleUrl;\n        }\n        var style = /** @type {Style} */ (pairObject['Style']);\n        if (style) {\n            objectStack[objectStack.length - 1] = style;\n        }\n    }\n}\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction placemarkStyleMapParser(node, objectStack) {\n    var styleMapValue = readStyleMapValue.call(this, node, objectStack);\n    if (!styleMapValue) {\n        return;\n    }\n    var placemarkObject = objectStack[objectStack.length - 1];\n    if (Array.isArray(styleMapValue)) {\n        placemarkObject['Style'] = styleMapValue;\n    }\n    else if (typeof styleMapValue === 'string') {\n        placemarkObject['styleUrl'] = styleMapValue;\n    }\n    else {\n        assert(false, 38); // `styleMapValu
 e` has an unknown type\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SCHEMA_DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'SimpleData': simpleDataParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction schemaDataParser(node, objectStack) {\n    parseNode(SCHEMA_DATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction simpleDataParser(node, objectStack) {\n    var name = node.getAttribute('name');\n    if (name !== null) {\n        var data = readString(node);\n        var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        featureObject[name] = data;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAT_LON_ALT_BOX_PARSERS = makeStructureNS(NAMESPACE_URIS, {
 \n    'altitudeMode': makeObjectPropertySetter(readString),\n    'minAltitude': makeObjectPropertySetter(readDecimal),\n    'maxAltitude': makeObjectPropertySetter(readDecimal),\n    'north': makeObjectPropertySetter(readDecimal),\n    'south': makeObjectPropertySetter(readDecimal),\n    'east': makeObjectPropertySetter(readDecimal),\n    'west': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction latLonAltBoxParser(node, objectStack) {\n    var object = pushParseAndPop({}, LAT_LON_ALT_BOX_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var regionObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var extent = [\n        parseFloat(object['west']),\n        parseFloat(object['south']),\n        parseFloat(object['east']),\n        parseFloat(object['north']),\n    ];\n    regionObject['extent'] = extent;\n    regionObject['altitudeMode'] = 
 object['altitudeMode'];\n    regionObject['minAltitude'] = parseFloat(object['minAltitude']);\n    regionObject['maxAltitude'] = parseFloat(object['maxAltitude']);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LOD_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'minLodPixels': makeObjectPropertySetter(readDecimal),\n    'maxLodPixels': makeObjectPropertySetter(readDecimal),\n    'minFadeExtent': makeObjectPropertySetter(readDecimal),\n    'maxFadeExtent': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lodParser(node, objectStack) {\n    var object = pushParseAndPop({}, LOD_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var lodObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    lodObject['minLodPixels'] = parseFloat(object['minLodPixels']);\n    lodObject['maxLodPi
 xels'] = parseFloat(object['maxLodPixels']);\n    lodObject['minFadeExtent'] = parseFloat(object['minFadeExtent']);\n    lodObject['maxFadeExtent'] = parseFloat(object['maxFadeExtent']);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar INNER_BOUNDARY_IS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction innerBoundaryIsParser(node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined, INNER_BOUNDARY_IS_PARSERS, node, objectStack);\n    if (flatLinearRing) {\n        var flatLinearRings = \n        /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n        flatLinearRings.push(flatLinearRing);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\"
 ).Parser>>}\n */\n// @ts-ignore\nvar OUTER_BOUNDARY_IS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction outerBoundaryIsParser(node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined, OUTER_BOUNDARY_IS_PARSERS, node, objectStack);\n    if (flatLinearRing) {\n        var flatLinearRings = \n        /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n        flatLinearRings[0] = flatLinearRing;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction linkParser(node, objectStack) {\n    parseNode(LINK_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction whenParser(node, objectStack) {\n    var gxTrackObject = \n    /
 ** @type {GxTrackObject} */\n    (objectStack[objectStack.length - 1]);\n    var whens = gxTrackObject.whens;\n    var s = getAllTextContent(node, false);\n    var when = Date.parse(s);\n    whens.push(isNaN(when) ? 0 : when);\n}\n/**\n * @param {Node} node Node to append a TextNode with the color to.\n * @param {import(\"../color.js\").Color|string} color Color.\n */\nfunction writeColorTextNode(node, color) {\n    var rgba = asArray(color);\n    var opacity = rgba.length == 4 ? rgba[3] : 1;\n    /** @type {Array<string|number>} */\n    var abgr = [opacity * 255, rgba[2], rgba[1], rgba[0]];\n    for (var i = 0; i < 4; ++i) {\n        var hex = Math.floor(/** @type {number} */ (abgr[i])).toString(16);\n        abgr[i] = hex.length == 1 ? '0' + hex : hex;\n    }\n    writeStringTextNode(node, abgr.join(''));\n}\n/**\n * @param {Node} node Node to append a TextNode with the coordinates to.\n * @param {Array<number>} coordinates Coordinates.\n * @param {Array<*>} objectStack Object sta
 ck.\n */\nfunction writeCoordinatesTextNode(node, coordinates, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var layout = context['layout'];\n    var stride = context['stride'];\n    var dimension;\n    if (layout == GeometryLayout.XY || layout == GeometryLayout.XYM) {\n        dimension = 2;\n    }\n    else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYZM) {\n        dimension = 3;\n    }\n    else {\n        assert(false, 34); // Invalid geometry layout\n    }\n    var ii = coordinates.length;\n    var text = '';\n    if (ii > 0) {\n        text += coordinates[0];\n        for (var d = 1; d < dimension; ++d) {\n            text += ',' + coordinates[d];\n        }\n        for (var i = stride; i < ii; i += stride) {\n            text += ' ' + coordinates[i];\n            for (var d = 1; d < dimension; ++d) {\n                text += ',' + coordinates[i + d];\n            }\n        }\n    }\n    writeStringTextNode(node, text);\n}\n/*
 *\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar EXTENDEDDATA_NODE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Data': makeChildAppender(writeDataNode),\n    'value': makeChildAppender(writeDataNodeValue),\n    'displayName': makeChildAppender(writeDataNodeName),\n});\n/**\n * @param {Element} node Node.\n * @param {{name: *, value: *}} pair Name value pair.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeDataNode(node, pair, objectStack) {\n    node.setAttribute('name', pair.name);\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var value = pair.value;\n    if (typeof value == 'object') {\n        if (value !== null && value.displayName) {\n            pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value.displayName], objectStack, ['displayName']);\n        }\n        if (value !== null && value.value) 
 {\n            pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value.value], objectStack, ['value']);\n        }\n    }\n    else {\n        pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value], objectStack, ['value']);\n    }\n}\n/**\n * @param {Node} node Node to append a TextNode with the name to.\n * @param {string} name DisplayName.\n */\nfunction writeDataNodeName(node, name) {\n    writeCDATASection(node, name);\n}\n/**\n * @param {Node} node Node to append a CDATA Section with the value to.\n * @param {string} value Value.\n */\nfunction writeDataNodeValue(node, value) {\n    writeStringTextNode(node, value);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar DOCUMENT_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Placemark': makeChildAppender(writePlacemark),\n});\n/**\n * @const\n * @param {*} value Value.\n * 
 @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar DOCUMENT_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    var parentNode = objectStack[objectStack.length - 1].node;\n    return createElementNS(parentNode.namespaceURI, 'Placemark');\n};\n/**\n * @param {Node} node Node.\n * @param {Array<Feature>} features Features.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writeDocument(node, features, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    pushSerializeAndPop(context, DOCUMENT_SERIALIZERS, DOCUMENT_NODE_FACTORY, features, objectStack, undefined, this);\n}\n/**\n * A factory for creating Data nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar DATA_NODE_FACTORY = makeSimpleNodeFactory('Data');\n/**\n * @param {Node} node Node.\n * @param {{names: Array<string>, values:
  (Array<*>)}} namesAndValues Names and values.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeExtendedData(node, namesAndValues, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var names = namesAndValues.names;\n    var values = namesAndValues.values;\n    var length = names.length;\n    for (var i = 0; i < length; i++) {\n        pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, DATA_NODE_FACTORY, [{ name: names[i], value: values[i] }], objectStack);\n    }\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar ICON_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['href'], makeStructureNS(GX_NAMESPACE_URIS, ['x', 'y', 'w', 'h']));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar ICON_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeChildAppender(writeStringTextNode),\n}, makeStructureN
 S(GX_NAMESPACE_URIS, {\n    'x': makeChildAppender(writeDecimalTextNode),\n    'y': makeChildAppender(writeDecimalTextNode),\n    'w': makeChildAppender(writeDecimalTextNode),\n    'h': makeChildAppender(writeDecimalTextNode),\n}));\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar GX_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    return createElementNS(GX_NAMESPACE_URIS[0], 'gx:' + opt_nodeName);\n};\n/**\n * @param {Node} node Node.\n * @param {Object} icon Icon object.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIcon(node, icon, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = ICON_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(icon, orderedKeys);\n    
 pushSerializeAndPop(context, ICON_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n    orderedKeys = ICON_SEQUENCE[GX_NAMESPACE_URIS[0]];\n    values = makeSequence(icon, orderedKeys);\n    pushSerializeAndPop(context, ICON_SERIALIZERS, GX_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar ICON_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'scale',\n    'heading',\n    'Icon',\n    'color',\n    'hotSpot',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar ICON_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Icon': makeChildAppender(writeIcon),\n    'color': makeChildAppender(writeColorTextNode),\n    'heading': makeChildAppender(writeDecimalTextNode),\n    'hotSpot': makeChildAppender(writeVec2),\n    'scale': makeChildAppender(writeScaleTextNode),\n});\n/**\n * @param {Node} n
 ode Node.\n * @param {import(\"../style/Icon.js\").default} style Icon style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIconStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var /** @type {Object<string, any>} */ properties = {};\n    var src = style.getSrc();\n    var size = style.getSize();\n    var iconImageSize = style.getImageSize();\n    var iconProperties = {\n        'href': src,\n    };\n    if (size) {\n        iconProperties['w'] = size[0];\n        iconProperties['h'] = size[1];\n        var anchor = style.getAnchor(); // top-left\n        var origin_1 = style.getOrigin(); // top-left\n        if (origin_1 && iconImageSize && origin_1[0] !== 0 && origin_1[1] !== size[1]) {\n            iconProperties['x'] = origin_1[0];\n            iconProperties['y'] = iconImageSize[1] - (origin_1[1] + size[1]);\n        }\n        if (anchor && (anchor[0] !== size[0] / 2 || anchor[1] !
 == size[1] / 2)) {\n            var /** @type {Vec2} */ hotSpot = {\n                x: anchor[0],\n                xunits: IconAnchorUnits.PIXELS,\n                y: size[1] - anchor[1],\n                yunits: IconAnchorUnits.PIXELS,\n            };\n            properties['hotSpot'] = hotSpot;\n        }\n    }\n    properties['Icon'] = iconProperties;\n    var scale = style.getScale();\n    if (scale !== 1) {\n        properties['scale'] = scale;\n    }\n    var rotation = style.getRotation();\n    if (rotation !== 0) {\n        properties['heading'] = rotation; // 0-360\n    }\n    var color = style.getColor();\n    if (color) {\n        properties['color'] = color;\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = ICON_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, ICON_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKe
 ys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'color',\n    'scale',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'scale': makeChildAppender(writeScaleTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Text} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLabelStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {};\n    var fill = style.getFill();\n    if (fill) {\n        properties['color'] = fill.getColor();\n    }\n    var scale = style.getScale();\n    if (scale && scale !== 1) {\n        properties['scale'] = scale;\n    }\n    var parentNode = obj
 ectStack[objectStack.length - 1].node;\n    var orderedKeys = LABEL_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, LABEL_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar LINE_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['color', 'width']);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LINE_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'width': makeChildAppender(writeDecimalTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Stroke} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLineStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node 
 };\n    var properties = {\n        'color': style.getColor(),\n        'width': Number(style.getWidth()) || 1,\n    };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = LINE_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, LINE_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n    'Point': 'Point',\n    'LineString': 'LineString',\n    'LinearRing': 'LinearRing',\n    'Polygon': 'Polygon',\n    'MultiPoint': 'MultiGeometry',\n    'MultiLineString': 'MultiGeometry',\n    'MultiPolygon': 'MultiGeometry',\n    'GeometryCollection': 'MultiGeometry',\n};\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar GEOMETRY_
 NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    if (value) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS(parentNode.namespaceURI, GEOMETRY_TYPE_TO_NODENAME[\n        /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType()]);\n    }\n};\n/**\n * A factory for creating Point nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POINT_NODE_FACTORY = makeSimpleNodeFactory('Point');\n/**\n * A factory for creating LineString nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINE_STRING_NODE_FACTORY = makeSimpleNodeFactory('LineString');\n/**\n * A factory for creating LinearRing nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINEAR_RING_NODE_FACTORY = makeSimpleNodeFactory('LinearRing');\n/**\n * A factory for creating Polygon nodes.\n * @const\n * @type {function(*, Array<*>, string=
 ): (Node|undefined)}\n */\nvar POLYGON_NODE_FACTORY = makeSimpleNodeFactory('Polygon');\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar MULTI_GEOMETRY_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'GeometryCollection': makeChildAppender(writeMultiGeometry),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeMultiGeometry(node, geometry, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    var type = geometry.getType();\n    /** @type {Array<import(\"../geom/Geometry.js\").default>} */\n    var geometries = [];\n    /** @type {function(*, Array<*>, string=): (N
 ode|undefined)} */\n    var factory;\n    if (type === GeometryType.GEOMETRY_COLLECTION) {\n        /** @type {GeometryCollection} */ (geometry)\n            .getGeometriesArrayRecursive()\n            .forEach(function (geometry) {\n            var type = geometry.getType();\n            if (type === GeometryType.MULTI_POINT) {\n                geometries = geometries.concat(\n                /** @type {MultiPoint} */ (geometry).getPoints());\n            }\n            else if (type === GeometryType.MULTI_LINE_STRING) {\n                geometries = geometries.concat(\n                /** @type {MultiLineString} */ (geometry).getLineStrings());\n            }\n            else if (type === GeometryType.MULTI_POLYGON) {\n                geometries = geometries.concat(\n                /** @type {MultiPolygon} */ (geometry).getPolygons());\n            }\n            else if (type === GeometryType.POINT ||\n                type === GeometryType.LINE_STRING ||\n                type =
 == GeometryType.POLYGON) {\n                geometries.push(geometry);\n            }\n            else {\n                assert(false, 39); // Unknown geometry type\n            }\n        });\n        factory = GEOMETRY_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_POINT) {\n        geometries = /** @type {MultiPoint} */ (geometry).getPoints();\n        factory = POINT_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_LINE_STRING) {\n        geometries = /** @type {MultiLineString} */ (geometry).getLineStrings();\n        factory = LINE_STRING_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_POLYGON) {\n        geometries = /** @type {MultiPolygon} */ (geometry).getPolygons();\n        factory = POLYGON_NODE_FACTORY;\n    }\n    else {\n        assert(false, 39); // Unknown geometry type\n    }\n    pushSerializeAndPop(context, MULTI_GEOMETRY_SERIALIZERS, factory, geometries, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Ob
 ject<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar BOUNDARY_IS_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeChildAppender(writePrimitiveGeometry),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/LinearRing.js\").default} linearRing Linear ring.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeBoundaryIs(node, linearRing, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    pushSerializeAndPop(context, BOUNDARY_IS_SERIALIZERS, LINEAR_RING_NODE_FACTORY, [linearRing], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar PLACEMARK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': makeChildAppender(writeExtendedData),\n    'MultiGeometry': makeChildAppender(writeMultiGeometry),\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'Linea
 rRing': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'Style': makeChildAppender(writeStyle),\n    'address': makeChildAppender(writeStringTextNode),\n    'description': makeChildAppender(writeStringTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'open': makeChildAppender(writeBooleanTextNode),\n    'phoneNumber': makeChildAppender(writeStringTextNode),\n    'styleUrl': makeChildAppender(writeStringTextNode),\n    'visibility': makeChildAppender(writeBooleanTextNode),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar PLACEMARK_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'open',\n    'visibility',\n    'address',\n    'phoneNumber',\n    'description',\n    'styleUrl',\n    'Style',\n]);\n/**\n * A factory for creating ExtendedData nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\
 n */\nvar EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');\n/**\n * FIXME currently we do serialize arbitrary/custom feature properties\n * (ExtendedData).\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writePlacemark(node, feature, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    // set id\n    if (feature.getId()) {\n        node.setAttribute('id', /** @type {string} */ (feature.getId()));\n    }\n    // serialize properties (properties unknown to KML are not serialized)\n    var properties = feature.getProperties();\n    // don't export these to ExtendedData\n    var filter = {\n        'address': 1,\n        'description': 1,\n        'name': 1,\n        'open': 1,\n        'phoneNumber': 1,\n        'styleUrl': 1,\n        'visibility': 1,\n    };\n    filter[feature.getGeometryName()] = 1;\n    var keys
  = Object.keys(properties || {})\n        .sort()\n        .filter(function (v) {\n        return !filter[v];\n    });\n    var styleFunction = feature.getStyleFunction();\n    if (styleFunction) {\n        // FIXME the styles returned by the style function are supposed to be\n        // resolution-independent here\n        var styles = styleFunction(feature, 0);\n        if (styles) {\n            var styleArray = Array.isArray(styles) ? styles : [styles];\n            var pointStyles = styleArray;\n            if (feature.getGeometry()) {\n                pointStyles = styleArray.filter(function (style) {\n                    var geometry = style.getGeometryFunction()(feature);\n                    if (geometry) {\n                        var type = geometry.getType();\n                        if (type === GeometryType.GEOMETRY_COLLECTION) {\n                            return /** @type {GeometryCollection} */ (geometry)\n                                .getGeometriesArrayRecursiv
 e()\n                                .filter(function (geometry) {\n                                var type = geometry.getType();\n                                return (type === GeometryType.POINT ||\n                                    type === GeometryType.MULTI_POINT);\n                            }).length;\n                        }\n                        return (type === GeometryType.POINT || type === GeometryType.MULTI_POINT);\n                    }\n                });\n            }\n            if (this.writeStyles_) {\n                var lineStyles = styleArray;\n                var polyStyles = styleArray;\n                if (feature.getGeometry()) {\n                    lineStyles = styleArray.filter(function (style) {\n                        var geometry = style.getGeometryFunction()(feature);\n                        if (geometry) {\n                            var type = geometry.getType();\n                            if (type === GeometryType.GEOMETRY_COLLE
 CTION) {\n                                return /** @type {GeometryCollection} */ (geometry)\n                                    .getGeometriesArrayRecursive()\n                                    .filter(function (geometry) {\n                                    var type = geometry.getType();\n                                    return (type === GeometryType.LINE_STRING ||\n                                        type === GeometryType.MULTI_LINE_STRING);\n                                }).length;\n                            }\n                            return (type === GeometryType.LINE_STRING ||\n                                type === GeometryType.MULTI_LINE_STRING);\n                        }\n                    });\n                    polyStyles = styleArray.filter(function (style) {\n                        var geometry = style.getGeometryFunction()(feature);\n                        if (geometry) {\n                            var type = geometry.getType();\n        
                     if (type === GeometryType.GEOMETRY_COLLECTION) {\n                                return /** @type {GeometryCollection} */ (geometry)\n                                    .getGeometriesArrayRecursive()\n                                    .filter(function (geometry) {\n                                    var type = geometry.getType();\n                                    return (type === GeometryType.POLYGON ||\n                                        type === GeometryType.MULTI_POLYGON);\n                                }).length;\n                            }\n                            return (type === GeometryType.POLYGON ||\n                                type === GeometryType.MULTI_POLYGON);\n                        }\n                    });\n                }\n                properties['Style'] = {\n                    pointStyles: pointStyles,\n                    lineStyles: lineStyles,\n                    polyStyles: polyStyles,\n                }
 ;\n            }\n            if (pointStyles.length && properties['name'] === undefined) {\n                var textStyle = pointStyles[0].getText();\n                if (textStyle) {\n                    properties['name'] = textStyle.getText();\n                }\n            }\n        }\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = PLACEMARK_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n    if (keys.length > 0) {\n        var sequence = makeSequence(properties, keys);\n        var namesAndValues = { names: keys, values: sequence };\n        pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, EXTENDEDDATA_NODE_FACTORY, [namesAndValues], objectStack);\n    }\n    // serialize geometry\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStac
 k[0]);\n    var geometry = feature.getGeometry();\n    if (geometry) {\n        geometry = transformGeometryWithOptions(geometry, true, options);\n    }\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, GEOMETRY_NODE_FACTORY, [geometry], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar PRIMITIVE_GEOMETRY_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'extrude',\n    'tessellate',\n    'altitudeMode',\n    'coordinates',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'extrude': makeChildAppender(writeBooleanTextNode),\n    'tessellate': makeChildAppender(writeBooleanTextNode),\n    'altitudeMode': makeChildAppender(writeStringTextNode),\n    'coordinates': makeChildAppender(writeCoordinatesTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/SimpleGeome
 try.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePrimitiveGeometry(node, geometry, objectStack) {\n    var flatCoordinates = geometry.getFlatCoordinates();\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    context['layout'] = geometry.getLayout();\n    context['stride'] = geometry.getStride();\n    // serialize properties (properties unknown to KML are not serialized)\n    var properties = geometry.getProperties();\n    properties.coordinates = flatCoordinates;\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = PRIMITIVE_GEOMETRY_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, PRIMITIVE_GEOMETRY_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar POLY_STYLE_SEQUENC
 E = makeStructureNS(NAMESPACE_URIS, [\n    'color',\n    'fill',\n    'outline',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar POLYGON_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'outerBoundaryIs': makeChildAppender(writeBoundaryIs),\n    'innerBoundaryIs': makeChildAppender(writeBoundaryIs),\n});\n/**\n * A factory for creating innerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar INNER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('innerBoundaryIs');\n/**\n * A factory for creating outerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');\n/**\n * @param {Node} node Node.\n * @param {Polygon} polygon Polygon.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolygon(node, polygon, objectStack) {\n    var linearR
 ings = polygon.getLinearRings();\n    var outerRing = linearRings.shift();\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    // inner rings\n    pushSerializeAndPop(context, POLYGON_SERIALIZERS, INNER_BOUNDARY_NODE_FACTORY, linearRings, objectStack);\n    // outer ring\n    pushSerializeAndPop(context, POLYGON_SERIALIZERS, OUTER_BOUNDARY_NODE_FACTORY, [outerRing], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar POLY_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'fill': makeChildAppender(writeBooleanTextNode),\n    'outline': makeChildAppender(writeBooleanTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Style} style Style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolyStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackIte
 m} */ context = { node: node };\n    var fill = style.getFill();\n    var stroke = style.getStroke();\n    var properties = {\n        'color': fill ? fill.getColor() : undefined,\n        'fill': fill ? undefined : false,\n        'outline': stroke ? undefined : false,\n    };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = POLY_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, POLY_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node to append a TextNode with the scale to.\n * @param {number|undefined} scale Scale.\n */\nfunction writeScaleTextNode(node, scale) {\n    // the Math is to remove any excess decimals created by float arithmetic\n    writeDecimalTextNode(node, Math.round(scale * 1e6) / 1e6);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar STYLE_SEQ
 UENCE = makeStructureNS(NAMESPACE_URIS, [\n    'IconStyle',\n    'LabelStyle',\n    'LineStyle',\n    'PolyStyle',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'IconStyle': makeChildAppender(writeIconStyle),\n    'LabelStyle': makeChildAppender(writeLabelStyle),\n    'LineStyle': makeChildAppender(writeLineStyle),\n    'PolyStyle': makeChildAppender(writePolyStyle),\n});\n/**\n * @param {Node} node Node.\n * @param {Object<string, Array<Style>>} styles Styles.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeStyle(node, styles, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {};\n    if (styles.pointStyles.length) {\n        var textStyle = styles.pointStyles[0].getText();\n        if (textStyle) {\n            properties['LabelStyle'] = textStyle;\n      
   }\n        var imageStyle = styles.pointStyles[0].getImage();\n        if (imageStyle &&\n            typeof ( /** @type {?} */(imageStyle).getSrc) === 'function') {\n            properties['IconStyle'] = imageStyle;\n        }\n    }\n    if (styles.lineStyles.length) {\n        var strokeStyle = styles.lineStyles[0].getStroke();\n        if (strokeStyle) {\n            properties['LineStyle'] = strokeStyle;\n        }\n    }\n    if (styles.polyStyles.length) {\n        var strokeStyle = styles.polyStyles[0].getStroke();\n        if (strokeStyle && !properties['LineStyle']) {\n            properties['LineStyle'] = strokeStyle;\n        }\n        properties['PolyStyle'] = styles.polyStyles[0];\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectS
 tack, orderedKeys);\n}\n/**\n * @param {Element} node Node to append a TextNode with the Vec2 to.\n * @param {Vec2} vec2 Vec2.\n */\nfunction writeVec2(node, vec2) {\n    node.setAttribute('x', String(vec2.x));\n    node.setAttribute('y', String(vec2.y));\n    node.setAttribute('xunits', vec2.xunits);\n    node.setAttribute('yunits', vec2.yunits);\n}\nexport default KML;\n//# sourceMappingURL=KML.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    
 };\n})();\n/**\n * @module ol/format/IGC\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport TextFeature from './TextFeature.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * IGC altitude/z. One of 'barometric', 'gps', 'none'.\n * @enum {string}\n */\nvar IGCZ = {\n    BAROMETRIC: 'barometric',\n    GPS: 'gps',\n    NONE: 'none',\n};\n/**\n * @const\n * @type {RegExp}\n */\nvar B_RECORD_RE = /^B(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{5})([NS])(\\d{3})(\\d{5})([EW])([AV])(\\d{5})(\\d{5})/;\n/**\n * @const\n * @type {RegExp}\n */\nvar H_RECORD_RE = /^H.([A-Z]{3}).*?:(.*)/;\n/**\n * @const\n * @type {RegExp}\n */\nvar HFDTE_RECORD_RE = /^HFDTE(\\d{2})(\\d{2})(\\d{2})/;\n/**\n * A regular expression matching the newline characters `\\r\\n`, `\\r` and `\\n`.\n *\n * @const\n * @type {RegExp}\n */\nvar NEWLINE_R
 E = /\\r\\n|\\r|\\n/;\n/**\n * @typedef {Object} Options\n * @property {IGCZ|string} [altitudeMode='none'] Altitude mode. Possible\n * values are `'barometric'`, `'gps'`, and `'none'`.\n */\n/**\n * @classdesc\n * Feature format for `*.igc` flight recording files.\n *\n * As IGC sources contain a single feature,\n * {@link module:ol/format/IGC~IGC#readFeatures} will return the feature in an\n * array\n *\n * @api\n */\nvar IGC = /** @class */ (function (_super) {\n    __extends(IGC, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function IGC(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {IGCZ}\n         */\n        _this.altitudeMode_ = options.altitudeMode\n            ? options.alti
 tudeMode\n            : IGCZ.NONE;\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    IGC.prototype.readFeatureFromText = function (text, opt_options) {\n        var altitudeMode = this.altitudeMode_;\n        var lines = text.split(NEWLINE_RE);\n        /** @type {Object<string, string>} */\n        var properties = {};\n        var flatCoordinates = [];\n        var year = 2000;\n        var month = 0;\n        var day = 1;\n        var lastDateTime = -1;\n        var i, ii;\n        for (i = 0, ii = lines.length; i < ii; ++i) {\n            var line = lines[i];\n            var m = void 0;\n            if (line.charAt(0) == 'B') {\n                m = B_RECORD_RE.exec(line);\n                if (m) {\n                    var hour = parseInt(m[1], 10);\n                    var minute = 
 parseInt(m[2], 10);\n                    var second = parseInt(m[3], 10);\n                    var y = parseInt(m[4], 10) + parseInt(m[5], 10) / 60000;\n                    if (m[6] == 'S') {\n                        y = -y;\n                    }\n                    var x = parseInt(m[7], 10) + parseInt(m[8], 10) / 60000;\n                    if (m[9] == 'W') {\n                        x = -x;\n                    }\n                    flatCoordinates.push(x, y);\n                    if (altitudeMode != IGCZ.NONE) {\n                        var z = void 0;\n                        if (altitudeMode == IGCZ.GPS) {\n                            z = parseInt(m[11], 10);\n                        }\n                        else if (altitudeMode == IGCZ.BAROMETRIC) {\n                            z = parseInt(m[12], 10);\n                        }\n                        else {\n                            z = 0;\n                        }\n                        flatCoordinates.push(z)
 ;\n                    }\n                    var dateTime = Date.UTC(year, month, day, hour, minute, second);\n                    // Detect UTC midnight wrap around.\n                    if (dateTime < lastDateTime) {\n                        dateTime = Date.UTC(year, month, day + 1, hour, minute, second);\n                    }\n                    flatCoordinates.push(dateTime / 1000);\n                    lastDateTime = dateTime;\n                }\n            }\n            else if (line.charAt(0) == 'H') {\n                m = HFDTE_RECORD_RE.exec(line);\n                if (m) {\n                    day = parseInt(m[1], 10);\n                    month = parseInt(m[2], 10) - 1;\n                    year = 2000 + parseInt(m[3], 10);\n                }\n                else {\n                    m = H_RECORD_RE.exec(line);\n                    if (m) {\n                        properties[m[1]] = m[2].trim();\n                    }\n                }\n            }\n        }\
 n        if (flatCoordinates.length === 0) {\n            return null;\n        }\n        var layout = altitudeMode == IGCZ.NONE ? GeometryLayout.XYM : GeometryLayout.XYZM;\n        var lineString = new LineString(flatCoordinates, layout);\n        var feature = new Feature(transformGeometryWithOptions(lineString, false, opt_options));\n        feature.setProperties(properties, true);\n        return feature;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    IGC.prototype.readFeaturesFromText = function (text, opt_options) {\n        var feature = this.readFeatureFromText(text, opt_options);\n        if (feature) {\n            return [feature];\n        }\n        else {\n            return [];\n        }\n    };\n    return IGC;\n}(TextFeature));\nexport default IGC;\n//# sourceMappingURL=IGC.js.map","var __extends = (this 
 && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/OSMXML\n */\n// FIXME add typedef for stack state objects\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport XMLFeature from './XMLFeature.js';\nimport { extend } from '../array.js';\nimport { get as getProjecti
 on } from '../proj.js';\nimport { isEmpty } from '../obj.js';\nimport { makeStructureNS, pushParseAndPop } from '../xml.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @const\n * @type {Array<null>}\n */\nvar NAMESPACE_URIS = [null];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WAY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'nd': readNd,\n    'tag': readTag,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'node': readNode,\n    'way': readWay,\n});\n/**\n * @classdesc\n * Feature format for reading data in the\n * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).\n *\n * @api\n */\nvar OSMXML = /** @class */ (function (_super) {\n    __extends(OSMXML, _super);\n    function OSMXML() {\n        var _this = _super.call(this) || this;\n        /**\n       
   * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    OSMXML.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = this.getReadOptions(node, opt_options);\n        if (node.localName == 'osm') {\n            var state = pushParseAndPop({\n                nodes: {},\n                ways: [],\n                features: [],\n            }, PARSERS, node, [options]);\n            // parse nodes in ways\n            for (var j = 0; j < state.ways.length; j++) {\n                var values = /** @type {Object} */ (state.ways[j]);\n                /** @type {Array<number>} */\n                var flatCoordinates = [];\n                f
 or (var i = 0, ii = values.ndrefs.length; i < ii; i++) {\n                    var point = state.nodes[values.ndrefs[i]];\n                    extend(flatCoordinates, point);\n                }\n                var geometry = void 0;\n                if (values.ndrefs[0] == values.ndrefs[values.ndrefs.length - 1]) {\n                    // closed way\n                    geometry = new Polygon(flatCoordinates, GeometryLayout.XY, [\n                        flatCoordinates.length,\n                    ]);\n                }\n                else {\n                    geometry = new LineString(flatCoordinates, GeometryLayout.XY);\n                }\n                transformGeometryWithOptions(geometry, false, options);\n                var feature = new Feature(geometry);\n                feature.setId(values.id);\n                feature.setProperties(values.tags, true);\n                state.features.push(feature);\n            }\n            if (state.features) {\n                
 return state.features;\n            }\n        }\n        return [];\n    };\n    return OSMXML;\n}(XMLFeature));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar NODE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'tag': readTag,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNode(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var id = node.getAttribute('id');\n    /** @type {import(\"../coordinate.js\").Coordinate} */\n    var coordinates = [\n        parseFloat(node.getAttribute('lon')),\n        parseFloat(node.getAttribute('lat')),\n    ];\n    state.nodes[id] = coordinates;\n    var values = pushParseAndPop({\n        tags: {},\n    }, NODE_PARSERS, node, objectStack);\n    if (!isEmpty(values.tags)) {\n   
      var geometry = new Point(coordinates);\n        transformGeometryWithOptions(geometry, false, options);\n        var feature = new Feature(geometry);\n        feature.setId(id);\n        feature.setProperties(values.tags, true);\n        state.features.push(feature);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readWay(node, objectStack) {\n    var id = node.getAttribute('id');\n    var values = pushParseAndPop({\n        id: id,\n        ndrefs: [],\n        tags: {},\n    }, WAY_PARSERS, node, objectStack);\n    var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    state.ways.push(values);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNd(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values.ndrefs.push(node.getAttribute('ref'));\n}\n/**\n * @param {Element} node Node.\n *
  @param {Array<*>} objectStack Object stack.\n */\nfunction readTag(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values.tags[node.getAttribute('k')] = node.getAttribute('v');\n}\nexport default OSMXML;\n//# sourceMappingURL=OSMXML.js.map","/**\n * @module ol/geom/flat/flip\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_destOffset Destination offset.\n * @return {Array<number>} Flat coordinates.\n */\nexport function flipXY(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {\n    var dest, destOffset;\n    if (opt_dest !== undefined) {\n        dest = opt_dest;\n        destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;\n    }\n    else {\n        dest = [];\n        destOffset = 0;\n    }\n    var j = o
 ffset;\n    while (j < end) {\n        var x = flatCoordinates[j++];\n        dest[destOffset++] = flatCoordinates[j++];\n        dest[destOffset++] = x;\n        for (var k = 2; k < stride; ++k) {\n            dest[destOffset++] = flatCoordinates[j++];\n        }\n    }\n    dest.length = destOffset;\n    return dest;\n}\n//# sourceMappingURL=flip.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/Polyline\n *
 /\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport TextFeature from './TextFeature.js';\nimport { assert } from '../asserts.js';\nimport { flipXY } from '../geom/flat/flip.js';\nimport { get as getProjection } from '../proj.js';\nimport { getStrideForLayout } from '../geom/SimpleGeometry.js';\nimport { inflateCoordinates } from '../geom/flat/inflate.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {Object} Options\n * @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.\n * @property {GeometryLayout} [geometryLayout='XY'] Layout of the\n * feature geometries created by the format reader.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the Encoded\n * Polyline Algorithm Format.\n *\n * When reading features, the coordinates are assumed to be in two dimensions\n * and in [latitude, l
 ongitude] order.\n *\n * As Polyline sources contain a single feature,\n * {@link module:ol/format/Polyline~Polyline#readFeatures} will return the\n * feature in an array.\n *\n * @api\n */\nvar Polyline = /** @class */ (function (_super) {\n    __extends(Polyline, _super);\n    /**\n     * @param {Options=} opt_options Optional configuration object.\n     */\n    function Polyline(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.factor_ = options.factor ? options.factor : 1e5;\n        /**\n         * @private\n         * @type {import(\"../geom/GeometryLayout\").default}\n         */\n        _this.geometryLayout_ = options.geometryLayout\n            ? options.geometryLayout\n   
          : GeometryLayout.XY;\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    Polyline.prototype.readFeatureFromText = function (text, opt_options) {\n        var geometry = this.readGeometryFromText(text, opt_options);\n        return new Feature(geometry);\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    Polyline.prototype.readFeaturesFromText = function (text, opt_options) {\n        var feature = this.readFeatureFromText(text, opt_options);\n        return [feature];\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * 
 @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    Polyline.prototype.readGeometryFromText = function (text, opt_options) {\n        var stride = getStrideForLayout(this.geometryLayout_);\n        var flatCoordinates = decodeDeltas(text, stride, this.factor_);\n        flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n        var coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride);\n        var lineString = new LineString(coordinates, this.geometryLayout_);\n        return transformGeometryWithOptions(lineString, false, this.adaptOptions(opt_options));\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeFeatureText = function (feature, opt_options) {\n        var geometry = feature.getGeometry();\n 
        if (geometry) {\n            return this.writeGeometryText(geometry, opt_options);\n        }\n        else {\n            assert(false, 40); // Expected `feature` to have a geometry\n            return '';\n        }\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeFeaturesText = function (features, opt_options) {\n        return this.writeFeatureText(features[0], opt_options);\n    };\n    /**\n     * @param {LineString} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeGeometryText = function (geometry, opt_options) {\n        geometry =\n            /** @type {LineString} */\n            (transformGeometryWithOptions(geome
 try, true, this.adaptOptions(opt_options)));\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n        return encodeDeltas(flatCoordinates, stride, this.factor_);\n    };\n    return Polyline;\n}(TextFeature));\n/**\n * Encode a list of n-dimensional points and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of n-dimensional points.\n * @param {number} stride The number of dimension of the points in the list.\n * @param {number=} opt_factor The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeDeltas(numbers, stride, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var d;\n    var
  lastNumbers = new Array(stride);\n    for (d = 0; d < stride; ++d) {\n        lastNumbers[d] = 0;\n    }\n    for (var i = 0, ii = numbers.length; i < ii;) {\n        for (d = 0; d < stride; ++d, ++i) {\n            var num = numbers[i];\n            var delta = num - lastNumbers[d];\n            lastNumbers[d] = num;\n            numbers[i] = delta;\n        }\n    }\n    return encodeFloats(numbers, factor);\n}\n/**\n * Decode a list of n-dimensional points from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number} stride The number of dimension of the points in the\n *     encoded string.\n * @param {number=} opt_factor The factor by which the resulting numbers will\n *     be divided. Default is `1e5`.\n * @return {Array<number>} A list of n-dimensional points.\n * @api\n */\nexport function decodeDeltas(encoded, stride, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var d;\n    /** @type {Array<number>} */\n    var lastNu
 mbers = new Array(stride);\n    for (d = 0; d < stride; ++d) {\n        lastNumbers[d] = 0;\n    }\n    var numbers = decodeFloats(encoded, factor);\n    for (var i = 0, ii = numbers.length; i < ii;) {\n        for (d = 0; d < stride; ++d, ++i) {\n            lastNumbers[d] += numbers[i];\n            numbers[i] = lastNumbers[d];\n        }\n    }\n    return numbers;\n}\n/**\n * Encode a list of floating point numbers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of floating point numbers.\n * @param {number=} opt_factor The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeFloats(numbers, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        numbers[i] = Mat
 h.round(numbers[i] * factor);\n    }\n    return encodeSignedIntegers(numbers);\n}\n/**\n * Decode a list of floating point numbers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number=} opt_factor The factor by which the result will be divided.\n *     Default is `1e5`.\n * @return {Array<number>} A list of floating point numbers.\n * @api\n */\nexport function decodeFloats(encoded, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var numbers = decodeSignedIntegers(encoded);\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        numbers[i] /= factor;\n    }\n    return numbers;\n}\n/**\n * Encode a list of signed integers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of signed integers.\n * @return {string} The encoded string.\n */\nexport function encodeSignedIntegers(numbers) {\n    for (var i = 0, ii = numbers.length; i
  < ii; ++i) {\n        var num = numbers[i];\n        numbers[i] = num < 0 ? ~(num << 1) : num << 1;\n    }\n    return encodeUnsignedIntegers(numbers);\n}\n/**\n * Decode a list of signed integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of signed integers.\n */\nexport function decodeSignedIntegers(encoded) {\n    var numbers = decodeUnsignedIntegers(encoded);\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        var num = numbers[i];\n        numbers[i] = num & 1 ? ~(num >> 1) : num >> 1;\n    }\n    return numbers;\n}\n/**\n * Encode a list of unsigned integers and return an encoded string\n *\n * @param {Array<number>} numbers A list of unsigned integers.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedIntegers(numbers) {\n    var encoded = '';\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        encoded += encodeUnsignedInteger(numbers[i]);\n    }\n    retu
 rn encoded;\n}\n/**\n * Decode a list of unsigned integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of unsigned integers.\n */\nexport function decodeUnsignedIntegers(encoded) {\n    var numbers = [];\n    var current = 0;\n    var shift = 0;\n    for (var i = 0, ii = encoded.length; i < ii; ++i) {\n        var b = encoded.charCodeAt(i) - 63;\n        current |= (b & 0x1f) << shift;\n        if (b < 0x20) {\n            numbers.push(current);\n            current = 0;\n            shift = 0;\n        }\n        else {\n            shift += 5;\n        }\n    }\n    return numbers;\n}\n/**\n * Encode one single unsigned integer and return an encoded string\n *\n * @param {number} num Unsigned integer that should be encoded.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedInteger(num) {\n    var value, encoded = '';\n    while (num >= 0x20) {\n        value = (0x20 | (num & 0x1f)) + 63;\n 
        encoded += String.fromCharCode(value);\n        num >>= 5;\n    }\n    value = num + 63;\n    encoded += String.fromCharCode(value);\n    return encoded;\n}\nexport default Polyline;\n//# sourceMappingURL=Polyline.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/TopoJSON\n */\nimport Feature from '../Feature.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.j
 s';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"topojson-specification\").Topology} TopoJSONTopology\n * @typedef {import(\"topojson-specification\").GeometryCollection} TopoJSONGeometryCollection\n * @typedef {import(\"topojson-specification\").GeometryObject} TopoJSONGeometry\n * @typedef {import(\"topojson-specification\").Point} TopoJSONPoint\n * @typedef {import(\"topojson-specification\").MultiPoint} TopoJSONMultiPoint\n * @typedef {import(\"topojson-specification\").LineString} TopoJSONLineString\n * @typedef {import(\"topojson-specification\").MultiLineString} TopoJSONMultiLineString\n * @typedef {import(\"topojson-specification\").Polygon}
  TopoJSONPolygon\n * @typedef {import(\"topojson-specification\").MultiPolygon} TopoJSONMultiPolygon\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {string} [layerName] Set the name of the TopoJSON topology\n * `objects`'s children as feature property with the specified name. This means\n * that when set to `'layer'`, a topology like\n * ```\n * {\n *   \"type\": \"Topology\",\n *   \"objects\": {\n *     \"example\": {\n *       \"type\": \"GeometryCollection\",\n *       \"geometries\": []\n *     }\n *   }\n * }\n * ```\n * will result in features that have a property `'layer'` set to `'example'`.\n * When not set, no property will be added to features.\n * @property {Array<string>} [layers] Names of the TopoJSON topology's\n * `objects`'s children to read features from.  If not provided, features will\n * be read from all children.\n */\n/**\n * @classdesc\n * Featu
 re format for reading data in the TopoJSON format.\n *\n * @api\n */\nvar TopoJSON = /** @class */ (function (_super) {\n    __extends(TopoJSON, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function TopoJSON(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.layerName_ = options.layerName;\n        /**\n         * @private\n         * @type {?Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection(options.dataProjection ? options.dataProjection : 'EPSG:4326');\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n 
     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    TopoJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        if (object.type == 'Topology') {\n            var topoJSONTopology = /** @type {TopoJSONTopology} */ (object);\n            var transform = void 0, scale = null, translate = null;\n            if (topoJSONTopology['transform']) {\n                transform = topoJSONTopology['transform'];\n                scale = transform['scale'];\n                translate = transform['translate'];\n            }\n            var arcs = topoJSONTopology['arcs'];\n            if (transform) {\n                transformArcs(arcs, scale, translate);\n            }\n            /** @type {Array<Feature>} */\n            var features = [];\n            var topoJSONFeatures = topoJSONTopology['objects'];\n            var property = this.layerName_;\n            var feature = void 0;\n            for (var objectName in topoJSONFeatures) {\n      
           if (this.layers_ && this.layers_.indexOf(objectName) == -1) {\n                    continue;\n                }\n                if (topoJSONFeatures[objectName].type === 'GeometryCollection') {\n                    feature = /** @type {TopoJSONGeometryCollection} */ (topoJSONFeatures[objectName]);\n                    features.push.apply(features, readFeaturesFromGeometryCollection(feature, arcs, scale, translate, property, objectName, opt_options));\n                }\n                else {\n                    feature = /** @type {TopoJSONGeometry} */ (topoJSONFeatures[objectName]);\n                    features.push(readFeatureFromGeometry(feature, arcs, scale, translate, property, objectName, opt_options));\n                }\n            }\n            return features;\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Pro
 jection.\n     */\n    TopoJSON.prototype.readProjectionFromObject = function (object) {\n        return this.dataProjection;\n    };\n    return TopoJSON;\n}(JSONFeature));\n/**\n * @const\n * @type {Object<string, function(TopoJSONGeometry, Array, ...Array=): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {\n    'Point': readPointGeometry,\n    'LineString': readLineStringGeometry,\n    'Polygon': readPolygonGeometry,\n    'MultiPoint': readMultiPointGeometry,\n    'MultiLineString': readMultiLineStringGeometry,\n    'MultiPolygon': readMultiPolygonGeometry,\n};\n/**\n * Concatenate arcs into a coordinate array.\n * @param {Array<number>} indices Indices of arcs to concatenate.  Negative\n *     values indicate arcs need to be reversed.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs (already\n *     transformed).\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates array.\n */\nfunction concatenateA
 rcs(indices, arcs) {\n    /** @type {Array<import(\"../coordinate.js\").Coordinate>} */\n    var coordinates = [];\n    var index, arc;\n    for (var i = 0, ii = indices.length; i < ii; ++i) {\n        index = indices[i];\n        if (i > 0) {\n            // splicing together arcs, discard last point\n            coordinates.pop();\n        }\n        if (index >= 0) {\n            // forward arc\n            arc = arcs[index];\n        }\n        else {\n            // reverse arc\n            arc = arcs[~index].slice().reverse();\n        }\n        coordinates.push.apply(coordinates, arc);\n    }\n    // provide fresh copies of coordinate arrays\n    for (var j = 0, jj = coordinates.length; j < jj; ++j) {\n        coordinates[j] = coordinates[j].slice();\n    }\n    return coordinates;\n}\n/**\n * Create a point from a TopoJSON geometry object.\n *\n * @param {TopoJSONPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<numb
 er>} translate Translation for each dimension.\n * @return {Point} Geometry.\n */\nfunction readPointGeometry(object, scale, translate) {\n    var coordinates = object['coordinates'];\n    if (scale && translate) {\n        transformVertex(coordinates, scale, translate);\n    }\n    return new Point(coordinates);\n}\n/**\n * Create a multi-point from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {MultiPoint} Geometry.\n */\nfunction readMultiPointGeometry(object, scale, translate) {\n    var coordinates = object['coordinates'];\n    if (scale && translate) {\n        for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n            transformVertex(coordinates[i], scale, translate);\n        }\n    }\n    return new MultiPoint(coordinates);\n}\n/**\n * Create a linestring from a TopoJSON geometry objec
 t.\n *\n * @param {TopoJSONLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {LineString} Geometry.\n */\nfunction readLineStringGeometry(object, arcs) {\n    var coordinates = concatenateArcs(object['arcs'], arcs);\n    return new LineString(coordinates);\n}\n/**\n * Create a multi-linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiLineString} Geometry.\n */\nfunction readMultiLineStringGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n    }\n    return new MultiLineString(coordinates);\n}\n/**\n * Create a polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONPolygon} object TopoJSON object.\n 
 * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {Polygon} Geometry.\n */\nfunction readPolygonGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n    }\n    return new Polygon(coordinates);\n}\n/**\n * Create a multi-polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiPolygon} Geometry.\n */\nfunction readMultiPolygonGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        // for each polygon\n        var polyArray = object['arcs'][i];\n        var ringCoords = [];\n        for (var j = 0, jj = polyArray.length; j < jj; ++j) {\n            // for each ring\n            ringCoords[j] =
  concatenateArcs(polyArray[j], arcs);\n        }\n        coordinates[i] = ringCoords;\n    }\n    return new MultiPolygon(coordinates);\n}\n/**\n * Create features from a TopoJSON GeometryCollection object.\n *\n * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry\n *     object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Array<Feature>} Array of features.\n */\nfunction readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {\n    var geometries = collection['geometries'];\n    var features = [];
 \n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        features[i] = readFeatureFromGeometry(geometries[i], arcs, scale, translate, property, name, opt_options);\n    }\n    return features;\n}\n/**\n * Create a feature from a TopoJSON geometry object.\n *\n * @param {TopoJSONGeometry} object TopoJSON geometry object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Feature} Feature.\n */\nfunction readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {\n    var geometry;\n    var type = object.type;\n    var geometry
 Reader = GEOMETRY_READERS[type];\n    if (type === 'Point' || type === 'MultiPoint') {\n        geometry = geometryReader(object, scale, translate);\n    }\n    else {\n        geometry = geometryReader(object, arcs);\n    }\n    var feature = new Feature();\n    feature.setGeometry(transformGeometryWithOptions(geometry, false, opt_options));\n    if (object.id !== undefined) {\n        feature.setId(object.id);\n    }\n    var properties = object.properties;\n    if (property) {\n        if (!properties) {\n            properties = {};\n        }\n        properties[property] = name;\n    }\n    if (properties) {\n        feature.setProperties(properties, true);\n    }\n    return feature;\n}\n/**\n * Apply a linear transform to array of arcs.  The provided array of arcs is\n * modified in place.\n *\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate T
 ranslation for each dimension.\n */\nfunction transformArcs(arcs, scale, translate) {\n    for (var i = 0, ii = arcs.length; i < ii; ++i) {\n        transformArc(arcs[i], scale, translate);\n    }\n}\n/**\n * Apply a linear transform to an arc.  The provided arc is modified in place.\n *\n * @param {Array<import(\"../coordinate.js\").Coordinate>} arc Arc.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArc(arc, scale, translate) {\n    var x = 0;\n    var y = 0;\n    for (var i = 0, ii = arc.length; i < ii; ++i) {\n        var vertex = arc[i];\n        x += vertex[0];\n        y += vertex[1];\n        vertex[0] = x;\n        vertex[1] = y;\n        transformVertex(vertex, scale, translate);\n    }\n}\n/**\n * Apply a linear transform to a vertex.  The provided vertex is modified in\n * place.\n *\n * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n * @param {Array
 <number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformVertex(vertex, scale, translate) {\n    vertex[0] = vertex[0] * scale[0] + translate[0];\n    vertex[1] = vertex[1] * scale[1] + translate[1];\n}\nexport default TopoJSON;\n//# sourceMappingURL=TopoJSON.js.map","/**\n * @module ol/format/filter/Filter\n */\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature filters.\n *\n * @abstract\n */\nvar Filter = /** @class */ (function () {\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     */\n    function Filter(tagName) {\n        /**\n         * @private\n         * @type {!string}\n         */\n        this.tagName_ = tagName;\n    }\n    /**\n     * The XML tag name for a filter.\n     * @returns {!string} Name.\n     */\n    Filter.prototype.getTagName = function () {\n        re
 turn this.tagName_;\n    };\n    return Filter;\n}());\nexport default Filter;\n//# sourceMappingURL=Filter.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LogicalNary\n */\nimport Filter from './Filter.js';\nimport { assert } from '../../asserts.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature n-ary
  logical filters.\n *\n * @abstract\n */\nvar LogicalNary = /** @class */ (function (_super) {\n    __extends(LogicalNary, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {Array<import(\"./Filter.js\").default>} conditions Conditions.\n     */\n    function LogicalNary(tagName, conditions) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {Array<import(\"./Filter.js\").default>}\n         */\n        _this.conditions = conditions;\n        assert(_this.conditions.length >= 2, 57); // At least 2 conditions are required.\n        return _this;\n    }\n    return LogicalNary;\n}(Filter));\nexport default LogicalNary;\n//# sourceMappingURL=LogicalNary.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }
 ) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/And\n */\nimport LogicalNary from './LogicalNary.js';\n/**\n * @classdesc\n * Represents a logical `<And>` operator between two or more filter conditions.\n *\n * @abstract\n */\nvar And = /** @class */ (function (_super) {\n    __extends(And, _super);\n    /**\n     * @param {...import(\"./Filter.js\").default} conditions Conditions.\n     */\n    function And(conditions) {\n        return _super.call(this, 'And', Array.prototype.slice.call(arguments)) || this;\n    }\n    return And;\n}(LogicalNary));\nexport default And;\n//# sourceMappingURL=And.js.map","var __extends = (this && this.__extends)
  || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Bbox\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Represents a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @api\n */\nvar Bbox = /** @class */ (function (_super) {\n    __extends(Bbox, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../extent.js\").Extent} extent Ex
 tent.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be set\n     * on geometries when this is not provided.\n     */\n    function Bbox(geometryName, extent, opt_srsName) {\n        var _this = _super.call(this, 'BBOX') || this;\n        /**\n         * @type {!string}\n         */\n        _this.geometryName = geometryName;\n        /**\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.extent = extent;\n        if (extent.length !== 4) {\n            throw new Error('Expected an extent with four values ([minX, minY, maxX, maxY])');\n        }\n        /**\n         * @type {string|undefined}\n         */\n        _this.srsName = opt_srsName;\n        return _this;\n    }\n    return Bbox;\n}(Filter));\nexport default Bbox;\n//# sourceMappingURL=Bbox.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({
  __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Spatial\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Represents a spatial operator to test whether a geometry-valued property\n * relates to a given geometry.\n *\n * @abstract\n */\nvar Spatial = /** @class */ (function (_super) {\n    __extends(Spatial, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!im
 port(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Spatial(tagName, geometryName, geometry, opt_srsName) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.geometryName = geometryName || 'the_geom';\n        /**\n         * @type {import(\"../../geom/Geometry.js\").default}\n         */\n        _this.geometry = geometry;\n        /**\n         * @type {string|undefined}\n         */\n        _this.srsName = opt_srsName;\n        return _this;\n    }\n    return Spatial;\n}(Filter));\nexport default Spatial;\n//# sourceMappingURL=Spatial.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array &
 & function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Contains\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n * @api\n */\nvar Contains = /** @class */ (function (_super) {\n    __extends(Contains, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n  
    */\n    function Contains(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Contains', geometryName, geometry, opt_srsName) || this;\n    }\n    return Contains;\n}(Spatial));\nexport default Contains;\n//# sourceMappingURL=Contains.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Comparison\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Abstract class; norma
 lly only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property comparison filters.\n *\n * @abstract\n */\nvar Comparison = /** @class */ (function (_super) {\n    __extends(Comparison, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} propertyName Name of the context property to compare.\n     */\n    function Comparison(tagName, propertyName) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.propertyName = propertyName;\n        return _this;\n    }\n    return Comparison;\n}(Filter));\nexport default Comparison;\n//# sourceMappingURL=Comparison.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n  
           function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/During\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<During>` comparison operator.\n * @api\n */\nvar During = /** @class */ (function (_super) {\n    __extends(During, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!string} begin The begin date in ISO-8601 format.\n     * @param {!string} end The end date in ISO-8601 format.\n     */\n    function During(propertyName, begin, end) {\n        var _this = _super.call(this, 'During', propertyName) || this;\n        /**\n         * @type {!string}\n      
    */\n        _this.begin = begin;\n        /**\n         * @type {!string}\n         */\n        _this.end = end;\n        return _this;\n    }\n    return During;\n}(Comparison));\nexport default During;\n//# sourceMappingURL=During.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/ComparisonBinary\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Abstract class; normally only u
 sed for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property binary comparison filters.\n *\n * @abstract\n */\nvar ComparisonBinary = /** @class */ (function (_super) {\n    __extends(ComparisonBinary, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function ComparisonBinary(tagName, propertyName, expression, opt_matchCase) {\n        var _this = _super.call(this, tagName, propertyName) || this;\n        /**\n         * @type {!(string|number)}\n         */\n        _this.expression = expression;\n        /**\n         * @type {boolean|undefined}\n         */\n        _this.matchCase = opt_matchCase;\n        return _this;\n    }\n    return ComparisonBinary;\n}(Comparison));\nexport default Co
 mparisonBinary;\n//# sourceMappingURL=ComparisonBinary.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/EqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsEqualTo>` comparison operator.\n * @api\n */\nvar EqualTo = /** @class */ (function (_super) {\n    __extends(EqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of t
 he context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function EqualTo(propertyName, expression, opt_matchCase) {\n        return _super.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase) || this;\n    }\n    return EqualTo;\n}(ComparisonBinary));\nexport default EqualTo;\n//# sourceMappingURL=EqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.p
 rototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/GreaterThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThan>` comparison operator.\n * @api\n */\nvar GreaterThan = /** @class */ (function (_super) {\n    __extends(GreaterThan, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function GreaterThan(propertyName, expression) {\n        return _super.call(this, 'PropertyIsGreaterThan', propertyName, expression) || this;\n    }\n    return GreaterThan;\n}(ComparisonBinary));\nexport default GreaterThan;\n//# sourceMappingURL=GreaterThan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { 
 d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/GreaterThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n * @api\n */\nvar GreaterThanOrEqualTo = /** @class */ (function (_super) {\n    __extends(GreaterThanOrEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function GreaterThanOrEqualTo(propertyName, expression) {\n        return _super.call(this, 'PropertyIsGreaterThanOrEqualTo', prop
 ertyName, expression) || this;\n    }\n    return GreaterThanOrEqualTo;\n}(ComparisonBinary));\nexport default GreaterThanOrEqualTo;\n//# sourceMappingURL=GreaterThanOrEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Intersects\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given 
 geometry.\n * @api\n */\nvar Intersects = /** @class */ (function (_super) {\n    __extends(Intersects, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Intersects(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Intersects', geometryName, geometry, opt_srsName) || this;\n    }\n    return Intersects;\n}(Spatial));\nexport default Intersects;\n//# sourceMappingURL=Intersects.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p
 ] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsBetween\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsBetween>` comparison operator.\n * @api\n */\nvar IsBetween = /** @class */ (function (_super) {\n    __extends(IsBetween, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} lowerBoundary The lower bound of the range.\n     * @param {!number} upperBoundary The upper bound of the range.\n     */\n    function IsBetween(propertyName, lowerBoundary, upperBoundary) {\n        var _this = _super.call(this, 'PropertyIsBetween', propertyName) || this;\n        /**\n         * @type {!number}\n         */\n    
     _this.lowerBoundary = lowerBoundary;\n        /**\n         * @type {!number}\n         */\n        _this.upperBoundary = upperBoundary;\n        return _this;\n    }\n    return IsBetween;\n}(Comparison));\nexport default IsBetween;\n//# sourceMappingURL=IsBetween.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsLike\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represe
 nts a `<PropertyIsLike>` comparison operator.\n * @api\n */\nvar IsLike = /** @class */ (function (_super) {\n    __extends(IsLike, _super);\n    /**\n     * [constructor description]\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!string} pattern Text pattern.\n     * @param {string=} opt_wildCard Pattern character which matches any sequence of\n     *    zero or more string characters. Default is '*'.\n     * @param {string=} opt_singleChar pattern character which matches any single\n     *    string character. Default is '.'.\n     * @param {string=} opt_escapeChar Escape character which can be used to escape\n     *    the pattern characters. Default is '!'.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n        var _this = _super.call(this, 'PropertyIsLike', propertyName) || this;\n        /**\n         * @
 type {!string}\n         */\n        _this.pattern = pattern;\n        /**\n         * @type {!string}\n         */\n        _this.wildCard = opt_wildCard !== undefined ? opt_wildCard : '*';\n        /**\n         * @type {!string}\n         */\n        _this.singleChar = opt_singleChar !== undefined ? opt_singleChar : '.';\n        /**\n         * @type {!string}\n         */\n        _this.escapeChar = opt_escapeChar !== undefined ? opt_escapeChar : '!';\n        /**\n         * @type {boolean|undefined}\n         */\n        _this.matchCase = opt_matchCase;\n        return _this;\n    }\n    return IsLike;\n}(Comparison));\nexport default IsLike;\n//# sourceMappingURL=IsLike.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.ha
 sOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsNull\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsNull>` comparison operator.\n * @api\n */\nvar IsNull = /** @class */ (function (_super) {\n    __extends(IsNull, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     */\n    function IsNull(propertyName) {\n        return _super.call(this, 'PropertyIsNull', propertyName) || this;\n    }\n    return IsNull;\n}(Comparison));\nexport default IsNull;\n//# sourceMappingURL=IsNull.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics
  = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LessThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThan>` comparison operator.\n * @api\n */\nvar LessThan = /** @class */ (function (_super) {\n    __extends(LessThan, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function LessThan(propertyName, expression) {\n        return _super.call(this, 
 'PropertyIsLessThan', propertyName, expression) || this;\n    }\n    return LessThan;\n}(ComparisonBinary));\nexport default LessThan;\n//# sourceMappingURL=LessThan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LessThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n * @api\n */\nvar Les
 sThanOrEqualTo = /** @class */ (function (_super) {\n    __extends(LessThanOrEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function LessThanOrEqualTo(propertyName, expression) {\n        return _super.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression) || this;\n    }\n    return LessThanOrEqualTo;\n}(ComparisonBinary));\nexport default LessThanOrEqualTo;\n//# sourceMappingURL=LessThanOrEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n  
       function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Not\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Represents a logical `<Not>` operator for a filter condition.\n * @api\n */\nvar Not = /** @class */ (function (_super) {\n    __extends(Not, _super);\n    /**\n     * @param {!import(\"./Filter.js\").default} condition Filter condition.\n     */\n    function Not(condition) {\n        var _this = _super.call(this, 'Not') || this;\n        /**\n         * @type {!import(\"./Filter.js\").default}\n         */\n        _this.condition = condition;\n        return _this;\n    }\n    return Not;\n}(Filter));\nexport default Not;\n//# sourceMappingURL=Not.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __pro
 to__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/NotEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsNotEqualTo>` comparison operator.\n * @api\n */\nvar NotEqualTo = /** @class */ (function (_super) {\n    __extends(NotEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean=} opt_matchCase Case-sensitive?\n     */\n    function NotEqualTo(propertyName, expression, opt_matchC
 ase) {\n        return _super.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase) || this;\n    }\n    return NotEqualTo;\n}(ComparisonBinary));\nexport default NotEqualTo;\n//# sourceMappingURL=NotEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Or\n */\nimport LogicalNary from './LogicalNary.js';\n/**\n * @classdesc\n * Represents a logical `<Or>` operator between two 
 ore more filter conditions.\n * @api\n */\nvar Or = /** @class */ (function (_super) {\n    __extends(Or, _super);\n    /**\n     * @param {...import(\"./Filter.js\").default} conditions Conditions.\n     */\n    function Or(conditions) {\n        return _super.call(this, 'Or', Array.prototype.slice.call(arguments)) || this;\n    }\n    return Or;\n}(LogicalNary));\nexport default Or;\n//# sourceMappingURL=Or.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new
  __());\n    };\n})();\n/**\n * @module ol/format/filter/Within\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n * @api\n */\nvar Within = /** @class */ (function (_super) {\n    __extends(Within, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string=} opt_srsName SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Within(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Within', geometryName, geometry, opt_srsName) || this;\n    }\n    return Within;\n}(Spatial));\nexport default Within;\n//# sourceMappingURL=Within.js.map","/**\n * @module ol/format/filter\n */\nimport And from './filter/And.js';\nimport Bbox from './filter/Bbox.js';\nimport C
 ontains from './filter/Contains.js';\nimport During from './filter/During.js';\nimport EqualTo from './filter/EqualTo.js';\nimport GreaterThan from './filter/GreaterThan.js';\nimport GreaterThanOrEqualTo from './filter/GreaterThanOrEqualTo.js';\nimport Intersects from './filter/Intersects.js';\nimport IsBetween from './filter/IsBetween.js';\nimport IsLike from './filter/IsLike.js';\nimport IsNull from './filter/IsNull.js';\nimport LessThan from './filter/LessThan.js';\nimport LessThanOrEqualTo from './filter/LessThanOrEqualTo.js';\nimport Not from './filter/Not.js';\nimport NotEqualTo from './filter/NotEqualTo.js';\nimport Or from './filter/Or.js';\nimport Within from './filter/Within.js';\n/**\n * Create a logical `<And>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @returns {!And} `<And>` operator.\n * @api\n */\nexport function and(conditions) {\n    var params = [null].concat(Array.pr
 ototype.slice.call(arguments));\n    return new (Function.prototype.bind.apply(And, params))();\n}\n/**\n * Create a logical `<Or>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @returns {!Or} `<Or>` operator.\n * @api\n */\nexport function or(conditions) {\n    var params = [null].concat(Array.prototype.slice.call(arguments));\n    return new (Function.prototype.bind.apply(Or, params))();\n}\n/**\n * Represents a logical `<Not>` operator for a filter condition.\n *\n * @param {!import(\"./filter/Filter.js\").default} condition Filter condition.\n * @returns {!Not} `<Not>` operator.\n * @api\n */\nexport function not(condition) {\n    return new Not(condition);\n}\n/**\n * Create a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../extent.js\").Extent} extent E
 xtent.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Bbox} `<BBOX>` operator.\n * @api\n */\nexport function bbox(geometryName, extent, opt_srsName) {\n    return new Bbox(geometryName, extent, opt_srsName);\n}\n/**\n * Create a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Contains} `<Contains>` operator.\n * @api\n */\nexport function contains(geometryName, geometry, opt_srsName) {\n    return new Contains(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n *\n * @pa
 ram {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Intersects} `<Intersects>` operator.\n * @api\n */\nexport function intersects(geometryName, geometry, opt_srsName) {\n    return new Intersects(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Within} `<Within>` operator.\n * @api\n */\nexport function within(geometryName, geometry, opt_srsName) {\n    return new Within(geometryName, geometry, opt_srsName)
 ;\n}\n/**\n * Creates a `<PropertyIsEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!EqualTo} `<PropertyIsEqualTo>` operator.\n * @api\n */\nexport function equalTo(propertyName, expression, opt_matchCase) {\n    return new EqualTo(propertyName, expression, opt_matchCase);\n}\n/**\n * Creates a `<PropertyIsNotEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.\n * @api\n */\nexport function notEqualTo(propertyName, expression, opt_matchCase) {\n    return new NotEqualTo(propertyName, expression, opt_matchCase);\n}\n/**\n * Creates a `<PropertyIsLessThan>` compariso
 n operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!LessThan} `<PropertyIsLessThan>` operator.\n * @api\n */\nexport function lessThan(propertyName, expression) {\n    return new LessThan(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.\n * @api\n */\nexport function lessThanOrEqualTo(propertyName, expression) {\n    return new LessThanOrEqualTo(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsGreaterThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!GreaterThan} `<PropertyIsGreaterTha
 n>` operator.\n * @api\n */\nexport function greaterThan(propertyName, expression) {\n    return new GreaterThan(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.\n * @api\n */\nexport function greaterThanOrEqualTo(propertyName, expression) {\n    return new GreaterThanOrEqualTo(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsNull>` comparison operator to test whether a property value\n * is null.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @returns {!IsNull} `<PropertyIsNull>` operator.\n * @api\n */\nexport function isNull(propertyName) {\n    return new IsNull(propertyName);\n}\n/**\n * Creates a `<PropertyIsBetween>` comparison operator to test whether an express
 ion\n * value lies within a range given by a lower and upper bound (inclusive).\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} lowerBoundary The lower bound of the range.\n * @param {!number} upperBoundary The upper bound of the range.\n * @returns {!IsBetween} `<PropertyIsBetween>` operator.\n * @api\n */\nexport function between(propertyName, lowerBoundary, upperBoundary) {\n    return new IsBetween(propertyName, lowerBoundary, upperBoundary);\n}\n/**\n * Represents a `<PropertyIsLike>` comparison operator that matches a string property\n * value against a text pattern.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} pattern Text pattern.\n * @param {string=} opt_wildCard Pattern character which matches any sequence of\n *    zero or more string characters. Default is '*'.\n * @param {string=} opt_singleChar pattern character which matches any single\n *    string character. De
 fault is '.'.\n * @param {string=} opt_escapeChar Escape character which can be used to escape\n *    the pattern characters. Default is '!'.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!IsLike} `<PropertyIsLike>` operator.\n * @api\n */\nexport function like(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n    return new IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);\n}\n/**\n * Create a `<During>` temporal operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} begin The begin date in ISO-8601 format.\n * @param {!string} end The end date in ISO-8601 format.\n * @returns {!During} `<During>` operator.\n * @api\n */\nexport function during(propertyName, begin, end) {\n    return new During(propertyName, begin, end);\n}\n//# sourceMappingURL=filter.js.map","var __extends = (this && this.__extends) || (function () {\n    var ex
 tendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WFS\n */\nimport GML2 from './GML2.js';\nimport GML3 from './GML3.js';\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport XMLFeature from './XMLFeature.js';\nimport { XML_SCHEMA_INSTANCE_URI, createElementNS, isDocument, makeArrayPusher, makeChildAppender, makeObjectPropertySetter, makeSimpleNodeFactory, parse, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { and as andFilter, bbox as bboxFilter } from '
 ./filter.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { get as getProjection } from '../proj.js';\nimport { readNonNegativeInteger, readNonNegativeIntegerString, writeStringTextNode, } from './xsd.js';\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FEATURE_COLLECTION_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'boundedBy': makeObjectPropertySetter(GMLBase.prototype.readGeometryElement, 'bounds'),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_SUMMARY_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'totalInserted': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\".
 ./xml.js\").Parser>>}\n */\nvar TRANSACTION_RESPONSE_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'TransactionSummary': makeObjectPropertySetter(readTransactionSummary, 'transactionSummary'),\n        'InsertResults': makeObjectPropertySetter(readInsertResults, 'insertIds'),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar QUERY_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'PropertyName': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar TRANSACTION_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'Insert': makeChildAppender(writeFeature),\n        'Update': makeChildAppender(writeUpdate),\n        'Delete': makeChildAppender(writeDelete),\n        'Property': makeChildAppender(writeProperty),\n        'Native': makeChildAppender(writeNative),\n    },\n};\n/**\n * @typedef {Object} Options\n * 
 @property {Object<string, string>|string} [featureNS] The namespace URI used for features.\n * @property {Array<string>|string} [featureType] The feature type to parse. Only used for read operations.\n * @property {GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`.\n * @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.\n */\n/**\n * @typedef {Object} WriteGetFeatureOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {Array<string>} featureTypes The feature type names.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {string} [outputFormat] Output format.\n * @property {number} [maxFeatures] Maximum number of features to fetch.\n * @prope
 rty {string} [geometryName] Geometry name to use in a BBOX filter.\n * @property {Array<string>} [propertyNames] Optional list of property names to serialize.\n * @property {string} [viewParams] viewParams GeoServer vendor parameter.\n * @property {number} [startIndex] Start index to use for WFS paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services.\n * @property {number} [count] Number of features to retrieve when paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. Please note that some\n * Web Feature Services have repurposed `maxfeatures` instead.\n * @property {import(\"../extent.js\").Extent} [bbox] Extent to use for the BBOX filter.\n * @property {import(\"./filter/Filter.js\").default} [filter] Filter condition. See\n * {@link module:ol/format/Filter} for more information.\n * @property {string} [resultType] Indicates what response should be returned,\n * E.g. `hits` only includes the `numberOfFeatur
 es` attribute in the response and no features.\n */\n/**\n * @typedef {Object} WriteTransactionOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {string} featureType The feature type name.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {boolean} [hasZ] Must be set to true if the transaction is for\n * a 3D layer. This will allow the Z coordinate to be included in the transaction.\n * @property {Array<Object>} nativeElements Native elements. Currently not supported.\n * @property {import(\"./GMLBase.js\").Options} [gmlOptions] GML options for the WFS transaction writer.\n * @property {string} [version='1.1.0'] WFS version to use for the transaction. Can be either `1.0.0` or `1.1.0`.\n */\n/**\n * Number of features; bounds/extent.\n * @typedef
  {Object} FeatureCollectionMetadata\n * @property {number} numberOfFeatures\n * @property {import(\"../extent.js\").Extent} bounds\n */\n/**\n * Total deleted; total inserted; total updated; array of insert ids.\n * @typedef {Object} TransactionResponse\n * @property {number} totalDeleted\n * @property {number} totalInserted\n * @property {number} totalUpdated\n * @property {Array<string>} insertIds\n */\n/**\n * @type {string}\n */\nvar FEATURE_PREFIX = 'feature';\n/**\n * @type {string}\n */\nvar XMLNS = 'http://www.w3.org/2000/xmlns/';\n/**\n * @type {string}\n */\nvar OGCNS = 'http://www.opengis.net/ogc';\n/**\n * @type {string}\n */\nvar WFSNS = 'http://www.opengis.net/wfs';\n/**\n * @type {string}\n */\nvar FESNS = 'http://www.opengis.net/fes';\n/**\n * @type {Object<string, string>}\n */\nvar SCHEMA_LOCATIONS = {\n    '1.1.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd',\n    '1.0.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0
 .0/wfs.xsd',\n};\n/**\n * @const\n * @type {string}\n */\nvar DEFAULT_VERSION = '1.1.0';\n/**\n * @classdesc\n * Feature format for reading and writing data in the WFS format.\n * By default, supports WFS version 1.1.0. You can pass a GML format\n * as option if you want to read a WFS that contains GML2 (WFS 1.0.0).\n * Also see {@link module:ol/format/GMLBase~GMLBase} which is used by this format.\n *\n * @api\n */\nvar WFS = /** @class */ (function (_super) {\n    __extends(WFS, _super);\n    /**\n     * @param {Options=} opt_options Optional configuration object.\n     */\n    function WFS(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {Array<string>|string|undefined}\n         */\n        _this.featureType_ = options.featureType;\n        /**\n         * @private\n         * @type {Object<string, string>|string|undefined}\n         */\n        _this.featureN
 S_ = options.featureNS;\n        /**\n         * @private\n         * @type {GMLBase}\n         */\n        _this.gmlFormat_ = options.gmlFormat ? options.gmlFormat : new GML3();\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.schemaLocation_ = options.schemaLocation\n            ? options.schemaLocation\n            : SCHEMA_LOCATIONS[DEFAULT_VERSION];\n        return _this;\n    }\n    /**\n     * @return {Array<string>|string|undefined} featureType\n     */\n    WFS.prototype.getFeatureType = function () {\n        return this.featureType_;\n    };\n    /**\n     * @param {Array<string>|string|undefined} featureType Feature type(s) to parse.\n     */\n    WFS.prototype.setFeatureType = function (featureType) {\n        this.featureType_ = featureType;\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.
 js\").default>} Features.\n     */\n    WFS.prototype.readFeaturesFromNode = function (node, opt_options) {\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var context = {\n            node: node,\n        };\n        assign(context, {\n            'featureType': this.featureType_,\n            'featureNS': this.featureNS_,\n        });\n        assign(context, this.getReadOptions(node, opt_options ? opt_options : {}));\n        var objectStack = [context];\n        this.gmlFormat_.FEATURE_COLLECTION_PARSERS[GMLNS]['featureMember'] = makeArrayPusher(GMLBase.prototype.readFeaturesInternal);\n        var features = pushParseAndPop([], this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node, objectStack, this.gmlFormat_);\n        if (!features) {\n            features = [];\n        }\n        return features;\n    };\n    /**\n     * Read transaction response of the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {Transacti
 onResponse|undefined} Transaction response.\n     * @api\n     */\n    WFS.prototype.readTransactionResponse = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readTransactionResponseFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readTransactionResponseFromDocument(\n            /** @type {Document} */ (source));\n        }\n        else {\n            return this.readTransactionResponseFromNode(\n            /** @type {Element} */ (source));\n        }\n    };\n    /**\n     * Read feature collection metadata of the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     * @api\n     */\n    WFS.prototype.readFeatureCollectionMetadata = function (source) {\n        if 
 (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeatureCollectionMetadataFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readFeatureCollectionMetadataFromDocument(\n            /** @type {Document} */ (source));\n        }\n        else {\n            return this.readFeatureCollectionMetadataFromNode(\n            /** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     */\n    WFS.prototype.readFeatureCollectionMetadataFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readFeatureCollectionMetadataFromNode(\n                /** @ty
 pe {Element} */ (n));\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     */\n    WFS.prototype.readFeatureCollectionMetadataFromNode = function (node) {\n        var result = {};\n        var value = readNonNegativeIntegerString(node.getAttribute('numberOfFeatures'));\n        result['numberOfFeatures'] = value;\n        return pushParseAndPop(\n        /** @type {FeatureCollectionMetadata} */ (result), FEATURE_COLLECTION_PARSERS, node, [], this.gmlFormat_);\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {TransactionResponse|undefined} Transaction response.\n     */\n    WFS.prototype.readTransactionResponseFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.read
 TransactionResponseFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {TransactionResponse|undefined} Transaction response.\n     */\n    WFS.prototype.readTransactionResponseFromNode = function (node) {\n        return pushParseAndPop(\n        /** @type {TransactionResponse} */ ({}), TRANSACTION_RESPONSE_PARSERS, node, []);\n    };\n    /**\n     * Encode format as WFS `GetFeature` and return the Node.\n     *\n     * @param {WriteGetFeatureOptions} options Options.\n     * @return {Node} Result.\n     * @api\n     */\n    WFS.prototype.writeGetFeature = function (options) {\n        var node = createElementNS(WFSNS, 'GetFeature');\n        node.setAttribute('service', 'WFS');\n        node.setAttribute('version', '1.1.0');\n        var filter;\n        if (options) {\n            if (options.handle) {\n                node.setAttribute('handle', options.handle);\n         
    }\n            if (options.outputFormat) {\n                node.setAttribute('outputFormat', options.outputFormat);\n            }\n            if (options.maxFeatures !== undefined) {\n                node.setAttribute('maxFeatures', String(options.maxFeatures));\n            }\n            if (options.resultType) {\n                node.setAttribute('resultType', options.resultType);\n            }\n            if (options.startIndex !== undefined) {\n                node.setAttribute('startIndex', String(options.startIndex));\n            }\n            if (options.count !== undefined) {\n                node.setAttribute('count', String(options.count));\n            }\n            if (options.viewParams !== undefined) {\n                node.setAttribute('viewParams', options.viewParams);\n            }\n            filter = options.filter;\n            if (options.bbox) {\n                assert(options.geometryName, 12); // `options.geometryName` must also be provided when
  `options.bbox` is set\n                var bbox = bboxFilter(\n                /** @type {string} */ (options.geometryName), options.bbox, options.srsName);\n                if (filter) {\n                    // if bbox and filter are both set, combine the two into a single filter\n                    filter = andFilter(filter, bbox);\n                }\n                else {\n                    filter = bbox;\n                }\n            }\n        }\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation_);\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var context = {\n            node: node,\n        };\n        assign(context, {\n            'srsName': options.srsName,\n            'featureNS': options.featureNS ? options.featureNS : this.featureNS_,\n            'featurePrefix': options.featurePrefix,\n            'geometryName': options.geometryName,\n            'filter': filter,\n            'propertyNames'
 : options.propertyNames ? options.propertyNames : [],\n        });\n        assert(Array.isArray(options.featureTypes), 11); // `options.featureTypes` should be an Array\n        writeGetFeature(node, \n        /** @type {!Array<string>} */ (options.featureTypes), [context]);\n        return node;\n    };\n    /**\n     * Encode format as WFS `Transaction` and return the Node.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} inserts The features to insert.\n     * @param {Array<import(\"../Feature.js\").default>} updates The features to update.\n     * @param {Array<import(\"../Feature.js\").default>} deletes The features to delete.\n     * @param {WriteTransactionOptions} options Write options.\n     * @return {Node} Result.\n     * @api\n     */\n    WFS.prototype.writeTransaction = function (inserts, updates, deletes, options) {\n        var objectStack = [];\n        var node = createElementNS(WFSNS, 'Transaction');\n        var version = options.version ? optio
 ns.version : DEFAULT_VERSION;\n        var gmlVersion = version === '1.0.0' ? 2 : 3;\n        node.setAttribute('service', 'WFS');\n        node.setAttribute('version', version);\n        var baseObj;\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var obj;\n        if (options) {\n            baseObj = options.gmlOptions ? options.gmlOptions : {};\n            if (options.handle) {\n                node.setAttribute('handle', options.handle);\n            }\n        }\n        var schemaLocation = SCHEMA_LOCATIONS[version];\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', schemaLocation);\n        var featurePrefix = options.featurePrefix\n            ? options.featurePrefix\n            : FEATURE_PREFIX;\n        if (inserts) {\n            obj = assign({ node: node }, {\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n             
    'gmlVersion': gmlVersion,\n                'hasZ': options.hasZ,\n                'srsName': options.srsName,\n            });\n            assign(obj, baseObj);\n            pushSerializeAndPop(obj, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Insert'), inserts, objectStack);\n        }\n        if (updates) {\n            obj = assign({ node: node }, {\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'hasZ': options.hasZ,\n                'srsName': options.srsName,\n            });\n            assign(obj, baseObj);\n            pushSerializeAndPop(obj, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Update'), updates, objectStack);\n        }\n        if (deletes) {\n            pushSerializeAndPop({\n                node: node,\n                'featureNS': options.featureNS,\n                'featureType': optio
 ns.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'srsName': options.srsName,\n            }, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Delete'), deletes, objectStack);\n        }\n        if (options.nativeElements) {\n            pushSerializeAndPop({\n                node: node,\n                'featureNS': options.featureNS,\n                'featureType': options.featureType,\n                'featurePrefix': featurePrefix,\n                'gmlVersion': gmlVersion,\n                'srsName': options.srsName,\n            }, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Native'), options.nativeElements, objectStack);\n        }\n        return node;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    WFS.prototype.readProjectionFromDocument = function (doc) {\n        for (var n = doc.firstChild; n; n = n
 .nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readProjectionFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return null;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    WFS.prototype.readProjectionFromNode = function (node) {\n        if (node.firstElementChild && node.firstElementChild.firstElementChild) {\n            node = node.firstElementChild.firstElementChild;\n            for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n                if (!(n.childNodes.length === 0 ||\n                    (n.childNodes.length === 1 && n.firstChild.nodeType === 3))) {\n                    var objectStack = [{}];\n                    this.gmlFormat_.readGeometryElement(n, objectStack);\n                    return getProjection(objectStack.pop().srsName);\n                }\n            }\n        }\n       
  return null;\n    };\n    return WFS;\n}(XMLFeature));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Transaction Summary.\n */\nfunction readTransactionSummary(node, objectStack) {\n    return pushParseAndPop({}, TRANSACTION_SUMMARY_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OGC_FID_PARSERS = {\n    'http://www.opengis.net/ogc': {\n        'FeatureId': makeArrayPusher(function (node, objectStack) {\n            return node.getAttribute('fid');\n        }),\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction fidParser(node, objectStack) {\n    parseNode(OGC_FID_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar INSERT_RESULTS_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'Featur
 e': fidParser,\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Insert results.\n */\nfunction readInsertResults(node, objectStack) {\n    return pushParseAndPop([], INSERT_RESULTS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFeature(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var featureType = context['featureType'];\n    var featureNS = context['featureNS'];\n    var gmlVersion = context['gmlVersion'];\n    var child = createElementNS(featureNS, featureType);\n    node.appendChild(child);\n    if (gmlVersion === 2) {\n        GML2.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n    else {\n        GML3.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n}\n/**\n *
  @param {Node} node Node.\n * @param {number|string} fid Feature identifier.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeOgcFidFilter(node, fid, objectStack) {\n    var filter = createElementNS(OGCNS, 'Filter');\n    var child = createElementNS(OGCNS, 'FeatureId');\n    filter.appendChild(child);\n    child.setAttribute('fid', /** @type {string} */ (fid));\n    node.appendChild(filter);\n}\n/**\n * @param {string|undefined} featurePrefix The prefix of the feature.\n * @param {string} featureType The type of the feature.\n * @returns {string} The value of the typeName property.\n */\nfunction getTypeName(featurePrefix, featureType) {\n    featurePrefix = featurePrefix ? featurePrefix : FEATURE_PREFIX;\n    var prefix = featurePrefix + ':';\n    // The featureType already contains the prefix.\n    if (featureType.indexOf(prefix) === 0) {\n        return featureType;\n    }\n    else {\n        return prefix + featureType;\n    }\n}\n/**\n * @param {Element} node 
 Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDelete(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    assert(feature.getId() !== undefined, 26); // Features must have an id set\n    var featureType = context['featureType'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var typeName = getTypeName(featurePrefix, featureType);\n    node.setAttribute('typeName', typeName);\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    var fid = feature.getId();\n    if (fid !== undefined) {\n        writeOgcFidFilter(node, fid, objectStack);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeUpdate(node, feature, objectStack) {\n    var context = objectStack[objectStack
 .length - 1];\n    assert(feature.getId() !== undefined, 27); // Features must have an id set\n    var featureType = context['featureType'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var typeName = getTypeName(featurePrefix, featureType);\n    var geometryName = feature.getGeometryName();\n    node.setAttribute('typeName', typeName);\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    var fid = feature.getId();\n    if (fid !== undefined) {\n        var keys = feature.getKeys();\n        var values = [];\n        for (var i = 0, ii = keys.length; i < ii; i++) {\n            var value = feature.get(keys[i]);\n            if (value !== undefined) {\n                var name_1 = keys[i];\n                if (value &&\n                    typeof ( /** @type {?} */(value).getSimplifiedGeometry) === 'function') {\n                    name_1 = geometryName;\n                }\n                values.push({ name
 : name_1, value: value });\n            }\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */ ({\n            'gmlVersion': context['gmlVersion'],\n            node: node,\n            'hasZ': context['hasZ'],\n            'srsName': context['srsName'],\n        }), TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Property'), values, objectStack);\n        writeOgcFidFilter(node, fid, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {Object} pair Property name and value.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeProperty(node, pair, objectStack) {\n    var name = createElementNS(WFSNS, 'Name');\n    var context = objectStack[objectStack.length - 1];\n    var gmlVersion = context['gmlVersion'];\n    node.appendChild(name);\n    writeStringTextNode(name, pair.name);\n    if (pair.value !== undefined && pair.value !== null) {\n        var value = createElementNS(WFSNS, 'Value');\n        node.ap
 pendChild(value);\n        if (pair.value &&\n            typeof ( /** @type {?} */(pair.value).getSimplifiedGeometry) ===\n                'function') {\n            if (gmlVersion === 2) {\n                GML2.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n            else {\n                GML3.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n        }\n        else {\n            writeStringTextNode(value, pair.value);\n        }\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {{vendorId: string, safeToIgnore: boolean, value: string}} nativeElement The native element.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNative(node, nativeElement, objectStack) {\n    if (nativeElement.vendorId) {\n        node.setAttribute('vendorId', nativeElement.vendorId);\n    }\n    if (nativeElement.safeToIgnore !== undefined) {\n        node.setAttribute('safeToIgnore', String(nativeElement.safeToIgno
 re));\n    }\n    if (nativeElement.value !== undefined) {\n        writeStringTextNode(node, nativeElement.value);\n    }\n}\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar GETFEATURE_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'Query': makeChildAppender(writeQuery),\n    },\n    'http://www.opengis.net/ogc': {\n        'During': makeChildAppender(writeDuringFilter),\n        'And': makeChildAppender(writeLogicalFilter),\n        'Or': makeChildAppender(writeLogicalFilter),\n        'Not': makeChildAppender(writeNotFilter),\n        'BBOX': makeChildAppender(writeBboxFilter),\n        'Contains': makeChildAppender(writeContainsFilter),\n        'Intersects': makeChildAppender(writeIntersectsFilter),\n        'Within': makeChildAppender(writeWithinFilter),\n        'PropertyIsEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNotEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsL
 essThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNull': makeChildAppender(writeIsNullFilter),\n        'PropertyIsBetween': makeChildAppender(writeIsBetweenFilter),\n        'PropertyIsLike': makeChildAppender(writeIsLikeFilter),\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {string} featureType Feature type.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeQuery(node, featureType, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var propertyNames = context['propertyNames'];\n    var srsName = context['srsName'];\n    var typeName;\n    // If featur
 e prefix is not defined, we must not use the default prefix.\n    if (featurePrefix) {\n        typeName = getTypeName(featurePrefix, featureType);\n    }\n    else {\n        typeName = featureType;\n    }\n    node.setAttribute('typeName', typeName);\n    if (srsName) {\n        node.setAttribute('srsName', srsName);\n    }\n    if (featureNS) {\n        node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    }\n    var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n    item.node = node;\n    pushSerializeAndPop(item, QUERY_SERIALIZERS, makeSimpleNodeFactory('PropertyName'), propertyNames, objectStack);\n    var filter = context['filter'];\n    if (filter) {\n        var child = createElementNS(OGCNS, 'Filter');\n        node.appendChild(child);\n        writeFilterCondition(child, filter, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @param {Array<*>
 } objectStack Node stack.\n */\nfunction writeFilterCondition(node, filter, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(filter.getTagName()), [filter], objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Bbox.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeBboxFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName);\n    GML3.prototype.writeGeometryElement(node, filter.extent, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Contains.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeContainsFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.
 length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName);\n    GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Intersects.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIntersectsFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryName);\n    GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Within.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeWithinFilter(node, filter, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    context['srsName'] = filter.srsName;\n    writeOgcPropertyName(node, filter.geometryNam
 e);\n    GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/During.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDuringFilter(node, filter, objectStack) {\n    var valueReference = createElementNS(FESNS, 'ValueReference');\n    writeStringTextNode(valueReference, filter.propertyName);\n    node.appendChild(valueReference);\n    var timePeriod = createElementNS(GMLNS, 'TimePeriod');\n    node.appendChild(timePeriod);\n    var begin = createElementNS(GMLNS, 'begin');\n    timePeriod.appendChild(begin);\n    writeTimeInstant(begin, filter.begin);\n    var end = createElementNS(GMLNS, 'end');\n    timePeriod.appendChild(end);\n    writeTimeInstant(end, filter.end);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/LogicalNary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLogicalFilter
 (node, filter, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    var conditions = filter.conditions;\n    for (var i = 0, ii = conditions.length; i < ii; ++i) {\n        var condition = conditions[i];\n        pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(condition.getTagName()), [condition], objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Not.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNotFilter(node, filter, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    var condition = filter.condition;\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(condition.getTagName()), [condition], objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/ComparisonBinary.js\").default} filter Filter.\n * @param {Array<*
 >} objectStack Node stack.\n */\nfunction writeComparisonFilter(node, filter, objectStack) {\n    if (filter.matchCase !== undefined) {\n        node.setAttribute('matchCase', filter.matchCase.toString());\n    }\n    writeOgcPropertyName(node, filter.propertyName);\n    writeOgcLiteral(node, '' + filter.expression);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsNull.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsNullFilter(node, filter, objectStack) {\n    writeOgcPropertyName(node, filter.propertyName);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsBetween.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsBetweenFilter(node, filter, objectStack) {\n    writeOgcPropertyName(node, filter.propertyName);\n    var lowerBoundary = createElementNS(OGCNS, 'LowerBoundary');\n    node.appendChild(lowerBoundary);\n    writeOgcLiteral(lowerBoundary, 
 '' + filter.lowerBoundary);\n    var upperBoundary = createElementNS(OGCNS, 'UpperBoundary');\n    node.appendChild(upperBoundary);\n    writeOgcLiteral(upperBoundary, '' + filter.upperBoundary);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/IsLike.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsLikeFilter(node, filter, objectStack) {\n    node.setAttribute('wildCard', filter.wildCard);\n    node.setAttribute('singleChar', filter.singleChar);\n    node.setAttribute('escapeChar', filter.escapeChar);\n    if (filter.matchCase !== undefined) {\n        node.setAttribute('matchCase', filter.matchCase.toString());\n    }\n    writeOgcPropertyName(node, filter.propertyName);\n    writeOgcLiteral(node, '' + filter.pattern);\n}\n/**\n * @param {string} tagName Tag name.\n * @param {Node} node Node.\n * @param {string} value Value.\n */\nfunction writeOgcExpression(tagName, node, value) {\n    var property = createElem
 entNS(OGCNS, tagName);\n    writeStringTextNode(property, value);\n    node.appendChild(property);\n}\n/**\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeOgcPropertyName(node, value) {\n    writeOgcExpression('PropertyName', node, value);\n}\n/**\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeOgcLiteral(node, value) {\n    writeOgcExpression('Literal', node, value);\n}\n/**\n * @param {Node} node Node.\n * @param {string} time PropertyName value.\n */\nfunction writeTimeInstant(node, time) {\n    var timeInstant = createElementNS(GMLNS, 'TimeInstant');\n    node.appendChild(timeInstant);\n    var timePosition = createElementNS(GMLNS, 'timePosition');\n    timeInstant.appendChild(timePosition);\n    writeStringTextNode(timePosition, time);\n}\n/**\n * Encode filter as WFS `Filter` and return the Node.\n *\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @return {Node}
  Result.\n * @api\n */\nexport function writeFilter(filter) {\n    var child = createElementNS(OGCNS, 'Filter');\n    writeFilterCondition(child, filter, []);\n    return child;\n}\n/**\n * @param {Node} node Node.\n * @param {Array<string>} featureTypes Feature types.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeGetFeature(node, featureTypes, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n    item.node = node;\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory('Query'), featureTypes, objectStack);\n}\nexport default WFS;\n//# sourceMappingURL=WFS.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n  
           function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WKT\n */\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport TextFeature from './TextFeature.js';\nimport { transformGeometryWithOptions } from './Feature.js';
 \n/**\n * Geometry constructors\n * @enum {function (new:import(\"../geom/Geometry.js\").default, Array, import(\"../geom/GeometryLayout.js\").default)}\n */\nvar GeometryConstructor = {\n    'POINT': Point,\n    'LINESTRING': LineString,\n    'POLYGON': Polygon,\n    'MULTIPOINT': MultiPoint,\n    'MULTILINESTRING': MultiLineString,\n    'MULTIPOLYGON': MultiPolygon,\n};\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n/**\n * @typedef {Object} Token\n * @property {number} type\n * @property {number|string} [value]\n * @property {number} position\n */\n/**\n * @const\n * @type {string}\n */\nvar EMPTY = 'EMPTY';\n/**\n * @const\n * @type {string}\n */\nvar Z = 'Z';\n/**\n * @const\n * @type {string}\n */\nvar M = 'M';\n/**\n * @const\n * @type {string}\n */\nvar ZM = 'ZM';\n/**\n * @const\n * @enum {number}\n */\nvar TokenType = {\n    TEXT: 1,\n    LEFT_PAREN: 2,\n  
   RIGHT_PAREN: 3,\n    NUMBER: 4,\n    COMMA: 5,\n    EOF: 6,\n};\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar WKTGeometryType = {};\nfor (var type in GeometryType) {\n    WKTGeometryType[type] = GeometryType[type].toUpperCase();\n}\n/**\n * Class to tokenize a WKT string.\n */\nvar Lexer = /** @class */ (function () {\n    /**\n     * @param {string} wkt WKT string.\n     */\n    function Lexer(wkt) {\n        /**\n         * @type {string}\n         */\n        this.wkt = wkt;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.index_ = -1;\n    }\n    /**\n     * @param {string} c Character.\n     * @return {boolean} Whether the character is alphabetic.\n     * @private\n     */\n    Lexer.prototype.isAlpha_ = function (c) {\n        return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n    };\n    /**\n     * @param {string} c Character.\n     * @param {boolean=} opt_decimal Whether the string number\n     *     contains a 
 dot, i.e. is a decimal number.\n     * @return {boolean} Whether the character is numeric.\n     * @private\n     */\n    Lexer.prototype.isNumeric_ = function (c, opt_decimal) {\n        var decimal = opt_decimal !== undefined ? opt_decimal : false;\n        return (c >= '0' && c <= '9') || (c == '.' && !decimal);\n    };\n    /**\n     * @param {string} c Character.\n     * @return {boolean} Whether the character is whitespace.\n     * @private\n     */\n    Lexer.prototype.isWhiteSpace_ = function (c) {\n        return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n';\n    };\n    /**\n     * @return {string} Next string character.\n     * @private\n     */\n    Lexer.prototype.nextChar_ = function () {\n        return this.wkt.charAt(++this.index_);\n    };\n    /**\n     * Fetch and return the next token.\n     * @return {!Token} Next string token.\n     */\n    Lexer.prototype.nextToken = function () {\n        var c = this.nextChar_();\n        var position = this.index_;\n
         /** @type {number|string} */\n        var value = c;\n        var type;\n        if (c == '(') {\n            type = TokenType.LEFT_PAREN;\n        }\n        else if (c == ',') {\n            type = TokenType.COMMA;\n        }\n        else if (c == ')') {\n            type = TokenType.RIGHT_PAREN;\n        }\n        else if (this.isNumeric_(c) || c == '-') {\n            type = TokenType.NUMBER;\n            value = this.readNumber_();\n        }\n        else if (this.isAlpha_(c)) {\n            type = TokenType.TEXT;\n            value = this.readText_();\n        }\n        else if (this.isWhiteSpace_(c)) {\n            return this.nextToken();\n        }\n        else if (c === '') {\n            type = TokenType.EOF;\n        }\n        else {\n            throw new Error('Unexpected character: ' + c);\n        }\n        return { position: position, value: value, type: type };\n    };\n    /**\n     * @return {number} Numeric token value.\n     * @private\n     */\n
     Lexer.prototype.readNumber_ = function () {\n        var c;\n        var index = this.index_;\n        var decimal = false;\n        var scientificNotation = false;\n        do {\n            if (c == '.') {\n                decimal = true;\n            }\n            else if (c == 'e' || c == 'E') {\n                scientificNotation = true;\n            }\n            c = this.nextChar_();\n        } while (this.isNumeric_(c, decimal) ||\n            // if we haven't detected a scientific number before, 'e' or 'E'\n            // hint that we should continue to read\n            (!scientificNotation && (c == 'e' || c == 'E')) ||\n            // once we know that we have a scientific number, both '-' and '+'\n            // are allowed\n            (scientificNotation && (c == '-' || c == '+')));\n        return parseFloat(this.wkt.substring(index, this.index_--));\n    };\n    /**\n     * @return {string} String token value.\n     * @private\n     */\n    Lexer.prototype.read
 Text_ = function () {\n        var c;\n        var index = this.index_;\n        do {\n            c = this.nextChar_();\n        } while (this.isAlpha_(c));\n        return this.wkt.substring(index, this.index_--).toUpperCase();\n    };\n    return Lexer;\n}());\n/**\n * Class to parse the tokens from the WKT string.\n */\nvar Parser = /** @class */ (function () {\n    /**\n     * @param {Lexer} lexer The lexer.\n     */\n    function Parser(lexer) {\n        /**\n         * @type {Lexer}\n         * @private\n         */\n        this.lexer_ = lexer;\n        /**\n         * @type {Token}\n         * @private\n         */\n        this.token_;\n        /**\n         * @type {import(\"../geom/GeometryLayout.js\").default}\n         * @private\n         */\n        this.layout_ = GeometryLayout.XY;\n    }\n    /**\n     * Fetch the next token form the lexer and replace the active token.\n     * @private\n     */\n    Parser.prototype.consume_ = function () {\n        this.token_ = t
 his.lexer_.nextToken();\n    };\n    /**\n     * Tests if the given type matches the type of the current token.\n     * @param {TokenType} type Token type.\n     * @return {boolean} Whether the token matches the given type.\n     */\n    Parser.prototype.isTokenType = function (type) {\n        var isMatch = this.token_.type == type;\n        return isMatch;\n    };\n    /**\n     * If the given type matches the current token, consume it.\n     * @param {TokenType} type Token type.\n     * @return {boolean} Whether the token matches the given type.\n     */\n    Parser.prototype.match = function (type) {\n        var isMatch = this.isTokenType(type);\n        if (isMatch) {\n            this.consume_();\n        }\n        return isMatch;\n    };\n    /**\n     * Try to parse the tokens provided by the lexer.\n     * @return {import(\"../geom/Geometry.js\").default} The geometry.\n     */\n    Parser.prototype.parse = function () {\n        this.consume_();\n        var geometry = t
 his.parseGeometry_();\n        return geometry;\n    };\n    /**\n     * Try to parse the dimensional info.\n     * @return {import(\"../geom/GeometryLayout.js\").default} The layout.\n     * @private\n     */\n    Parser.prototype.parseGeometryLayout_ = function () {\n        var layout = GeometryLayout.XY;\n        var dimToken = this.token_;\n        if (this.isTokenType(TokenType.TEXT)) {\n            var dimInfo = dimToken.value;\n            if (dimInfo === Z) {\n                layout = GeometryLayout.XYZ;\n            }\n            else if (dimInfo === M) {\n                layout = GeometryLayout.XYM;\n            }\n            else if (dimInfo === ZM) {\n                layout = GeometryLayout.XYZM;\n            }\n            if (layout !== GeometryLayout.XY) {\n                this.consume_();\n            }\n        }\n        return layout;\n    };\n    /**\n     * @return {!Array<import(\"../geom/Geometry.js\").default>} A collection of geometries.\n     * @private\
 n     */\n    Parser.prototype.parseGeometryCollectionText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var geometries = [];\n            do {\n                geometries.push(this.parseGeometry_());\n            } while (this.match(TokenType.COMMA));\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return geometries;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<number>} All values in a point.\n     * @private\n     */\n    Parser.prototype.parsePointText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePoint_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return null;\n        }\n        t
 hrow new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<number>>} All points in a linestring.\n     * @private\n     */\n    Parser.prototype.parseLineStringText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePointList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<!Array<number>>>} All points in a polygon.\n     * @private\n     */\n    Parser.prototype.parsePolygonText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parseLineStringTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.i
 sEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<number>>} All points in a multipoint.\n     * @private\n     */\n    Parser.prototype.parseMultiPointText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = void 0;\n            if (this.token_.type == TokenType.LEFT_PAREN) {\n                coordinates = this.parsePointTextList_();\n            }\n            else {\n                coordinates = this.parsePointList_();\n            }\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<!Array<number>>>} All linestring points\n     *                                          in a multilines
 tring.\n     * @private\n     */\n    Parser.prototype.parseMultiLineStringText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parseLineStringTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<!Array<!Array<number>>>>} All polygon points in a multipolygon.\n     * @private\n     */\n    Parser.prototype.parseMultiPolygonText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePolygonTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        else if (this.isEmptyGeometry_()) {\n            return [];\n        }\n        throw new Error(this.
 formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<number>} A point.\n     * @private\n     */\n    Parser.prototype.parsePoint_ = function () {\n        var coordinates = [];\n        var dimensions = this.layout_.length;\n        for (var i = 0; i < dimensions; ++i) {\n            var token = this.token_;\n            if (this.match(TokenType.NUMBER)) {\n                coordinates.push(/** @type {number} */ (token.value));\n            }\n            else {\n                break;\n            }\n        }\n        if (coordinates.length == dimensions) {\n            return coordinates;\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {!Array<!Array<number>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePointList_ = function () {\n        var coordinates = [this.parsePoint_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePoint_());\n        }\n    
     return coordinates;\n    };\n    /**\n     * @return {!Array<!Array<number>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePointTextList_ = function () {\n        var coordinates = [this.parsePointText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePointText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {!Array<!Array<!Array<number>>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parseLineStringTextList_ = function () {\n        var coordinates = [this.parseLineStringText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parseLineStringText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {!Array<!Array<!Array<!Array<number>>>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePolygonTextList_ = function () {\n        var coordinates = [this.parsePolygonText_()];\n
         while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePolygonText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {boolean} Whether the token implies an empty geometry.\n     * @private\n     */\n    Parser.prototype.isEmptyGeometry_ = function () {\n        var isEmpty = this.isTokenType(TokenType.TEXT) && this.token_.value == EMPTY;\n        if (isEmpty) {\n            this.consume_();\n        }\n        return isEmpty;\n    };\n    /**\n     * Create an error message for an unexpected token error.\n     * @return {string} Error message.\n     * @private\n     */\n    Parser.prototype.formatErrorMessage_ = function () {\n        return ('Unexpected `' +\n            this.token_.value +\n            '` at position ' +\n            this.token_.position +\n            ' in `' +\n            this.lexer_.wkt +\n            '`');\n    };\n    /**\n     * @return {!import(\"../geom/Geometry.js\").default} The geometry.\n     
 * @private\n     */\n    Parser.prototype.parseGeometry_ = function () {\n        var token = this.token_;\n        if (this.match(TokenType.TEXT)) {\n            var geomType = token.value;\n            this.layout_ = this.parseGeometryLayout_();\n            if (geomType == 'GEOMETRYCOLLECTION') {\n                var geometries = this.parseGeometryCollectionText_();\n                return new GeometryCollection(geometries);\n            }\n            else {\n                var ctor = GeometryConstructor[geomType];\n                if (!ctor) {\n                    throw new Error('Invalid geometry type: ' + geomType);\n                }\n                var coordinates = void 0;\n                switch (geomType) {\n                    case 'POINT': {\n                        coordinates = this.parsePointText_();\n                        break;\n                    }\n                    case 'LINESTRING': {\n                        coordinates = this.parseLineStringText_();\n
                         break;\n                    }\n                    case 'POLYGON': {\n                        coordinates = this.parsePolygonText_();\n                        break;\n                    }\n                    case 'MULTIPOINT': {\n                        coordinates = this.parseMultiPointText_();\n                        break;\n                    }\n                    case 'MULTILINESTRING': {\n                        coordinates = this.parseMultiLineStringText_();\n                        break;\n                    }\n                    case 'MULTIPOLYGON': {\n                        coordinates = this.parseMultiPolygonText_();\n                        break;\n                    }\n                    default: {\n                        throw new Error('Invalid geometry type: ' + geomType);\n                    }\n                }\n                if (!coordinates) {\n                    if (ctor === GeometryConstructor['POINT']) {\n                 
        coordinates = [NaN, NaN];\n                    }\n                    else {\n                        coordinates = [];\n                    }\n                }\n                return new ctor(coordinates, this.layout_);\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    return Parser;\n}());\n/**\n * @classdesc\n * Geometry format for reading and writing data in the `WellKnownText` (WKT)\n * format.\n *\n * @api\n */\nvar WKT = /** @class */ (function (_super) {\n    __extends(WKT, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function WKT(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * Split GeometryCollection into multiple features.\n         * @type {boolean}\n         * @private\n         */\n        _this.splitCollection_ =\n            options.splitCollection !== undefined ? options.splitCollection :
  false;\n        return _this;\n    }\n    /**\n     * Parse a WKT string.\n     * @param {string} wkt WKT string.\n     * @return {import(\"../geom/Geometry.js\").default|undefined}\n     *     The geometry created.\n     * @private\n     */\n    WKT.prototype.parse_ = function (wkt) {\n        var lexer = new Lexer(wkt);\n        var parser = new Parser(lexer);\n        return parser.parse();\n    };\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    WKT.prototype.readFeatureFromText = function (text, opt_options) {\n        var geom = this.readGeometryFromText(text, opt_options);\n        if (geom) {\n            var feature = new Feature();\n            feature.setGeometry(geom);\n            return feature;\n        }\n        return null;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import
 (\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    WKT.prototype.readFeaturesFromText = function (text, opt_options) {\n        var geometries = [];\n        var geometry = this.readGeometryFromText(text, opt_options);\n        if (this.splitCollection_ &&\n            geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n            geometries = /** @type {GeometryCollection} */ (geometry).getGeometriesArray();\n        }\n        else {\n            geometries = [geometry];\n        }\n        var features = [];\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            var feature = new Feature();\n            feature.setGeometry(geometries[i]);\n            features.push(feature);\n        }\n        return features;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n     * @protected\n     *
  @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    WKT.prototype.readGeometryFromText = function (text, opt_options) {\n        var geometry = this.parse_(text);\n        if (geometry) {\n            return transformGeometryWithOptions(geometry, false, opt_options);\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeFeatureText = function (feature, opt_options) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            return this.writeGeometryText(geometry, opt_options);\n        }\n        return '';\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write opti
 ons.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeFeaturesText = function (features, opt_options) {\n        if (features.length == 1) {\n            return this.writeFeatureText(features[0], opt_options);\n        }\n        var geometries = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            geometries.push(features[i].getGeometry());\n        }\n        var collection = new GeometryCollection(geometries);\n        return this.writeGeometryText(collection, opt_options);\n    };\n    /**\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeGeometryText = function (geometry, opt_options) {\n        return encode(transformGeometryWithOptions(geometry, true, opt_options));\n    };\n    return WKT;\n}(TextFeature));\n/**\n * @param {Poi
 nt} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n    var coordinates = geom.getCoordinates();\n    if (coordinates.length === 0) {\n        return '';\n    }\n    return coordinates.join(' ');\n}\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n    var array = [];\n    var components = geom.getPoints();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodePointGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n    var array = [];\n    var geoms = geom.getGeometries();\n    for (var i = 0, ii = geoms.length; i < ii; ++i) {\n        array.push(enco
 de(geoms[i]));\n    }\n    return array.join(',');\n}\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n    var coordinates = geom.getCoordinates();\n    var array = [];\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        array.push(coordinates[i].join(' '));\n    }\n    return array.join(',');\n}\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n    var array = [];\n    var components = geom.getLineStrings();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodeLineStringGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as W
 KT.\n */\nfunction encodePolygonGeometry(geom) {\n    var array = [];\n    var rings = geom.getLinearRings();\n    for (var i = 0, ii = rings.length; i < ii; ++i) {\n        array.push('(' + encodeLineStringGeometry(rings[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n    var array = [];\n    var components = geom.getPolygons();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodePolygonGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geom SimpleGeometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n    var layout = geom.getLayout();\n    var dimInfo = '';\n    if (layout === GeometryLayout.XYZ || layout === G
 eometryLayout.XYZM) {\n        dimInfo += Z;\n    }\n    if (layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM) {\n        dimInfo += M;\n    }\n    return dimInfo;\n}\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default): string>}\n */\nvar GeometryEncoder = {\n    'Point': encodePointGeometry,\n    'LineString': encodeLineStringGeometry,\n    'Polygon': encodePolygonGeometry,\n    'MultiPoint': encodeMultiPointGeometry,\n    'MultiLineString': encodeMultiLineStringGeometry,\n    'MultiPolygon': encodeMultiPolygonGeometry,\n    'GeometryCollection': encodeGeometryCollectionGeometry,\n};\n/**\n * Encode a geometry as WKT.\n * @param {!import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n    var type = geom.getType();\n    var geometryEncoder = GeometryEncoder[type];\n    var enc = geometryEncoder(geom);\n    type = type.toUpperCase();\
 n    if (typeof ( /** @type {?} */(geom).getFlatCoordinates) === 'function') {\n        var dimInfo = encodeGeometryLayout(\n        /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geom));\n        if (dimInfo.length > 0) {\n            type += ' ' + dimInfo;\n        }\n    }\n    if (enc.length === 0) {\n        return type + ' ' + EMPTY;\n    }\n    return type + '(' + enc + ')';\n}\nexport default WKT;\n//# sourceMappingURL=WKT.js.map","/**\n * @module ol/format/XML\n */\nimport { isDocument, parse } from '../xml.js';\n/**\n * @classdesc\n * Generic format for reading non-feature XML data\n *\n * @abstract\n */\nvar XML = /** @class */ (function () {\n    function XML() {\n    }\n    /**\n     * Read the source document.\n     *\n     * @param {Document|Element|string} source The XML source.\n     * @return {Object} An object representing the source.\n     * @api\n     */\n    XML.prototype.read = function (source) {\n        if (!source) {\n            return null
 ;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Object} Object\n     */\n    XML.prototype.readFromDocument = function (doc) {\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return null;\n    };\n    /**\n     * @abstract\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    XML.prototype.readFromNode = function (node) { };\n    return XML;\n}());\nexport default XML;\n//# sourceMap
 pingURL=XML.js.map","/**\n * @module ol/format/XLink\n */\n/**\n * @const\n * @type {string}\n */\nvar NAMESPACE_URI = 'http://www.w3.org/1999/xlink';\n/**\n * @param {Element} node Node.\n * @return {string|undefined} href.\n */\nexport function readHref(node) {\n    return node.getAttributeNS(NAMESPACE_URI, 'href');\n}\n//# sourceMappingURL=XLink.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMSCapabilit
 ies\n */\nimport XML from './XML.js';\nimport { makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readBooleanString, readDecimal, readDecimalString, readNonNegativeInteger, readNonNegativeIntegerString, readString, } from './xsd.js';\nimport { readHref } from './XLink.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/wms'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Service': makeObjectPropertySetter(readService),\n    'Capability': makeObjectPropertySetter(readCapability),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CAPABILITY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Request': makeObjectPropertySetter(readRequest),\n    'Exception': makeObj
 ectPropertySetter(readException),\n    'Layer': makeObjectPropertySetter(readCapabilityLayer),\n});\n/**\n * @classdesc\n * Format for reading WMS capabilities data\n *\n * @api\n */\nvar WMSCapabilities = /** @class */ (function (_super) {\n    __extends(WMSCapabilities, _super);\n    function WMSCapabilities() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {string|undefined}\n         */\n        _this.version = undefined;\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    WMSCapabilities.prototype.readFromNode = function (node) {\n        this.version = node.getAttribute('version').trim();\n        var wmsCapabilityObject = pushParseAndPop({\n            'version': this.version,\n        }, PARSERS, node, []);\n        return wmsCapabilityObject ? wmsCapabilityObject : null;\n    };\n    return WMSCapabilities;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, 
 import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'ContactInformation': makeObjectPropertySetter(readContactInformation),\n    'Fees': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjectPropertySetter(readString),\n    'LayerLimit': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxHeight': makeObjectPropertySetter(readNonNegativeInteger),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_INFORMATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ContactPersonPrimary': 
 makeObjectPropertySetter(readContactPersonPrimary),\n    'ContactPosition': makeObjectPropertySetter(readString),\n    'ContactAddress': makeObjectPropertySetter(readContactAddress),\n    'ContactVoiceTelephone': makeObjectPropertySetter(readString),\n    'ContactFacsimileTelephone': makeObjectPropertySetter(readString),\n    'ContactElectronicMailAddress': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_PERSON_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ContactPerson': makeObjectPropertySetter(readString),\n    'ContactOrganization': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_ADDRESS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'AddressType': makeObjectPropertySetter(readString),\n    'Address': makeObjectPropertySetter(readString),\n   
  'City': makeObjectPropertySetter(readString),\n    'StateOrProvince': makeObjectPropertySetter(readString),\n    'PostCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXCEPTION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeArrayPusher(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAYER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'CRS': makeObjectPropertyPusher(readString),\n    'EX_GeographicBoundingBox': makeObjectPropertySetter(readEXGeographicBoundingBox),\n    'BoundingBox': makeObjectProp
 ertyPusher(readBoundingBox),\n    'Dimension': makeObjectPropertyPusher(readDimension),\n    'Attribution': makeObjectPropertySetter(readAttribution),\n    'AuthorityURL': makeObjectPropertyPusher(readAuthorityURL),\n    'Identifier': makeObjectPropertyPusher(readString),\n    'MetadataURL': makeObjectPropertyPusher(readMetadataURL),\n    'DataURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'FeatureListURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'Style': makeObjectPropertyPusher(readStyle),\n    'MinScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'MaxScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'Layer': makeObjectPropertyPusher(readLayer),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ATTRIBUTION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHre
 f),\n    'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'westBoundLongitude': makeObjectPropertySetter(readDecimal),\n    'eastBoundLongitude': makeObjectPropertySetter(readDecimal),\n    'southBoundLatitude': makeObjectPropertySetter(readDecimal),\n    'northBoundLatitude': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REQUEST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'GetCapabilities': makeObjectPropertySetter(readOperationType),\n    'GetMap': makeObjectPropertySetter(readOperationType),\n    'GetFeatureInfo': makeObjectPropertySetter(readOperationType),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */
 \n// @ts-ignore\nvar OPERATIONTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeObjectPropertyPusher(readString),\n    'DCPType': makeObjectPropertyPusher(readDCPType),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DCPTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHTTP),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar HTTP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Get': makeObjectPropertySetter(readFormatOnlineresource),\n    'Post': makeObjectPropertySetter(readFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': make
 ObjectPropertySetter(readString),\n    'LegendURL': makeObjectPropertyPusher(readSizedFormatOnlineresource),\n    'StyleSheetURL': makeObjectPropertySetter(readFormatOnlineresource),\n    'StyleURL': makeObjectPropertySetter(readFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FORMAT_ONLINERESOURCE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar KEYWORDLIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Keyword': makeArrayPusher(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readAttribution(node, objectStack) {\n    return pushParseAndPop({}, ATT
 RIBUTION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Bounding box object.\n */\nfunction readBoundingBox(node, objectStack) {\n    var extent = [\n        readDecimalString(node.getAttribute('minx')),\n        readDecimalString(node.getAttribute('miny')),\n        readDecimalString(node.getAttribute('maxx')),\n        readDecimalString(node.getAttribute('maxy')),\n    ];\n    var resolutions = [\n        readDecimalString(node.getAttribute('resx')),\n        readDecimalString(node.getAttribute('resy')),\n    ];\n    return {\n        'crs': node.getAttribute('CRS'),\n        'extent': extent,\n        'res': resolutions,\n    };\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../extent.js\").Extent|undefined} Bounding box object.\n */\nfunction readEXGeographicBoundingBox(node, objectStack) {\n    var geographicBoundingBox = push
 ParseAndPop({}, EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS, node, objectStack);\n    if (!geographicBoundingBox) {\n        return undefined;\n    }\n    var westBoundLongitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['westBoundLongitude']);\n    var southBoundLatitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['southBoundLatitude']);\n    var eastBoundLongitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['eastBoundLongitude']);\n    var northBoundLatitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['northBoundLatitude']);\n    if (westBoundLongitude === undefined ||\n        southBoundLatitude === undefined ||\n        eastBoundLongitude === undefined ||\n        northBoundLatitude === undefined) {\n        return undefined;\n    }\n    return [\n        westBoundLongitude,\n        southBoundLatitude,\n        eastBoundLongitude,\n        northBoundLatitude,\n    ];\n}\n/**\n * @param {Elem
 ent} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Capability object.\n */\nfunction readCapability(node, objectStack) {\n    return pushParseAndPop({}, CAPABILITY_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Service object.\n */\nfunction readService(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact information object.\n */\nfunction readContactInformation(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_INFORMATION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact person object.\n */\nfunction readContactPersonPrimary(node, objectStack) {\n    return pushPa
 rseAndPop({}, CONTACT_PERSON_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact address object.\n */\nfunction readContactAddress(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_ADDRESS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Format array.\n */\nfunction readException(node, objectStack) {\n    return pushParseAndPop([], EXCEPTION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readCapabilityLayer(node, objectStack) {\n    return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction
  readLayer(node, objectStack) {\n    var parentLayerObject = /**  @type {!Object<string,*>} */ (objectStack[objectStack.length - 1]);\n    var layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n    if (!layerObject) {\n        return undefined;\n    }\n    var queryable = readBooleanString(node.getAttribute('queryable'));\n    if (queryable === undefined) {\n        queryable = parentLayerObject['queryable'];\n    }\n    layerObject['queryable'] = queryable !== undefined ? queryable : false;\n    var cascaded = readNonNegativeIntegerString(node.getAttribute('cascaded'));\n    if (cascaded === undefined) {\n        cascaded = parentLayerObject['cascaded'];\n    }\n    layerObject['cascaded'] = cascaded;\n    var opaque = readBooleanString(node.getAttribute('opaque'));\n    if (opaque === undefined) {\n        opaque = parentLayerObject['opaque'];\n    }\n    layerObject['opaque'] = opaque !== undefined ? opaque : false;\n    var noSubsets = readBooleanString(node.g
 etAttribute('noSubsets'));\n    if (noSubsets === undefined) {\n        noSubsets = parentLayerObject['noSubsets'];\n    }\n    layerObject['noSubsets'] = noSubsets !== undefined ? noSubsets : false;\n    var fixedWidth = readDecimalString(node.getAttribute('fixedWidth'));\n    if (!fixedWidth) {\n        fixedWidth = parentLayerObject['fixedWidth'];\n    }\n    layerObject['fixedWidth'] = fixedWidth;\n    var fixedHeight = readDecimalString(node.getAttribute('fixedHeight'));\n    if (!fixedHeight) {\n        fixedHeight = parentLayerObject['fixedHeight'];\n    }\n    layerObject['fixedHeight'] = fixedHeight;\n    // See 7.2.4.8\n    var addKeys = ['Style', 'CRS', 'AuthorityURL'];\n    addKeys.forEach(function (key) {\n        if (key in parentLayerObject) {\n            var childValue = layerObject[key] || [];\n            layerObject[key] = childValue.concat(parentLayerObject[key]);\n        }\n    });\n    var replaceKeys = [\n        'EX_GeographicBoundingBox',\n        'Boundin
 gBox',\n        'Dimension',\n        'Attribution',\n        'MinScaleDenominator',\n        'MaxScaleDenominator',\n    ];\n    replaceKeys.forEach(function (key) {\n        if (!(key in layerObject)) {\n            var parentValue = parentLayerObject[key];\n            layerObject[key] = parentValue;\n        }\n    });\n    return layerObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Dimension object.\n */\nfunction readDimension(node, objectStack) {\n    var dimensionObject = {\n        'name': node.getAttribute('name'),\n        'units': node.getAttribute('units'),\n        'unitSymbol': node.getAttribute('unitSymbol'),\n        'default': node.getAttribute('default'),\n        'multipleValues': readBooleanString(node.getAttribute('multipleValues')),\n        'nearestValue': readBooleanString(node.getAttribute('nearestValue')),\n        'current': readBooleanString(node.getAttribute('current')),\n        'valu
 es': readString(node),\n    };\n    return dimensionObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readFormatOnlineresource(node, objectStack) {\n    return pushParseAndPop({}, FORMAT_ONLINERESOURCE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Request object.\n */\nfunction readRequest(node, objectStack) {\n    return pushParseAndPop({}, REQUEST_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} DCP type object.\n */\nfunction readDCPType(node, objectStack) {\n    return pushParseAndPop({}, DCPTYPE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} HTTP object.\n */\nfunctio
 n readHTTP(node, objectStack) {\n    return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Operation type object.\n */\nfunction readOperationType(node, objectStack) {\n    return pushParseAndPop({}, OPERATIONTYPE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readSizedFormatOnlineresource(node, objectStack) {\n    var formatOnlineresource = readFormatOnlineresource(node, objectStack);\n    if (formatOnlineresource) {\n        var size = [\n            readNonNegativeIntegerString(node.getAttribute('width')),\n            readNonNegativeIntegerString(node.getAttribute('height')),\n        ];\n        formatOnlineresource['size'] = size;\n        return formatOnlineresource;\n    }\n    return undefined;\n}\n/**\n * @param
  {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Authority URL object.\n */\nfunction readAuthorityURL(node, objectStack) {\n    var authorityObject = readFormatOnlineresource(node, objectStack);\n    if (authorityObject) {\n        authorityObject['name'] = node.getAttribute('name');\n        return authorityObject;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Metadata URL object.\n */\nfunction readMetadataURL(node, objectStack) {\n    var metadataObject = readFormatOnlineresource(node, objectStack);\n    if (metadataObject) {\n        metadataObject['type'] = node.getAttribute('type');\n        return metadataObject;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n   
  return pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Keyword list.\n */\nfunction readKeywordList(node, objectStack) {\n    return pushParseAndPop([], KEYWORDLIST_PARSERS, node, objectStack);\n}\nexport default WMSCapabilities;\n//# sourceMappingURL=WMSCapabilities.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n  
   };\n})();\n/**\n * @module ol/format/WMSGetFeatureInfo\n */\nimport GML2 from './GML2.js';\nimport XMLFeature from './XMLFeature.js';\nimport { assign } from '../obj.js';\nimport { extend, includes } from '../array.js';\nimport { makeArrayPusher, makeStructureNS, pushParseAndPop } from '../xml.js';\n/**\n * @typedef {Object} Options\n * @property {Array<string>} [layers] If set, only features of the given layers will be returned by the format when read.\n */\n/**\n * @const\n * @type {string}\n */\nvar featureIdentifier = '_feature';\n/**\n * @const\n * @type {string}\n */\nvar layerIdentifier = '_layer';\n/**\n * @classdesc\n * Format for reading WMSGetFeatureInfo format. It uses\n * {@link module:ol/format/GML2~GML2} to read features.\n *\n * @api\n */\nvar WMSGetFeatureInfo = /** @class */ (function (_super) {\n    __extends(WMSGetFeatureInfo, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function WMSGetFeatureInfo(opt_options) {\n        var _t
 his = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.featureNS_ = 'http://mapserver.gis.umn.edu/mapserver';\n        /**\n         * @private\n         * @type {GML2}\n         */\n        _this.gmlFormat_ = new GML2();\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        return _this;\n    }\n    /**\n     * @return {Array<string>} layers\n     */\n    WMSGetFeatureInfo.prototype.getLayers = function () {\n        return this.layers_;\n    };\n    /**\n     * @param {Array<string>} layers Layers to parse.\n     */\n    WMSGetFeatureInfo.prototype.setLayers = function (layers) {\n        this.layers_ = layers;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<import(\"../Feature.js\")
 .default>} Features.\n     * @private\n     */\n    WMSGetFeatureInfo.prototype.readFeatures_ = function (node, objectStack) {\n        node.setAttribute('namespaceURI', this.featureNS_);\n        var localName = node.localName;\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = [];\n        if (node.childNodes.length === 0) {\n            return features;\n        }\n        if (localName == 'msGMLOutput') {\n            for (var i = 0, ii = node.childNodes.length; i < ii; i++) {\n                var layer = node.childNodes[i];\n                if (layer.nodeType !== Node.ELEMENT_NODE) {\n                    continue;\n                }\n                var layerElement = /** @type {Element} */ (layer);\n                var context = objectStack[0];\n                var toRemove = layerIdentifier;\n                var layerName = layerElement.localName.replace(toRemove, '');\n                if (this.layers_ && !includes(this.layers_, layerName
 )) {\n                    continue;\n                }\n                var featureType = layerName + featureIdentifier;\n                context['featureType'] = featureType;\n                context['featureNS'] = this.featureNS_;\n                /** @type {Object<string, import(\"../xml.js\").Parser>} */\n                var parsers = {};\n                parsers[featureType] = makeArrayPusher(this.gmlFormat_.readFeatureElement, this.gmlFormat_);\n                var parsersNS = makeStructureNS([context['featureNS'], null], parsers);\n                layerElement.setAttribute('namespaceURI', this.featureNS_);\n                var layerFeatures = pushParseAndPop([], \n                // @ts-ignore\n                parsersNS, layerElement, objectStack, this.gmlFormat_);\n                if (layerFeatures) {\n                    extend(features, layerFeatures);\n                }\n            }\n        }\n        if (localName == 'FeatureCollection') {\n            var gmlFeatures
  = pushParseAndPop([], this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node, [{}], this.gmlFormat_);\n            if (gmlFeatures) {\n                features = gmlFeatures;\n            }\n        }\n        return features;\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    WMSGetFeatureInfo.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = {};\n        if (opt_options) {\n            assign(options, this.getReadOptions(node, opt_options));\n        }\n        return this.readFeatures_(node, [options]);\n    };\n    return WMSGetFeatureInfo;\n}(XMLFeature));\nexport default WMSGetFeatureInfo;\n//# sourceMappingURL=WMSGetFeatureInfo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object
 .setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/OWS\n */\nimport XML from './XML.js';\nimport { makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readHref } from './XLink.js';\nimport { readString } from './xsd.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS,
  {\n    'ServiceIdentification': makeObjectPropertySetter(readServiceIdentification),\n    'ServiceProvider': makeObjectPropertySetter(readServiceProvider),\n    'OperationsMetadata': makeObjectPropertySetter(readOperationsMetadata),\n});\nvar OWS = /** @class */ (function (_super) {\n    __extends(OWS, _super);\n    function OWS() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    OWS.prototype.readFromNode = function (node) {\n        var owsObject = pushParseAndPop({}, PARSERS, node, []);\n        return owsObject ? owsObject : null;\n    };\n    return OWS;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ADDRESS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'DeliveryPoint': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'AdministrativeArea': makeObjectPropertySette
 r(readString),\n    'PostalCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n    'ElectronicMailAddress': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ALLOWED_VALUES_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Value': makeObjectPropertyPusher(readValue),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONSTRAINT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'AllowedValues': makeObjectPropertySetter(readAllowedValues),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_INFO_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Phone': makeObjectPropertySetter(readPhone),\n    'Address': makeObjectPropertySetter(readAddress),\n});\n/**\n * @const\n * @type {Object<string, Obje
 ct<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DCP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHttp),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar HTTP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Get': makeObjectPropertyPusher(readGet),\n    'Post': undefined,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'DCP': makeObjectPropertySetter(readDcp),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATIONS_METADATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Operation': readOperation,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PHONE_PARSERS = makeStructureNS(NAMESP
 ACE_URIS, {\n    'Voice': makeObjectPropertySetter(readString),\n    'Facsimile': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REQUEST_METHOD_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Constraint': makeObjectPropertyPusher(readConstraint),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_CONTACT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'IndividualName': makeObjectPropertySetter(readString),\n    'PositionName': makeObjectPropertySetter(readString),\n    'ContactInfo': makeObjectPropertySetter(readContactInfo),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_IDENTIFICATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Abstract': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjec
 tPropertySetter(readString),\n    'Fees': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'ServiceTypeVersion': makeObjectPropertySetter(readString),\n    'ServiceType': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_PROVIDER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ProviderName': makeObjectPropertySetter(readString),\n    'ProviderSite': makeObjectPropertySetter(readHref),\n    'ServiceContact': makeObjectPropertySetter(readServiceContact),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The address.\n */\nfunction readAddress(node, objectStack) {\n    return pushParseAndPop({}, ADDRESS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The val
 ues.\n */\nfunction readAllowedValues(node, objectStack) {\n    return pushParseAndPop({}, ALLOWED_VALUES_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The constraint.\n */\nfunction readConstraint(node, objectStack) {\n    var name = node.getAttribute('name');\n    if (!name) {\n        return undefined;\n    }\n    return pushParseAndPop({ 'name': name }, CONSTRAINT_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The contact info.\n */\nfunction readContactInfo(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_INFO_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The DCP.\n */\nfunction readDcp(node, objectStack) {\n    return pushParseAndPop({}, DCP_PARSERS, node, objectSta
 ck);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The GET object.\n */\nfunction readGet(node, objectStack) {\n    var href = readHref(node);\n    if (!href) {\n        return undefined;\n    }\n    return pushParseAndPop({ 'href': href }, REQUEST_METHOD_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The HTTP object.\n */\nfunction readHttp(node, objectStack) {\n    return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operation.\n */\nfunction readOperation(node, objectStack) {\n    var name = node.getAttribute('name');\n    var value = pushParseAndPop({}, OPERATION_PARSERS, node, objectStack);\n    if (!value) {\n        return undefined;\n    }\n    var object = /** @type {Object}
  */ (objectStack[objectStack.length - 1]);\n    object[name] = value;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operations metadata.\n */\nfunction readOperationsMetadata(node, objectStack) {\n    return pushParseAndPop({}, OPERATIONS_METADATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The phone.\n */\nfunction readPhone(node, objectStack) {\n    return pushParseAndPop({}, PHONE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service identification.\n */\nfunction readServiceIdentification(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_IDENTIFICATION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object
 |undefined} The service contact.\n */\nfunction readServiceContact(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_CONTACT_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service provider.\n */\nfunction readServiceProvider(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_PROVIDER_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {string|undefined} The value.\n */\nfunction readValue(node, objectStack) {\n    return readString(node);\n}\nexport default OWS;\n//# sourceMappingURL=OWS.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if
  (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMTSCapabilities\n */\nimport OWS from './OWS.js';\nimport XML from './XML.js';\nimport { boundingExtent } from '../extent.js';\nimport { makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readDecimal, readNonNegativeInteger, readString } from './xsd.js';\nimport { readHref } from './XLink.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/wmts/1.0'];\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar OWS_NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n/**\n * @const\n * @type {Object<string, Object<str
 ing, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Contents': makeObjectPropertySetter(readContents),\n});\n/**\n * @classdesc\n * Format for reading WMTS capabilities data.\n *\n * @api\n */\nvar WMTSCapabilities = /** @class */ (function (_super) {\n    __extends(WMTSCapabilities, _super);\n    function WMTSCapabilities() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {OWS}\n         * @private\n         */\n        _this.owsParser_ = new OWS();\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    WMTSCapabilities.prototype.readFromNode = function (node) {\n        var version = node.getAttribute('version');\n        if (version) {\n            version = version.trim();\n        }\n        var WMTSCapabilityObject = this.owsParser_.readFromNode(node);\n        if (!WMTSCapabilityObject) {\n            return null;\n     
    }\n        WMTSCapabilityObject['version'] = version;\n        WMTSCapabilityObject = pushParseAndPop(WMTSCapabilityObject, PARSERS, node, []);\n        return WMTSCapabilityObject ? WMTSCapabilityObject : null;\n    };\n    return WMTSCapabilities;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTENTS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Layer': makeObjectPropertyPusher(readLayer),\n    'TileMatrixSet': makeObjectPropertyPusher(readTileMatrixSet),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAYER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Style': makeObjectPropertyPusher(readStyle),\n    'Format': makeObjectPropertyPusher(readString),\n    'TileMatrixSetLink': makeObjectPropertyPusher(readTileMatrixSetLink),\n    'Dimension': makeObjectPropertyPusher(readDimensions),\n    'ResourceURL': makeObjectPropertyPus
 her(readResourceUrl),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'WGS84BoundingBox': makeObjectPropertySetter(readWgs84BoundingBox),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LegendURL': makeObjectPropertyPusher(readLegendUrl),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LINKS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrixSet': makeObjectPropertySetter(readString),\n    'TileMatrixSetLimits': makeObjectPropertySetter(readTileMatrixLimitsList),\n}
 );\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LIMITS_LIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrixLimits': makeArrayPusher(readTileMatrixLimits),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LIMITS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrix': makeObjectPropertySetter(readString),\n    'MinTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MinTileCol': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileCol': makeObjectPropertySetter(readNonNegativeInteger),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DIMENSION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Default': makeObjectPropertySetter(readString),\n    'Value': makeObje
 ctPropertyPusher(readString),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WGS84_BBOX_READERS = makeStructureNS(OWS_NAMESPACE_URIS, {\n    'LowerCorner': makeArrayPusher(readCoordinates),\n    'UpperCorner': makeArrayPusher(readCoordinates),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'WellKnownScaleSet': makeObjectPropertySetter(readString),\n    'TileMatrix': makeObjectPropertyPusher(readTileMatrix),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'SupportedCRS': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TM_PARSERS 
 = makeStructureNS(NAMESPACE_URIS, {\n    'TopLeftCorner': makeObjectPropertySetter(readCoordinates),\n    'ScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'TileWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'TileHeight': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixHeight': makeObjectPropertySetter(readNonNegativeInteger),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readContents(node, objectStack) {\n    return pushParseAndPop({}, CONTENTS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layers object.\n */\nfunction readLayer(node, objectStack) {\n    return pu
 shParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set object.\n */\nfunction readTileMatrixSet(node, objectStack) {\n    return pushParseAndPop({}, TMS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n    var style = pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n    if (!style) {\n        return undefined;\n    }\n    var isDefault = node.getAttribute('isDefault') === 'true';\n    style['isDefault'] = isDefault;\n    return style;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set Link object.\n */\nfunction readTileMatrixSetLink(node, objectStack) {\n    return pushParseAndPop({}, TMS_LINKS_PARSERS, n
 ode, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Dimension object.\n */\nfunction readDimensions(node, objectStack) {\n    return pushParseAndPop({}, DIMENSION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Resource URL object.\n */\nfunction readResourceUrl(node, objectStack) {\n    var format = node.getAttribute('format');\n    var template = node.getAttribute('template');\n    var resourceType = node.getAttribute('resourceType');\n    var resource = {};\n    if (format) {\n        resource['format'] = format;\n    }\n    if (template) {\n        resource['template'] = template;\n    }\n    if (resourceType) {\n        resource['resourceType'] = resourceType;\n    }\n    return resource;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|
 undefined} WGS84 BBox object.\n */\nfunction readWgs84BoundingBox(node, objectStack) {\n    var coordinates = pushParseAndPop([], WGS84_BBOX_READERS, node, objectStack);\n    if (coordinates.length != 2) {\n        return undefined;\n    }\n    return boundingExtent(coordinates);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Legend object.\n */\nfunction readLegendUrl(node, objectStack) {\n    var legend = {};\n    legend['format'] = node.getAttribute('format');\n    legend['href'] = readHref(node);\n    return legend;\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Coordinates object.\n */\nfunction readCoordinates(node, objectStack) {\n    var coordinates = readString(node).split(/\\s+/);\n    if (!coordinates || coordinates.length != 2) {\n        return undefined;\n    }\n    var x = +coordinates[0];\n    var y = +coordinates[1];\n    if (i
 sNaN(x) || isNaN(y)) {\n        return undefined;\n    }\n    return [x, y];\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrix object.\n */\nfunction readTileMatrix(node, objectStack) {\n    return pushParseAndPop({}, TM_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixSetLimits Object.\n */\nfunction readTileMatrixLimitsList(node, objectStack) {\n    return pushParseAndPop([], TMS_LIMITS_LIST_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixLimits Array.\n */\nfunction readTileMatrixLimits(node, objectStack) {\n    return pushParseAndPop({}, TMS_LIMITS_PARSERS, node, objectStack);\n}\nexport default WMTSCapabilities;\n//# sourceMappingURL=WMTSCapabilities.js.map","var __extends = (this && 
 this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/FullScreen\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED } from '../css.js';\nimport { listen } from '../events.js';\nimport { replaceNode } from '../dom.js';\nvar events = [\n    'fullscreenchange',\n    'webkitfullscreenchange',\n    'MSFullscreenChange',\n];\n/**\n * @enum {string}\n 
 */\nvar FullScreenEventType = {\n    /**\n     * Triggered after the map entered fullscreen.\n     * @event FullScreenEventType#enterfullscreen\n     * @api\n     */\n    ENTERFULLSCREEN: 'enterfullscreen',\n    /**\n     * Triggered after the map leave fullscreen.\n     * @event FullScreenEventType#leavefullscreen\n     * @api\n     */\n    LEAVEFULLSCREEN: 'leavefullscreen',\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property
  {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nvar FullScreen = /** @class */ (funct
 ion (_super) {\n    __extends(FullScreen, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function FullScreen(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.cssClassName_ =\n            options.className !== undefined ? options.className : 'ol-full-screen';\n        var label = options.label !== undefined ? options.label : '\\u2922';\n        /**\n         * @private\n         * @type {Text}\n         */\n        _this.labelNode_ =\n            typeof label === 'string' ? document.createTextNode(label) : label;\n        var labelActive = options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n        /**\n         * @private\n         * @type {Text}\n      
    */\n        _this.labelActiveNode_ =\n            typeof labelActive === 'string'\n                ? document.createTextNode(labelActive)\n                : labelActive;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.button_ = document.createElement('button');\n        var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n        _this.setClassName_(_this.button_, isFullScreen());\n        _this.button_.setAttribute('type', 'button');\n        _this.button_.title = tipLabel;\n        _this.button_.appendChild(_this.labelNode_);\n        _this.button_.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = _this.cssClassName_ +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            ' ' +\n            (!isFullScreenSupported() ? CLASS_UNSUPPORTED : '');\n        var element = _this.element;\n        element.class
 Name = cssClasses;\n        element.appendChild(_this.button_);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.keys_ = options.keys !== undefined ? options.keys : false;\n        /**\n         * @private\n         * @type {HTMLElement|string|undefined}\n         */\n        _this.source_ = options.source;\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    FullScreen.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleFullScreen_();\n    };\n    /**\n     * @private\n     */\n    FullScreen.prototype.handleFullScreen_ = function () {\n        if (!isFullScreenSupported()) {\n            return;\n        }\n        var map = this.getMap();\n        if (!map) {\n            return;\n        }\n        if (isFullScreen()) {\n            exitFullScreen();\n        }\n        else {\n            var element = void 0;\n            
 if (this.source_) {\n                element =\n                    typeof this.source_ === 'string'\n                        ? document.getElementById(this.source_)\n                        : this.source_;\n            }\n            else {\n                element = map.getTargetElement();\n            }\n            if (this.keys_) {\n                requestFullScreenWithKeys(element);\n            }\n            else {\n                requestFullScreen(element);\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    FullScreen.prototype.handleFullScreenChange_ = function () {\n        var map = this.getMap();\n        if (isFullScreen()) {\n            this.setClassName_(this.button_, true);\n            replaceNode(this.labelActiveNode_, this.labelNode_);\n            this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n        }\n        else {\n            this.setClassName_(this.button_, false);\n            replaceNode(this.labelNode_, this.labelAct
 iveNode_);\n            this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n        }\n        if (map) {\n            map.updateSize();\n        }\n    };\n    /**\n     * @param {HTMLElement} element Target element\n     * @param {boolean} fullscreen True if fullscreen class name should be active\n     * @private\n     */\n    FullScreen.prototype.setClassName_ = function (element, fullscreen) {\n        var activeClassName = this.cssClassName_ + '-true';\n        var inactiveClassName = this.cssClassName_ + '-false';\n        var nextClassName = fullscreen ? activeClassName : inactiveClassName;\n        element.classList.remove(activeClassName);\n        element.classList.remove(inactiveClassName);\n        element.classList.add(nextClassName);\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableM
 ap.js\").default} map Map.\n     * @api\n     */\n    FullScreen.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            for (var i = 0, ii = events.length; i < ii; ++i) {\n                this.listenerKeys.push(listen(document, events[i], this.handleFullScreenChange_, this));\n            }\n        }\n    };\n    return FullScreen;\n}(Control));\n/**\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported() {\n    var body = document.body;\n    return !!(body['webkitRequestFullscreen'] ||\n        (body['msRequestFullscreen'] && document['msFullscreenEnabled']) ||\n        (body.requestFullscreen && document.fullscreenEnabled));\n}\n/**\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen() {\n    return !!(document['webkitIsFullScreen'] ||\n        document['msFullscreenElement'] ||\n        document.fullscreenElement);\n}\n/**\n * Re
 quest to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n    if (element.requestFullscreen) {\n        element.requestFullscreen();\n    }\n    else if (element['msRequestFullscreen']) {\n        element['msRequestFullscreen']();\n    }\n    else if (element['webkitRequestFullscreen']) {\n        element['webkitRequestFullscreen']();\n    }\n}\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n    if (element['webkitRequestFullscreen']) {\n        element['webkitRequestFullscreen']();\n    }\n    else {\n        requestFullScreen(element);\n    }\n}\n/**\n * Exit fullscreen.\n */\nfunction exitFullScreen() {\n    if (document.exitFullscreen) {\n        document.exitFullscreen();\n    }\n    else if (document['msExitFullscreen']) {\n        document['msExitFullscreen']();\n   
  }\n    else if (document['webkitExitFullscreen']) {\n        document['webkitExitFullscreen']();\n    }\n}\nexport default FullScreen;\n//# sourceMappingURL=FullScreen.js.map","/**\n * @module ol/control/MousePosition\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Control from './Control.js';\nimport EventType from '../pointer/EventType.js';\nimport { getChangeEventType } from '../Object.js';\nimport { get as getProjection, get
 TransformFromProjections, getUserProjection, identityTransform, } from '../proj.js';\nimport { listen } from '../events.js';\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [undefinedHTML=' '] Markup to show when coordinates are not\n * 
 available (e.g. when the pointer leaves the map viewport).  By default, the last position\n * will be replaced with `' '` (` `) when the pointer leaves the viewport.  To\n * retain the last rendered position, set this option to something falsey (like an empty\n * string `''`).\n */\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /** @class */ (function (_super) {\n    __extends(MousePosition, _super);\n    /**\n     * @param {Options=} opt_options Mouse position options.\n     */\n    function MousePosition(opt_options) {\n        var _t
 his = this;\n        var options = opt_options ? opt_options : {};\n        var element = document.createElement('div');\n        element.className =\n            options.className !== undefined ? options.className : 'ol-mouse-position';\n        _this = _super.call(this, {\n            element: element,\n            render: options.render,\n            target: options.target,\n        }) || this;\n        _this.addEventListener(getChangeEventType(PROJECTION), _this.handleProjectionChanged_);\n        if (options.coordinateFormat) {\n            _this.setCoordinateFormat(options.coordinateFormat);\n        }\n        if (options.projection) {\n            _this.setProjection(options.projection);\n        }\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.undefinedHTML_ =\n            options.undefinedHTML !== undefined ? options.undefinedHTML : ' ';\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.
 renderOnMouseOut_ = !!_this.undefinedHTML_;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.renderedHTML_ = element.innerHTML;\n        /**\n         * @private\n         * @type {?import(\"../proj/Projection.js\").default}\n         */\n        _this.mapProjection_ = null;\n        /**\n         * @private\n         * @type {?import(\"../proj.js\").TransformFunction}\n         */\n        _this.transform_ = null;\n        return _this;\n    }\n    /**\n     * @private\n     */\n    MousePosition.prototype.handleProjectionChanged_ = function () {\n        this.transform_ = null;\n    };\n    /**\n     * Return the coordinate format type used to render the current position or\n     * undefined.\n     * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.getCoordinateFormat = function () {\n        retur
 n /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));\n    };\n    /**\n     * Return the projection that is used to report the mouse position.\n     * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.getProjection = function () {\n        return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(PROJECTION));\n    };\n    /**\n     * @param {MouseEvent} event Browser event.\n     * @protected\n     */\n    MousePosition.prototype.handleMouseMove = function (event) {\n        var map = this.getMap();\n        this.updateHTML_(map.getEventPixel(event));\n    };\n    /**\n     * @param {Event} event Browser event.\n     * @protected\n     */\n    MousePosition.prototype.handleMouseOut = function (event) {\n        this.updateHTML_(null);\n    };\n    /**\n     * Remove the
  control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    MousePosition.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            var viewport = map.getViewport();\n            this.listenerKeys.push(listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this));\n            if (this.renderOnMouseOut_) {\n                this.listenerKeys.push(listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this));\n            }\n        }\n    };\n    /**\n     * Set the coordinate format type used to render the current position.\n     * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.set
 CoordinateFormat = function (format) {\n        this.set(COORDINATE_FORMAT, format);\n    };\n    /**\n     * Set the projection that is used to report the mouse position.\n     * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.setProjection = function (projection) {\n        this.set(PROJECTION, getProjection(projection));\n    };\n    /**\n     * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @private\n     */\n    MousePosition.prototype.updateHTML_ = function (pixel) {\n        var html = this.undefinedHTML_;\n        if (pixel && this.mapProjection_) {\n            if (!this.transform_) {\n                var projection = this.getProjection();\n                if (projection) {\n                    this.transform_ = getTransformFromProjections(this.mapProjection_, projection);\n                }\n                else {\n         
            this.transform_ = identityTransform;\n                }\n            }\n            var map = this.getMap();\n            var coordinate = map.getCoordinateFromPixelInternal(pixel);\n            if (coordinate) {\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    this.transform_ = getTransformFromProjections(this.mapProjection_, userProjection);\n                }\n                this.transform_(coordinate, coordinate);\n                var coordinateFormat = this.getCoordinateFormat();\n                if (coordinateFormat) {\n                    html = coordinateFormat(coordinate);\n                }\n                else {\n                    html = coordinate.toString();\n                }\n            }\n        }\n        if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n            this.element.innerHTML = html;\n            this.renderedHTML_ = html;\n        }\n    };\n    /**\n     * 
 Update the projection. Rendering of the coordinates is done in\n     * `handleMouseMove` and `handleMouseUp`.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    MousePosition.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            this.mapProjection_ = null;\n        }\n        else {\n            if (this.mapProjection_ != frameState.viewState.projection) {\n                this.mapProjection_ = frameState.viewState.projection;\n                this.transform_ = null;\n            }\n        }\n    };\n    return MousePosition;\n}(Control));\nexport default MousePosition;\n//# sourceMappingURL=MousePosition.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n
             function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/OverviewMap\n */\nimport CompositeMapRenderer from '../renderer/Composite.js';\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport OverlayPositioning from '../OverlayPositioning.js';\nimport PluggableMap from '../PluggableMap.js';\nimport View from '../View.js';\nimport ViewProperty from '../ViewProperty.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js
 ';\nimport { containsExtent, equals as equalsExtent, getBottomRight, getTopLeft, scaleFromCenter, } from '../extent.js';\nimport { getChangeEventType } from '../Object.js';\nimport { listen, listenOnce } from '../events.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\nimport { replaceNode } from '../dom.js';\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nvar MAX_RATIO = 0.75;\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nvar MIN_RATIO = 0.1;\nvar ControlledMap = /** @class */ (function (_super) {\n    __extends(ControlledMap, _super);\n    function ControlledMap() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    ControlledMap.prototype.createRenderer = function () {\n        return new CompositeMapRenderer(this);\n    };\n    return Con
 trolledMap;\n}(PluggableMap));\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='«'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array<import(\"../layer/Layer.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Layer.js\").default>} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rende
 red. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nvar OverviewMap = /** @class */ (function (_super) {\n    __extends(OverviewMap, _super);\n    /**\n     * @param {Options=} opt_options OverviewMap options.\n     */\n    function OverviewMap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n 
        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         */\n        _this.boundHandleRotationChanged_ = _this.handleRotationChanged_.bind(_this);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.collapsed_ =\n            options.collapsed !== undefined ? options.collapsed : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsible_ =\n            options.collapsible !== undefined ? options.collapsible : true;\n        if (!_this.collapsible_) {\n            _this.collapsed_ = false;\n        }\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.rotateWithView_ =\n            options.rotateWithView !== undefined ? options.rotateWithView : false;\n        /**\n         * @private\n         
 * @type {import(\"../extent.js\").Extent|undefined}\n         */\n        _this.viewExtent_ = undefined;\n        var className = options.className !== undefined ? options.className : 'ol-overviewmap';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n        var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00AB';\n        if (typeof collapseLabel === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.collapseLabel_ = document.createElement('span');\n            _this.collapseLabel_.textContent = collapseLabel;\n        }\n        else {\n            _this.collapseLabel_ = collapseLabel;\n        }\n        var label = options.label !== undefined ? options.label : '\\u00BB';\n        if (typeof label === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.la
 bel_ = document.createElement('span');\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n        }\n        var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n        var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(activeLabel);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        /**\n         * @type {HTMLElement}\n         * @private\n         */\n        _this.ovmapDiv_ = document.createElement('div');\n        _this.ovmapDiv_.className = 'ol-overviewmap-map';\n        /**\n         * Explicitly given view to be used instead of a view derived from the main map.\n         * @type {View}\n         * @private\n         */\n        _this.view_ = options.view;\n        /**\n         * @type {ControlledMap}\n         * @private
 \n         */\n        _this.ovmap_ = new ControlledMap({\n            view: options.view,\n        });\n        var ovmap = _this.ovmap_;\n        if (options.layers) {\n            options.layers.forEach(function (layer) {\n                ovmap.addLayer(layer);\n            });\n        }\n        var box = document.createElement('div');\n        box.className = 'ol-overviewmap-box';\n        box.style.boxSizing = 'border-box';\n        /**\n         * @type {import(\"../Overlay.js\").default}\n         * @private\n         */\n        _this.boxOverlay_ = new Overlay({\n            position: [0, 0],\n            positioning: OverlayPositioning.CENTER_CENTER,\n            element: box,\n        });\n        _this.ovmap_.addOverlay(_this.boxOverlay_);\n        var cssClasses = className +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            (_this.collapsed_ && _this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n         
    (_this.collapsible_ ? '' : ' ol-uncollapsible');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.ovmapDiv_);\n        element.appendChild(button);\n        /* Interactive map */\n        var scope = _this;\n        var overlay = _this.boxOverlay_;\n        var overlayBox = _this.boxOverlay_.getElement();\n        /* Functions definition */\n        var computeDesiredMousePosition = function (mousePosition) {\n            return {\n                clientX: mousePosition.clientX,\n                clientY: mousePosition.clientY,\n            };\n        };\n        var move = function (event) {\n            var position = /** @type {?} */ (computeDesiredMousePosition(event));\n            var coordinates = ovmap.getEventCoordinateInternal(\n            /** @type {MouseEvent} */ (position));\n            overlay.setPosition(coordinates);\n        };\n        var endMoving = function (event) {\n            var coordinat
 es = ovmap.getEventCoordinateInternal(event);\n            scope.getMap().getView().setCenterInternal(coordinates);\n            window.removeEventListener('mousemove', move);\n            window.removeEventListener('mouseup', endMoving);\n        };\n        /* Binding */\n        overlayBox.addEventListener('mousedown', function () {\n            window.addEventListener('mousemove', move);\n            window.addEventListener('mouseup', endMoving);\n        });\n        return _this;\n    }\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    OverviewMap.prototype.setMap = function (map) {\n        var oldMap = this.getMap();\n        if (map === oldMap) {\n            return;\n        }\n        if (oldMap) {\n            var oldView = oldMap.getView();\n   
          if (oldView) {\n                this.unbindView_(oldView);\n            }\n            this.ovmap_.setTarget(null);\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            this.ovmap_.setTarget(this.ovmapDiv_);\n            this.listenerKeys.push(listen(map, ObjectEventType.PROPERTYCHANGE, this.handleMapPropertyChange_, this));\n            var view = map.getView();\n            if (view) {\n                this.bindView_(view);\n                if (view.isDef()) {\n                    this.ovmap_.updateSize();\n                    this.resetExtent_();\n                }\n            }\n        }\n    };\n    /**\n     * Handle map property changes.  This only deals with changes to the map's view.\n     * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n     * @private\n     */\n    OverviewMap.prototype.handleMapPropertyChange_ = function (event) {\n        if (event.key === MapProperty.VIEW) {\n          
   var oldView = /** @type {import(\"../View.js\").default} */ (event.oldValue);\n            if (oldView) {\n                this.unbindView_(oldView);\n            }\n            var newView = this.getMap().getView();\n            this.bindView_(newView);\n        }\n    };\n    /**\n     * Register listeners for view property changes.\n     * @param {import(\"../View.js\").default} view The view.\n     * @private\n     */\n    OverviewMap.prototype.bindView_ = function (view) {\n        if (!this.view_) {\n            // Unless an explicit view definition was given, derive default from whatever main map uses.\n            var newView = new View({\n                projection: view.getProjection(),\n            });\n            this.ovmap_.setView(newView);\n        }\n        view.addEventListener(getChangeEventType(ViewProperty.ROTATION), this.boundHandleRotationChanged_);\n        // Sync once with the new view\n        this.handleRotationChanged_();\n    };\n    /**\n     * Unre
 gister listeners for view property changes.\n     * @param {import(\"../View.js\").default} view The view.\n     * @private\n     */\n    OverviewMap.prototype.unbindView_ = function (view) {\n        view.removeEventListener(getChangeEventType(ViewProperty.ROTATION), this.boundHandleRotationChanged_);\n    };\n    /**\n     * Handle rotation changes to the main map.\n     * @private\n     */\n    OverviewMap.prototype.handleRotationChanged_ = function () {\n        if (this.rotateWithView_) {\n            this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n        }\n    };\n    /**\n     * Reset the overview map extent if the box size (width or\n     * height) is less than the size of the overview map size times minRatio\n     * or is greater than the size of the overview size times maxRatio.\n     *\n     * If the map extent was not reset, the box size can fits in the defined\n     * ratio sizes. This method then checks if is contained inside the overview\n
      * map current extent. If not, recenter the overview map to the current\n     * main map center location.\n     * @private\n     */\n    OverviewMap.prototype.validateExtent_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        if (!map.isRendered() || !ovmap.isRendered()) {\n            return;\n        }\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var extent = view.calculateExtentInternal(mapSize);\n        if (this.viewExtent_ && equalsExtent(extent, this.viewExtent_)) {\n            // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n            return;\n        }\n        this.viewExtent_ = extent;\n        var ovmapSize = /** @type {import(\"../size.js\").Size} */ (ovmap.getSize());\n        var ovview = ovmap.getView();\n        var ovextent = ovview.calculateExtentInternal(ovmapSize);\n        var topLeftPixel
  = ovmap.getPixelFromCoordinateInternal(getTopLeft(extent));\n        var bottomRightPixel = ovmap.getPixelFromCoordinateInternal(getBottomRight(extent));\n        var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n        var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n        var ovmapWidth = ovmapSize[0];\n        var ovmapHeight = ovmapSize[1];\n        if (boxWidth < ovmapWidth * MIN_RATIO ||\n            boxHeight < ovmapHeight * MIN_RATIO ||\n            boxWidth > ovmapWidth * MAX_RATIO ||\n            boxHeight > ovmapHeight * MAX_RATIO) {\n            this.resetExtent_();\n        }\n        else if (!containsExtent(ovextent, extent)) {\n            this.recenter_();\n        }\n    };\n    /**\n     * Reset the overview map extent to half calculated min and max ratio times\n     * the extent of the main map.\n     * @private\n     */\n    OverviewMap.prototype.resetExtent_ = function () {\n        if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n
             return;\n        }\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var extent = view.calculateExtentInternal(mapSize);\n        var ovview = ovmap.getView();\n        // get how many times the current map overview could hold different\n        // box sizes using the min and max ratio, pick the step in the middle used\n        // to calculate the extent from the main map to set it to the overview map,\n        var steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n        var ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n        scaleFromCenter(extent, ratio);\n        ovview.fitInternal(polygonFromExtent(extent));\n    };\n    /**\n     * Set the center of the overview map to the map center without changing its\n     * resolution.\n     * @private\n     */\n    OverviewMap.prototype.recenter_ = function () {\n        va
 r map = this.getMap();\n        var ovmap = this.ovmap_;\n        var view = map.getView();\n        var ovview = ovmap.getView();\n        ovview.setCenterInternal(view.getCenterInternal());\n    };\n    /**\n     * Update the box using the main map extent\n     * @private\n     */\n    OverviewMap.prototype.updateBox_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        if (!map.isRendered() || !ovmap.isRendered()) {\n            return;\n        }\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var ovview = ovmap.getView();\n        var rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n        var overlay = this.boxOverlay_;\n        var box = this.boxOverlay_.getElement();\n        var center = view.getCenterInternal();\n        var resolution = view.getResolution();\n        var ovresolution = ovview.getResolution();\n        var width = (mapSize[0] *
  resolution) / ovresolution;\n        var height = (mapSize[1] * resolution) / ovresolution;\n        // set position using center coordinates\n        overlay.setPosition(center);\n        // set box size calculated from map extent size and overview map resolution\n        if (box) {\n            box.style.width = width + 'px';\n            box.style.height = height + 'px';\n            var transform = 'rotate(' + rotation + 'rad)';\n            box.style.transform = transform;\n        }\n    };\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    OverviewMap.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleToggle_();\n    };\n    /**\n     * @private\n     */\n    OverviewMap.prototype.handleToggle_ = function () {\n        this.element.classList.toggle(CLASS_COLLAPSED);\n        if (this.collapsed_) {\n            replaceNode(this.collapseLabel_, this.label_);\n        }\n        else {\n   
          replaceNode(this.label_, this.collapseLabel_);\n        }\n        this.collapsed_ = !this.collapsed_;\n        // manage overview map if it had not been rendered before and control\n        // is expanded\n        var ovmap = this.ovmap_;\n        if (!this.collapsed_) {\n            if (ovmap.isRendered()) {\n                this.viewExtent_ = undefined;\n                ovmap.render();\n                return;\n            }\n            ovmap.updateSize();\n            this.resetExtent_();\n            listenOnce(ovmap, MapEventType.POSTRENDER, function (event) {\n                this.updateBox_();\n            }, this);\n        }\n    };\n    /**\n     * Return `true` if the overview map is collapsible, `false` otherwise.\n     * @return {boolean} True if the widget is collapsible.\n     * @api\n     */\n    OverviewMap.prototype.getCollapsible = function () {\n        return this.collapsible_;\n    };\n    /**\n     * Set whether the overview map should be collapsibl
 e.\n     * @param {boolean} collapsible True if the widget is collapsible.\n     * @api\n     */\n    OverviewMap.prototype.setCollapsible = function (collapsible) {\n        if (this.collapsible_ === collapsible) {\n            return;\n        }\n        this.collapsible_ = collapsible;\n        this.element.classList.toggle('ol-uncollapsible');\n        if (!collapsible && this.collapsed_) {\n            this.handleToggle_();\n        }\n    };\n    /**\n     * Collapse or expand the overview map according to the passed parameter. Will\n     * not do anything if the overview map isn't collapsible or if the current\n     * collapsed state is already the one requested.\n     * @param {boolean} collapsed True if the widget is collapsed.\n     * @api\n     */\n    OverviewMap.prototype.setCollapsed = function (collapsed) {\n        if (!this.collapsible_ || this.collapsed_ === collapsed) {\n            return;\n        }\n        this.handleToggle_();\n    };\n    /**\n     * Determi
 ne if the overview map is collapsed.\n     * @return {boolean} The overview map is collapsed.\n     * @api\n     */\n    OverviewMap.prototype.getCollapsed = function () {\n        return this.collapsed_;\n    };\n    /**\n     * Return `true` if the overview map view can rotate, `false` otherwise.\n     * @return {boolean} True if the control view can rotate.\n     * @api\n     */\n    OverviewMap.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Set whether the overview map view should rotate with the main map view.\n     * @param {boolean} rotateWithView True if the control view should rotate.\n     * @api\n     */\n    OverviewMap.prototype.setRotateWithView = function (rotateWithView) {\n        if (this.rotateWithView_ === rotateWithView) {\n            return;\n        }\n        this.rotateWithView_ = rotateWithView;\n        if (this.getMap().getView().getRotation() !== 0) {\n            if (this.rotateWithView_) {\n 
                this.handleRotationChanged_();\n            }\n            else {\n                this.ovmap_.getView().setRotation(0);\n            }\n            this.viewExtent_ = undefined;\n            this.validateExtent_();\n            this.updateBox_();\n        }\n    };\n    /**\n     * Return the overview map.\n     * @return {import(\"../PluggableMap.js\").default} Overview map.\n     * @api\n     */\n    OverviewMap.prototype.getOverviewMap = function () {\n        return this.ovmap_;\n    };\n    /**\n     * Update the overview map element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    OverviewMap.prototype.render = function (mapEvent) {\n        this.validateExtent_();\n        this.updateBox_();\n    };\n    return OverviewMap;\n}(Control));\nexport default OverviewMap;\n//# sourceMappingURL=OverviewMap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b
 ) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/ScaleLine\n */\nimport Control from './Control.js';\nimport ProjUnits from '../proj/Units.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { METERS_PER_UNIT, getPointResolution } from '../proj.js';\nimport { assert } from '../asserts.js';\nimport { getChangeEventType } from '../Object.js';\n/**\n * @type {string}\n */\nvar UNITS_PROP = 'units';\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric
 '`, `'us'`.\n * @enum {string}\n */\nexport var Units = {\n    DEGREES: 'degrees',\n    IMPERIAL: 'imperial',\n    NAUTICAL: 'nautical',\n    METRIC: 'metric',\n    US: 'us',\n};\n/**\n * @const\n * @type {Array<number>}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n/**\n * @const\n * @type {number}\n */\nvar DEFAULT_DPI = 25.4 / 0.28;\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {import(\"./ScaleLine.js\").Units|string} [units='metric'] Units.\n * @property {boolea
 n} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but
  this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n *\n * @api\n */\nvar ScaleLine = /** @class */ (function (_super) {\n    __extends(ScaleLine, _super);\n    /**\n     * @param {Options=} opt_options Scale line options.\n     */\n    function ScaleLine(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var className = options.className !== undefined\n            ? options.className\n            : options.bar\n                ? 'ol-scale-bar'\n                : 'ol-scale-line';\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.innerElement_ = document.createElement('div');\n        _this.innerElem
 ent_.className = className + '-inner';\n        _this.element.className = className + ' ' + CLASS_UNSELECTABLE;\n        _this.element.appendChild(_this.innerElement_);\n        /**\n         * @private\n         * @type {?import(\"../View.js\").State}\n         */\n        _this.viewState_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = false;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.renderedWidth_ = undefined;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.renderedHTML_ = '';\n        _this.addEventListener(getChangeEventType(UNITS_PROP), _this.handleUnitsChanged_);\n        _this.setUnits(options.units || Units.METRIC);\n        /**\n         * @private\n     
     * @type {boolean}\n         */\n        _this.scaleBar_ = options.bar || false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.scaleBarSteps_ = options.steps || 4;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.scaleBarText_ = options.text || false;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.dpi_ = options.dpi || undefined;\n        return _this;\n    }\n    /**\n     * Return the units to use in the scale line.\n     * @return {import(\"./ScaleLine.js\").Units} The units\n     * to use in the scale line.\n     * @observable\n     * @api\n     */\n    ScaleLine.prototype.getUnits = function () {\n        return this.get(UNITS_PROP);\n    };\n    /**\n     * @private\n     */\n    ScaleLine.prototype.handleUnitsChanged_ = function () {\n        this.updateElement_();\n    };\n    /**\n     * Set the units to use in the scale line.\n     * @p
 aram {import(\"./ScaleLine.js\").Units} units The units to use in the scale line.\n     * @observable\n     * @api\n     */\n    ScaleLine.prototype.setUnits = function (units) {\n        this.set(UNITS_PROP, units);\n    };\n    /**\n     * Specify the dpi of output device such as printer.\n     * @param {number|undefined} dpi The dpi of output device.\n     * @api\n     */\n    ScaleLine.prototype.setDpi = function (dpi) {\n        this.dpi_ = dpi;\n    };\n    /**\n     * @private\n     */\n    ScaleLine.prototype.updateElement_ = function () {\n        var viewState = this.viewState_;\n        if (!viewState) {\n            if (this.renderedVisible_) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        var center = viewState.center;\n        var projection = viewState.projection;\n        var units = this.getUnits();\n        var pointResolutionUnits = units == Units.DEGREE
 S ? ProjUnits.DEGREES : ProjUnits.METERS;\n        var pointResolution = getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);\n        var minWidth = (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI;\n        var nominalCount = minWidth * pointResolution;\n        var suffix = '';\n        if (units == Units.DEGREES) {\n            var metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n            nominalCount *= metersPerDegree;\n            if (nominalCount < metersPerDegree / 60) {\n                suffix = '\\u2033'; // seconds\n                pointResolution *= 3600;\n            }\n            else if (nominalCount < metersPerDegree) {\n                suffix = '\\u2032'; // minutes\n                pointResolution *= 60;\n            }\n            else {\n                suffix = '\\u00b0'; // degrees\n            }\n        }\n        else if (units == Units.IMPERIAL) {\n            if (nominalCount < 0.9144) {\n               
  suffix = 'in';\n                pointResolution /= 0.0254;\n            }\n            else if (nominalCount < 1609.344) {\n                suffix = 'ft';\n                pointResolution /= 0.3048;\n            }\n            else {\n                suffix = 'mi';\n                pointResolution /= 1609.344;\n            }\n        }\n        else if (units == Units.NAUTICAL) {\n            pointResolution /= 1852;\n            suffix = 'nm';\n        }\n        else if (units == Units.METRIC) {\n            if (nominalCount < 0.001) {\n                suffix = 'μm';\n                pointResolution *= 1000000;\n            }\n            else if (nominalCount < 1) {\n                suffix = 'mm';\n                pointResolution *= 1000;\n            }\n            else if (nominalCount < 1000) {\n                suffix = 'm';\n            }\n            else {\n                suffix = 'km';\n                pointResolution /= 1000;\n            }\n        }\n        else if 
 (units == Units.US) {\n            if (nominalCount < 0.9144) {\n                suffix = 'in';\n                pointResolution *= 39.37;\n            }\n            else if (nominalCount < 1609.344) {\n                suffix = 'ft';\n                pointResolution /= 0.30480061;\n            }\n            else {\n                suffix = 'mi';\n                pointResolution /= 1609.3472;\n            }\n        }\n        else {\n            assert(false, 33); // Invalid units\n        }\n        var i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n        var count, width, decimalCount;\n        while (true) {\n            decimalCount = Math.floor(i / 3);\n            var decimal = Math.pow(10, decimalCount);\n            count = LEADING_DIGITS[((i % 3) + 3) % 3] * decimal;\n            width = Math.round(count / pointResolution);\n            if (isNaN(width)) {\n                this.element.style.display = 'none';\n                this.renderedVisi
 ble_ = false;\n                return;\n            }\n            else if (width >= minWidth) {\n                break;\n            }\n            ++i;\n        }\n        var html;\n        if (this.scaleBar_) {\n            html = this.createScaleBar(width, count, suffix);\n        }\n        else {\n            html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n        }\n        if (this.renderedHTML_ != html) {\n            this.innerElement_.innerHTML = html;\n            this.renderedHTML_ = html;\n        }\n        if (this.renderedWidth_ != width) {\n            this.innerElement_.style.width = width + 'px';\n            this.renderedWidth_ = width;\n        }\n        if (!this.renderedVisible_) {\n            this.element.style.display = '';\n            this.renderedVisible_ = true;\n        }\n    };\n    /**\n     * @private\n     * @param {number} width The current width of the scalebar.\n     * @param {number} scale The current scale.\n   
   * @param {string} suffix The suffix to append to the scale text.\n     * @returns {string} The stringified HTML of the scalebar.\n     */\n    ScaleLine.prototype.createScaleBar = function (width, scale, suffix) {\n        var mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString();\n        var scaleSteps = [];\n        var stepWidth = width / this.scaleBarSteps_;\n        var backgroundColor = '#ffffff';\n        for (var i = 0; i < this.scaleBarSteps_; i++) {\n            if (i === 0) {\n                // create the first marker at position 0\n                scaleSteps.push(this.createMarker('absolute', i));\n            }\n            scaleSteps.push('<div>' +\n                '<div ' +\n                'class=\"ol-scale-singlebar\" ' +\n                'style=' +\n                '\"width: ' +\n                stepWidth +\n                'px;' +\n                'background-color: ' +\n                backgroundColor +\n                ';\"' +\n      
           '>' +\n                '</div>' +\n                this.createMarker('relative', i) +\n                /*render text every second step, except when only 2 steps */\n                (i % 2 === 0 || this.scaleBarSteps_ === 2\n                    ? this.createStepText(i, width, false, scale, suffix)\n                    : '') +\n                '</div>');\n            if (i === this.scaleBarSteps_ - 1) {\n                {\n                    /*render text at the end */\n                }\n                scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix));\n            }\n            // switch colors of steps between black and white\n            if (backgroundColor === '#ffffff') {\n                backgroundColor = '#000000';\n            }\n            else {\n                backgroundColor = '#ffffff';\n            }\n        }\n        var scaleBarText;\n        if (this.scaleBarText_) {\n            scaleBarText =\n                '<div ' +\n      
               'class=\"ol-scale-text\" ' +\n                    'style=\"width: ' +\n                    width +\n                    'px;\">' +\n                    mapScale +\n                    '</div>';\n        }\n        else {\n            scaleBarText = '';\n        }\n        var container = '<div ' +\n            'style=\"display: flex;\">' +\n            scaleBarText +\n            scaleSteps.join('') +\n            '</div>';\n        return container;\n    };\n    /**\n     * Creates a marker at given position\n     * @param {string} position - The position, absolute or relative\n     * @param {number} i - The iterator\n     * @returns {string} The stringified div containing the marker\n     */\n    ScaleLine.prototype.createMarker = function (position, i) {\n        var top = position === 'absolute' ? 3 : -10;\n        return ('<div ' +\n            'class=\"ol-scale-step-marker\" ' +\n            'style=\"position: ' +\n            position +\n            ';' +\n     
        'top: ' +\n            top +\n            'px;\"' +\n            '></div>');\n    };\n    /**\n     * Creates the label for a marker marker at given position\n     * @param {number} i - The iterator\n     * @param {number} width - The width the scalebar will currently use\n     * @param {boolean} isLast - Flag indicating if we add the last step text\n     * @param {number} scale - The current scale for the whole scalebar\n     * @param {string} suffix - The suffix for the scale\n     * @returns {string} The stringified div containing the step text\n     */\n    ScaleLine.prototype.createStepText = function (i, width, isLast, scale, suffix) {\n        var length = i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100;\n        var lengthString = length + (i === 0 ? '' : ' ' + suffix);\n        var margin = i === 0 ? -3 : (width / this.scaleBarSteps_) * -1;\n        var minWidth = i === 0 ? 0 : (width / this.scaleBarSteps_) * 2;\n        return ('<div ' +\n   
          'class=\"ol-scale-step-text\" ' +\n            'style=\"' +\n            'margin-left: ' +\n            margin +\n            'px;' +\n            'text-align: ' +\n            (i === 0 ? 'left' : 'center') +\n            '; ' +\n            'min-width: ' +\n            minWidth +\n            'px;' +\n            'left: ' +\n            (isLast ? width + 'px' : 'unset') +\n            ';\"' +\n            '>' +\n            lengthString +\n            '</div>');\n    };\n    /**\n     * Returns the appropriate scale for the given resolution and units.\n     * @return {number} The appropriate scale.\n     */\n    ScaleLine.prototype.getScaleForResolution = function () {\n        var resolution = getPointResolution(this.viewState_.projection, this.viewState_.resolution, this.viewState_.center);\n        var dpi = this.dpi_ || DEFAULT_DPI;\n        var mpu = this.viewState_.projection.getMetersPerUnit();\n        var inchesPerMeter = 39.37;\n        return parseFloat(resoluti
 on.toString()) * mpu * inchesPerMeter * dpi;\n    };\n    /**\n     * Update the scale line element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    ScaleLine.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            this.viewState_ = null;\n        }\n        else {\n            this.viewState_ = frameState.viewState;\n        }\n        this.updateElement_();\n    };\n    return ScaleLine;\n}(Control));\nexport default ScaleLine;\n//# sourceMappingURL=ScaleLine.js.map","/**\n * @module ol/control/ZoomSlider\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return
  extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport PointerEventType from '../pointer/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { clamp } from '../math.js';\nimport { easeOut } from '../easing.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { stopPropagation } from '../events/Event.js';\n/**\n * The enum for available directions.\n *\n * @enum {number}\n */\nvar Direction = {\n    VERTICAL: 0,\n    HORIZONTAL: 1,\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent
 .js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n */\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n *     map.addControl(new ZoomSlider());\n *\n * @api\n */\nvar ZoomSlider = /** @class */ (function (_super) {\n    __extends(ZoomSlider, _super);\n    /**\n     * @param {Options=} opt_options Zoom slider options.\n     */\n    function ZoomSlider(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n        }) || this;\n        /**\n         * @type {!Array.<import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.dragListenerKeys_ = [];\n        /**\n         * Will hold the current resolution of the view.\n         *\n         * @type {number|undefined
 }\n         * @private\n         */\n        _this.currentResolution_ = undefined;\n        /**\n         * The direction of the slider. Will be determined from actual display of the\n         * container and defaults to Direction.VERTICAL.\n         *\n         * @type {Direction}\n         * @private\n         */\n        _this.direction_ = Direction.VERTICAL;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.dragging_;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.heightLimit_ = 0;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.widthLimit_ = 0;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.startX_;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.startY_;\n        /**\n         * The calculated thumb size (border box plus margins).  Set when initSlider_\n 
         * is called.\n         * @type {import(\"../size.js\").Size}\n         * @private\n         */\n        _this.thumbSize_ = null;\n        /**\n         * Whether the slider is initialized.\n         * @type {boolean}\n         * @private\n         */\n        _this.sliderInitialized_ = false;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 200;\n        var className = options.className !== undefined ? options.className : 'ol-zoomslider';\n        var thumbElement = document.createElement('button');\n        thumbElement.setAttribute('type', 'button');\n        thumbElement.className = className + '-thumb ' + CLASS_UNSELECTABLE;\n        var containerElement = _this.element;\n        containerElement.className =\n            className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        containerElement.appendChild(thumbElement);\n        containerElement.addEventLi
 stener(PointerEventType.POINTERDOWN, _this.handleDraggerStart_.bind(_this), false);\n        containerElement.addEventListener(PointerEventType.POINTERMOVE, _this.handleDraggerDrag_.bind(_this), false);\n        containerElement.addEventListener(PointerEventType.POINTERUP, _this.handleDraggerEnd_.bind(_this), false);\n        containerElement.addEventListener(EventType.CLICK, _this.handleContainerClick_.bind(_this), false);\n        thumbElement.addEventListener(EventType.CLICK, stopPropagation, false);\n        return _this;\n    }\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    ZoomSlider.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            map.render();\n        }\n    };\n    /**\n     *
  Initializes the slider element. This will determine and set this controls\n     * direction_ and also constrain the dragging of the thumb to always be within\n     * the bounds of the container.\n     *\n     * @return {boolean} Initialization successful\n     * @private\n     */\n    ZoomSlider.prototype.initSlider_ = function () {\n        var container = this.element;\n        var containerWidth = container.offsetWidth;\n        var containerHeight = container.offsetHeight;\n        if (containerWidth === 0 && containerHeight === 0) {\n            return (this.sliderInitialized_ = false);\n        }\n        var thumb = /** @type {HTMLElement} */ (container.firstElementChild);\n        var computedStyle = getComputedStyle(thumb);\n        var thumbWidth = thumb.offsetWidth +\n            parseFloat(computedStyle['marginRight']) +\n            parseFloat(computedStyle['marginLeft']);\n        var thumbHeight = thumb.offsetHeight +\n            parseFloat(computedStyle['marginTop'
 ]) +\n            parseFloat(computedStyle['marginBottom']);\n        this.thumbSize_ = [thumbWidth, thumbHeight];\n        if (containerWidth > containerHeight) {\n            this.direction_ = Direction.HORIZONTAL;\n            this.widthLimit_ = containerWidth - thumbWidth;\n        }\n        else {\n            this.direction_ = Direction.VERTICAL;\n            this.heightLimit_ = containerHeight - thumbHeight;\n        }\n        return (this.sliderInitialized_ = true);\n    };\n    /**\n     * @param {PointerEvent} event The browser event to handle.\n     * @private\n     */\n    ZoomSlider.prototype.handleContainerClick_ = function (event) {\n        var view = this.getMap().getView();\n        var relativePosition = this.getRelativePosition_(event.offsetX - this.thumbSize_[0] / 2, event.offsetY - this.thumbSize_[1] / 2);\n        var resolution = this.getResolutionForPosition_(relativePosition);\n        var zoom = view.getConstrainedZoom(view.getZoomForResolution(resolutio
 n));\n        view.animateInternal({\n            zoom: zoom,\n            duration: this.duration_,\n            easing: easeOut,\n        });\n    };\n    /**\n     * Handle dragger start events.\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerStart_ = function (event) {\n        if (!this.dragging_ && event.target === this.element.firstElementChild) {\n            var element = /** @type {HTMLElement} */ (this.element\n                .firstElementChild);\n            this.getMap().getView().beginInteraction();\n            this.startX_ = event.clientX - parseFloat(element.style.left);\n            this.startY_ = event.clientY - parseFloat(element.style.top);\n            this.dragging_ = true;\n            if (this.dragListenerKeys_.length === 0) {\n                var drag = this.handleDraggerDrag_;\n                var end = this.handleDraggerEnd_;\n                this.dragListenerKeys_.push(listen(document,
  PointerEventType.POINTERMOVE, drag, this), listen(document, PointerEventType.POINTERUP, end, this));\n            }\n        }\n    };\n    /**\n     * Handle dragger drag events.\n     *\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerDrag_ = function (event) {\n        if (this.dragging_) {\n            var deltaX = event.clientX - this.startX_;\n            var deltaY = event.clientY - this.startY_;\n            var relativePosition = this.getRelativePosition_(deltaX, deltaY);\n            this.currentResolution_ = this.getResolutionForPosition_(relativePosition);\n            this.getMap().getView().setResolution(this.currentResolution_);\n        }\n    };\n    /**\n     * Handle dragger end events.\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerEnd_ = function (event) {\n        if (this.dragging_) {\n            var view = this.getMap().g
 etView();\n            view.endInteraction();\n            this.dragging_ = false;\n            this.startX_ = undefined;\n            this.startY_ = undefined;\n            this.dragListenerKeys_.forEach(unlistenByKey);\n            this.dragListenerKeys_.length = 0;\n        }\n    };\n    /**\n     * Positions the thumb inside its container according to the given resolution.\n     *\n     * @param {number} res The res.\n     * @private\n     */\n    ZoomSlider.prototype.setThumbPosition_ = function (res) {\n        var position = this.getPositionForResolution_(res);\n        var thumb = /** @type {HTMLElement} */ (this.element.firstElementChild);\n        if (this.direction_ == Direction.HORIZONTAL) {\n            thumb.style.left = this.widthLimit_ * position + 'px';\n        }\n        else {\n            thumb.style.top = this.heightLimit_ * position + 'px';\n        }\n    };\n    /**\n     * Calculates the relative position of the thumb given x and y offsets.  The\n     * re
 lative position scales from 0 to 1.  The x and y offsets are assumed to be\n     * in pixel units within the dragger limits.\n     *\n     * @param {number} x Pixel position relative to the left of the slider.\n     * @param {number} y Pixel position relative to the top of the slider.\n     * @return {number} The relative position of the thumb.\n     * @private\n     */\n    ZoomSlider.prototype.getRelativePosition_ = function (x, y) {\n        var amount;\n        if (this.direction_ === Direction.HORIZONTAL) {\n            amount = x / this.widthLimit_;\n        }\n        else {\n            amount = y / this.heightLimit_;\n        }\n        return clamp(amount, 0, 1);\n    };\n    /**\n     * Calculates the corresponding resolution of the thumb given its relative\n     * position (where 0 is the minimum and 1 is the maximum).\n     *\n     * @param {number} position The relative position of the thumb.\n     * @return {number} The corresponding resolution.\n     * @private\n    
  */\n    ZoomSlider.prototype.getResolutionForPosition_ = function (position) {\n        var fn = this.getMap().getView().getResolutionForValueFunction();\n        return fn(1 - position);\n    };\n    /**\n     * Determines the relative position of the slider for the given resolution.  A\n     * relative position of 0 corresponds to the minimum view resolution.  A\n     * relative position of 1 corresponds to the maximum view resolution.\n     *\n     * @param {number} res The resolution.\n     * @return {number} The relative position value (between 0 and 1).\n     * @private\n     */\n    ZoomSlider.prototype.getPositionForResolution_ = function (res) {\n        var fn = this.getMap().getView().getValueForResolutionFunction();\n        return clamp(1 - fn(res), 0, 1);\n    };\n    /**\n     * Update the zoomslider element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    ZoomSlider.prototype.render = function (mapEvent) {\n   
      if (!mapEvent.frameState) {\n            return;\n        }\n        if (!this.sliderInitialized_ && !this.initSlider_()) {\n            return;\n        }\n        var res = mapEvent.frameState.viewState.resolution;\n        this.currentResolution_ = res;\n        this.setThumbPosition_(res);\n    };\n    return ZoomSlider;\n}(Control));\nexport default ZoomSlider;\n//# sourceMappingURL=ZoomSlider.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __())
 ;\n    };\n})();\n/**\n * @module ol/control/ZoomToExtent\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view
  to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nvar ZoomToExtent = /** @class */ (function (_super) {\n    __extends(ZoomToExtent, _super);\n    /**\n     * @param {Options=} opt_options Options.\n     */\n    function ZoomToExtent(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         * @protected\n         */\n        _this.extent = options.extent ? options.extent : null;\n        var className = options.className !== undefined ? options.className : 'ol-zoom-extent';\n        var label = options.label !== undefined ? options.label : 'E';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n        var button = document.c
 reateElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(typeof label === 'string' ? document.createTextNode(label) : label);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    ZoomToExtent.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleZoomToExtent();\n    };\n    /**\n     * @protected\n     */\n    ZoomToExtent.prototype.handleZoomToExtent = function () {\n        var map = this.getMap();\n        var view = map.getView();\n        var extent = !this.extent\n            ? view.getProjection().get
 Extent()\n            : this.extent;\n        view.fitInternal(polygonFromExtent(extent));\n    };\n    return ZoomToExtent;\n}(Control));\nexport default ZoomToExtent;\n//# sourceMappingURL=ZoomToExtent.js.map","import $ol$Collection from './ol/Collection';\nimport $ol$Feature from './ol/Feature';\nimport $ol$Geolocation from './ol/Geolocation';\nimport $ol$Kinetic from './ol/Kinetic';\nimport $ol$Map from './ol/Map';\nimport $ol$Object from './ol/Object';\nimport $ol$Observable from './ol/Observable';\nimport {unByKey as _ol_Observable$unByKey} from './ol/Observable';\nimport $ol$Overlay from './ol/Overlay';\nimport $ol$PluggableMap from './ol/PluggableMap';\nimport $ol$View from './ol/View';\nimport {stableSort as _ol_array$stableSort} from './ol/array';\nimport {asString as _ol_color$asString} from './ol/color';\nimport {asArray as _ol_color$asArray} from './ol/color';\nimport {asColorLike as _ol_colorlike$asColorLike} from './ol/colorlike';\nimport {defaults as _ol_control$defa
 ults} from './ol/control';\nimport {add as _ol_coordinate$add} from './ol/coordinate';\nimport {createStringXY as _ol_coordinate$createStringXY} from './ol/coordinate';\nimport {format as _ol_coordinate$format} from './ol/coordinate';\nimport {rotate as _ol_coordinate$rotate} from './ol/coordinate';\nimport {toStringHDMS as _ol_coordinate$toStringHDMS} from './ol/coordinate';\nimport {toStringXY as _ol_coordinate$toStringXY} from './ol/coordinate';\nimport {easeIn as _ol_easing$easeIn} from './ol/easing';\nimport {easeOut as _ol_easing$easeOut} from './ol/easing';\nimport {inAndOut as _ol_easing$inAndOut} from './ol/easing';\nimport {linear as _ol_easing$linear} from './ol/easing';\nimport {upAndDown as _ol_easing$upAndDown} from './ol/easing';\nimport {boundingExtent as _ol_extent$boundingExtent} from './ol/extent';\nimport {buffer as _ol_extent$buffer} from './ol/extent';\nimport {containsCoordinate as _ol_extent$containsCoordinate} from './ol/extent';\nimport {containsExtent as _
 ol_extent$containsExtent} from './ol/extent';\nimport {containsXY as _ol_extent$containsXY} from './ol/extent';\nimport {createEmpty as _ol_extent$createEmpty} from './ol/extent';\nimport {equals as _ol_extent$equals} from './ol/extent';\nimport {extend as _ol_extent$extend} from './ol/extent';\nimport {getArea as _ol_extent$getArea} from './ol/extent';\nimport {getBottomLeft as _ol_extent$getBottomLeft} from './ol/extent';\nimport {getBottomRight as _ol_extent$getBottomRight} from './ol/extent';\nimport {getCenter as _ol_extent$getCenter} from './ol/extent';\nimport {getHeight as _ol_extent$getHeight} from './ol/extent';\nimport {getIntersection as _ol_extent$getIntersection} from './ol/extent';\nimport {getSize as _ol_extent$getSize} from './ol/extent';\nimport {getTopLeft as _ol_extent$getTopLeft} from './ol/extent';\nimport {getTopRight as _ol_extent$getTopRight} from './ol/extent';\nimport {getWidth as _ol_extent$getWidth} from './ol/extent';\nimport {intersects as _ol_extent$i
 ntersects} from './ol/extent';\nimport {isEmpty as _ol_extent$isEmpty} from './ol/extent';\nimport {applyTransform as _ol_extent$applyTransform} from './ol/extent';\nimport {xhr as _ol_featureloader$xhr} from './ol/featureloader';\nimport {setWithCredentials as _ol_featureloader$setWithCredentials} from './ol/featureloader';\nimport {DEVICE_PIXEL_RATIO as _ol_has$DEVICE_PIXEL_RATIO} from './ol/has';\nimport {defaults as _ol_interaction$defaults} from './ol/interaction';\nimport {all as _ol_loadingstrategy$all} from './ol/loadingstrategy';\nimport {bbox as _ol_loadingstrategy$bbox} from './ol/loadingstrategy';\nimport {tile as _ol_loadingstrategy$tile} from './ol/loadingstrategy';\nimport {addProjection as _ol_proj$addProjection} from './ol/proj';\nimport {get as _ol_proj$get} from './ol/proj';\nimport {getPointResolution as _ol_proj$getPointResolution} from './ol/proj';\nimport {addEquivalentProjections as _ol_proj$addEquivalentProjections} from './ol/proj';\nimport {addCoordinateTr
 ansforms as _ol_proj$addCoordinateTransforms} from './ol/proj';\nimport {fromLonLat as _ol_proj$fromLonLat} from './ol/proj';\nimport {toLonLat as _ol_proj$toLonLat} from './ol/proj';\nimport {equivalent as _ol_proj$equivalent} from './ol/proj';\nimport {getTransform as _ol_proj$getTransform} from './ol/proj';\nimport {transform as _ol_proj$transform} from './ol/proj';\nimport {transformExtent as _ol_proj$transformExtent} from './ol/proj';\nimport {toContext as _ol_render$toContext} from './ol/render';\nimport {getVectorContext as _ol_render$getVectorContext} from './ol/render';\nimport {getRenderPixel as _ol_render$getRenderPixel} from './ol/render';\nimport {toSize as _ol_size$toSize} from './ol/size';\nimport {getDistance as _ol_sphere$getDistance} from './ol/sphere';\nimport {getLength as _ol_sphere$getLength} from './ol/sphere';\nimport {getArea as _ol_sphere$getArea} from './ol/sphere';\nimport {createXYZ as _ol_tilegrid$createXYZ} from './ol/tilegrid';\nimport {composeCssTran
 sform as _ol_transform$composeCssTransform} from './ol/transform';\nimport {getUid as _ol_util$getUid} from './ol/util';\nimport {ARRAY_BUFFER as _ol_webgl$ARRAY_BUFFER} from './ol/webgl';\nimport {ELEMENT_ARRAY_BUFFER as _ol_webgl$ELEMENT_ARRAY_BUFFER} from './ol/webgl';\nimport {STREAM_DRAW as _ol_webgl$STREAM_DRAW} from './ol/webgl';\nimport {STATIC_DRAW as _ol_webgl$STATIC_DRAW} from './ol/webgl';\nimport {DYNAMIC_DRAW as _ol_webgl$DYNAMIC_DRAW} from './ol/webgl';\nimport {getAllTextContent as _ol_xml$getAllTextContent} from './ol/xml';\nimport {parse as _ol_xml$parse} from './ol/xml';\nimport {registerXMLSerializer as _ol_xml$registerXMLSerializer} from './ol/xml';\nimport {registerDocument as _ol_xml$registerDocument} from './ol/xml';\nimport $ol$webgl$Buffer from './ol/webgl/Buffer';\nimport $ol$webgl$Helper from './ol/webgl/Helper';\nimport {computeAttributesStride as _ol_webgl_Helper$computeAttributesStride} from './ol/webgl/Helper';\nimport $ol$webgl$PostProcessingPass fro
 m './ol/webgl/PostProcessingPass';\nimport $ol$webgl$RenderTarget from './ol/webgl/RenderTarget';\nimport $ol$tilegrid$TileGrid from './ol/tilegrid/TileGrid';\nimport $ol$tilegrid$WMTS from './ol/tilegrid/WMTS';\nimport {createFromCapabilitiesMatrixSet as _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet} from './ol/tilegrid/WMTS';\nimport $ol$style$Circle from './ol/style/Circle';\nimport $ol$style$Fill from './ol/style/Fill';\nimport $ol$style$Icon from './ol/style/Icon';\nimport {shared as _ol_style_IconImageCache$shared} from './ol/style/IconImageCache';\nimport $ol$style$Image from './ol/style/Image';\nimport $ol$style$RegularShape from './ol/style/RegularShape';\nimport $ol$style$Stroke from './ol/style/Stroke';\nimport $ol$style$Style from './ol/style/Style';\nimport $ol$style$Text from './ol/style/Text';\nimport $ol$source$BingMaps from './ol/source/BingMaps';\nimport $ol$source$CartoDB from './ol/source/CartoDB';\nimport $ol$source$Cluster from './ol/source/Cluster';\nimpor
 t $ol$source$IIIF from './ol/source/IIIF';\nimport $ol$source$Image from './ol/source/Image';\nimport $ol$source$ImageArcGISRest from './ol/source/ImageArcGISRest';\nimport $ol$source$ImageCanvas from './ol/source/ImageCanvas';\nimport $ol$source$ImageMapGuide from './ol/source/ImageMapGuide';\nimport $ol$source$ImageStatic from './ol/source/ImageStatic';\nimport $ol$source$ImageWMS from './ol/source/ImageWMS';\nimport {ATTRIBUTION as _ol_source_OSM$ATTRIBUTION} from './ol/source/OSM';\nimport $ol$source$OSM from './ol/source/OSM';\nimport $ol$source$Raster from './ol/source/Raster';\nimport $ol$source$Source from './ol/source/Source';\nimport $ol$source$Stamen from './ol/source/Stamen';\nimport $ol$source$Tile from './ol/source/Tile';\nimport $ol$source$TileArcGISRest from './ol/source/TileArcGISRest';\nimport $ol$source$TileDebug from './ol/source/TileDebug';\nimport $ol$source$TileImage from './ol/source/TileImage';\nimport $ol$source$TileJSON from './ol/source/TileJSON';\nimport
  $ol$source$TileWMS from './ol/source/TileWMS';\nimport $ol$source$UTFGrid from './ol/source/UTFGrid';\nimport $ol$source$Vector from './ol/source/Vector';\nimport $ol$source$VectorTile from './ol/source/VectorTile';\nimport $ol$source$WMTS from './ol/source/WMTS';\nimport {optionsFromCapabilities as _ol_source_WMTS$optionsFromCapabilities} from './ol/source/WMTS';\nimport $ol$source$XYZ from './ol/source/XYZ';\nimport $ol$source$Zoomify from './ol/source/Zoomify';\nimport $ol$renderer$Composite from './ol/renderer/Composite';\nimport $ol$renderer$webgl$PointsLayer from './ol/renderer/webgl/PointsLayer';\nimport $ol$renderer$canvas$ImageLayer from './ol/renderer/canvas/ImageLayer';\nimport $ol$renderer$canvas$TileLayer from './ol/renderer/canvas/TileLayer';\nimport $ol$renderer$canvas$VectorImageLayer from './ol/renderer/canvas/VectorImageLayer';\nimport $ol$renderer$canvas$VectorLayer from './ol/renderer/canvas/VectorLayer';\nimport $ol$renderer$canvas$VectorTileLayer from './ol/re
 nderer/canvas/VectorTileLayer';\nimport $ol$render$VectorContext from './ol/render/VectorContext';\nimport {labelCache as _ol_render_canvas$labelCache} from './ol/render/canvas';\nimport $ol$proj$Projection from './ol/proj/Projection';\nimport {METERS_PER_UNIT as _ol_proj_Units$METERS_PER_UNIT} from './ol/proj/Units';\nimport {register as _ol_proj_proj4$register} from './ol/proj/proj4';\nimport $ol$layer$Base from './ol/layer/Base';\nimport $ol$layer$BaseImage from './ol/layer/BaseImage';\nimport $ol$layer$BaseTile from './ol/layer/BaseTile';\nimport $ol$layer$BaseVector from './ol/layer/BaseVector';\nimport $ol$layer$Graticule from './ol/layer/Graticule';\nimport $ol$layer$Group from './ol/layer/Group';\nimport $ol$layer$Heatmap from './ol/layer/Heatmap';\nimport $ol$layer$Image from './ol/layer/Image';\nimport $ol$layer$Layer from './ol/layer/Layer';\nimport $ol$layer$MapboxVector from './ol/layer/MapboxVector';\nimport $ol$layer$Tile from './ol/layer/Tile';\nimport $ol$layer$Vect
 or from './ol/layer/Vector';\nimport $ol$layer$VectorImage from './ol/layer/VectorImage';\nimport $ol$layer$VectorTile from './ol/layer/VectorTile';\nimport $ol$interaction$DoubleClickZoom from './ol/interaction/DoubleClickZoom';\nimport $ol$interaction$DragAndDrop from './ol/interaction/DragAndDrop';\nimport $ol$interaction$DragBox from './ol/interaction/DragBox';\nimport $ol$interaction$DragPan from './ol/interaction/DragPan';\nimport $ol$interaction$DragRotate from './ol/interaction/DragRotate';\nimport $ol$interaction$DragRotateAndZoom from './ol/interaction/DragRotateAndZoom';\nimport $ol$interaction$DragZoom from './ol/interaction/DragZoom';\nimport $ol$interaction$Draw from './ol/interaction/Draw';\nimport {createRegularPolygon as _ol_interaction_Draw$createRegularPolygon} from './ol/interaction/Draw';\nimport {createBox as _ol_interaction_Draw$createBox} from './ol/interaction/Draw';\nimport $ol$interaction$Extent from './ol/interaction/Extent';\nimport $ol$interaction$Inter
 action from './ol/interaction/Interaction';\nimport $ol$interaction$KeyboardPan from './ol/interaction/KeyboardPan';\nimport $ol$interaction$KeyboardZoom from './ol/interaction/KeyboardZoom';\nimport $ol$interaction$Modify from './ol/interaction/Modify';\nimport $ol$interaction$MouseWheelZoom from './ol/interaction/MouseWheelZoom';\nimport $ol$interaction$PinchRotate from './ol/interaction/PinchRotate';\nimport $ol$interaction$PinchZoom from './ol/interaction/PinchZoom';\nimport $ol$interaction$Pointer from './ol/interaction/Pointer';\nimport $ol$interaction$Select from './ol/interaction/Select';\nimport $ol$interaction$Snap from './ol/interaction/Snap';\nimport $ol$interaction$Translate from './ol/interaction/Translate';\nimport $ol$geom$Circle from './ol/geom/Circle';\nimport $ol$geom$Geometry from './ol/geom/Geometry';\nimport $ol$geom$GeometryCollection from './ol/geom/GeometryCollection';\nimport $ol$geom$LineString from './ol/geom/LineString';\nimport $ol$geom$LinearRing from 
 './ol/geom/LinearRing';\nimport $ol$geom$MultiLineString from './ol/geom/MultiLineString';\nimport $ol$geom$MultiPoint from './ol/geom/MultiPoint';\nimport $ol$geom$MultiPolygon from './ol/geom/MultiPolygon';\nimport $ol$geom$Point from './ol/geom/Point';\nimport $ol$geom$Polygon from './ol/geom/Polygon';\nimport {circular as _ol_geom_Polygon$circular} from './ol/geom/Polygon';\nimport {fromExtent as _ol_geom_Polygon$fromExtent} from './ol/geom/Polygon';\nimport {fromCircle as _ol_geom_Polygon$fromCircle} from './ol/geom/Polygon';\nimport $ol$geom$SimpleGeometry from './ol/geom/SimpleGeometry';\nimport $ol$format$EsriJSON from './ol/format/EsriJSON';\nimport $ol$format$Feature from './ol/format/Feature';\nimport $ol$format$GML from './ol/format/GML';\nimport $ol$format$GML2 from './ol/format/GML2';\nimport $ol$format$GML3 from './ol/format/GML3';\nimport $ol$format$GML32 from './ol/format/GML32';\nimport $ol$format$GPX from './ol/format/GPX';\nimport $ol$format$GeoJSON from './ol/fo
 rmat/GeoJSON';\nimport $ol$format$IGC from './ol/format/IGC';\nimport $ol$format$IIIFInfo from './ol/format/IIIFInfo';\nimport $ol$format$KML from './ol/format/KML';\nimport $ol$format$MVT from './ol/format/MVT';\nimport $ol$format$OSMXML from './ol/format/OSMXML';\nimport $ol$format$Polyline from './ol/format/Polyline';\nimport {encodeDeltas as _ol_format_Polyline$encodeDeltas} from './ol/format/Polyline';\nimport {decodeDeltas as _ol_format_Polyline$decodeDeltas} from './ol/format/Polyline';\nimport {encodeFloats as _ol_format_Polyline$encodeFloats} from './ol/format/Polyline';\nimport {decodeFloats as _ol_format_Polyline$decodeFloats} from './ol/format/Polyline';\nimport $ol$format$TopoJSON from './ol/format/TopoJSON';\nimport $ol$format$WFS from './ol/format/WFS';\nimport {writeFilter as _ol_format_WFS$writeFilter} from './ol/format/WFS';\nimport $ol$format$WKT from './ol/format/WKT';\nimport $ol$format$WMSCapabilities from './ol/format/WMSCapabilities';\nimport $ol$format$WMSGe
 tFeatureInfo from './ol/format/WMSGetFeatureInfo';\nimport $ol$format$WMTSCapabilities from './ol/format/WMTSCapabilities';\nimport {and as _ol_format_filter$and} from './ol/format/filter';\nimport {or as _ol_format_filter$or} from './ol/format/filter';\nimport {not as _ol_format_filter$not} from './ol/format/filter';\nimport {bbox as _ol_format_filter$bbox} from './ol/format/filter';\nimport {contains as _ol_format_filter$contains} from './ol/format/filter';\nimport {intersects as _ol_format_filter$intersects} from './ol/format/filter';\nimport {within as _ol_format_filter$within} from './ol/format/filter';\nimport {equalTo as _ol_format_filter$equalTo} from './ol/format/filter';\nimport {notEqualTo as _ol_format_filter$notEqualTo} from './ol/format/filter';\nimport {lessThan as _ol_format_filter$lessThan} from './ol/format/filter';\nimport {lessThanOrEqualTo as _ol_format_filter$lessThanOrEqualTo} from './ol/format/filter';\nimport {greaterThan as _ol_format_filter$greaterThan} fr
 om './ol/format/filter';\nimport {greaterThanOrEqualTo as _ol_format_filter$greaterThanOrEqualTo} from './ol/format/filter';\nimport {isNull as _ol_format_filter$isNull} from './ol/format/filter';\nimport {between as _ol_format_filter$between} from './ol/format/filter';\nimport {like as _ol_format_filter$like} from './ol/format/filter';\nimport {during as _ol_format_filter$during} from './ol/format/filter';\nimport $ol$format$filter$Bbox from './ol/format/filter/Bbox';\nimport $ol$format$filter$Contains from './ol/format/filter/Contains';\nimport $ol$format$filter$During from './ol/format/filter/During';\nimport $ol$format$filter$EqualTo from './ol/format/filter/EqualTo';\nimport $ol$format$filter$GreaterThan from './ol/format/filter/GreaterThan';\nimport $ol$format$filter$GreaterThanOrEqualTo from './ol/format/filter/GreaterThanOrEqualTo';\nimport $ol$format$filter$Intersects from './ol/format/filter/Intersects';\nimport $ol$format$filter$IsBetween from './ol/format/filter/IsBetwee
 n';\nimport $ol$format$filter$IsLike from './ol/format/filter/IsLike';\nimport $ol$format$filter$IsNull from './ol/format/filter/IsNull';\nimport $ol$format$filter$LessThan from './ol/format/filter/LessThan';\nimport $ol$format$filter$LessThanOrEqualTo from './ol/format/filter/LessThanOrEqualTo';\nimport $ol$format$filter$Not from './ol/format/filter/Not';\nimport $ol$format$filter$NotEqualTo from './ol/format/filter/NotEqualTo';\nimport $ol$format$filter$Or from './ol/format/filter/Or';\nimport $ol$format$filter$Within from './ol/format/filter/Within';\nimport {altKeyOnly as _ol_events_condition$altKeyOnly} from './ol/events/condition';\nimport {altShiftKeysOnly as _ol_events_condition$altShiftKeysOnly} from './ol/events/condition';\nimport {focus as _ol_events_condition$focus} from './ol/events/condition';\nimport {always as _ol_events_condition$always} from './ol/events/condition';\nimport {click as _ol_events_condition$click} from './ol/events/condition';\nimport {never as _ol_e
 vents_condition$never} from './ol/events/condition';\nimport {pointerMove as _ol_events_condition$pointerMove} from './ol/events/condition';\nimport {singleClick as _ol_events_condition$singleClick} from './ol/events/condition';\nimport {doubleClick as _ol_events_condition$doubleClick} from './ol/events/condition';\nimport {noModifierKeys as _ol_events_condition$noModifierKeys} from './ol/events/condition';\nimport {platformModifierKeyOnly as _ol_events_condition$platformModifierKeyOnly} from './ol/events/condition';\nimport {shiftKeyOnly as _ol_events_condition$shiftKeyOnly} from './ol/events/condition';\nimport {targetNotEditable as _ol_events_condition$targetNotEditable} from './ol/events/condition';\nimport {mouseOnly as _ol_events_condition$mouseOnly} from './ol/events/condition';\nimport {touchOnly as _ol_events_condition$touchOnly} from './ol/events/condition';\nimport {penOnly as _ol_events_condition$penOnly} from './ol/events/condition';\nimport {primaryAction as _ol_events
 _condition$primaryAction} from './ol/events/condition';\nimport $ol$control$Attribution from './ol/control/Attribution';\nimport $ol$control$Control from './ol/control/Control';\nimport $ol$control$FullScreen from './ol/control/FullScreen';\nimport $ol$control$MousePosition from './ol/control/MousePosition';\nimport $ol$control$OverviewMap from './ol/control/OverviewMap';\nimport $ol$control$Rotate from './ol/control/Rotate';\nimport $ol$control$ScaleLine from './ol/control/ScaleLine';\nimport $ol$control$Zoom from './ol/control/Zoom';\nimport $ol$control$ZoomSlider from './ol/control/ZoomSlider';\nimport $ol$control$ZoomToExtent from './ol/control/ZoomToExtent';\n\nvar ol = {};\n\nol.array = {};\nol.color = {};\nol.colorlike = {};\nol.control = {};\nol.coordinate = {};\nol.easing = {};\nol.events = {};\nol.events.condition = {};\nol.extent = {};\nol.featureloader = {};\nol.format = {};\nol.format.filter = {};\nol.geom = {};\nol.has = {};\nol.interaction = {};\nol.layer = {};\nol.lo
 adingstrategy = {};\nol.proj = {};\nol.proj.Units = {};\nol.proj.proj4 = {};\nol.render = {};\nol.render.canvas = {};\nol.renderer = {};\nol.renderer.canvas = {};\nol.renderer.webgl = {};\nol.size = {};\nol.source = {};\nol.sphere = {};\nol.style = {};\nol.style.IconImageCache = {};\nol.tilegrid = {};\nol.transform = {};\nol.util = {};\nol.webgl = {};\nol.xml = {};\nol.Collection = $ol$Collection;\nol.Feature = $ol$Feature;\nol.Geolocation = $ol$Geolocation;\nol.Kinetic = $ol$Kinetic;\nol.Map = $ol$Map;\nol.Object = $ol$Object;\nol.Observable = $ol$Observable;\nol.Observable.unByKey = _ol_Observable$unByKey;\nol.Overlay = $ol$Overlay;\nol.PluggableMap = $ol$PluggableMap;\nol.View = $ol$View;\nol.array.stableSort = _ol_array$stableSort;\nol.color.asArray = _ol_color$asArray;\nol.color.asString = _ol_color$asString;\nol.colorlike.asColorLike = _ol_colorlike$asColorLike;\nol.control.Attribution = $ol$control$Attribution;\nol.control.Control = $ol$control$Control;\nol.control.FullScreen
  = $ol$control$FullScreen;\nol.control.MousePosition = $ol$control$MousePosition;\nol.control.OverviewMap = $ol$control$OverviewMap;\nol.control.Rotate = $ol$control$Rotate;\nol.control.ScaleLine = $ol$control$ScaleLine;\nol.control.Zoom = $ol$control$Zoom;\nol.control.ZoomSlider = $ol$control$ZoomSlider;\nol.control.ZoomToExtent = $ol$control$ZoomToExtent;\nol.control.defaults = _ol_control$defaults;\nol.coordinate.add = _ol_coordinate$add;\nol.coordinate.createStringXY = _ol_coordinate$createStringXY;\nol.coordinate.format = _ol_coordinate$format;\nol.coordinate.rotate = _ol_coordinate$rotate;\nol.coordinate.toStringHDMS = _ol_coordinate$toStringHDMS;\nol.coordinate.toStringXY = _ol_coordinate$toStringXY;\nol.easing.easeIn = _ol_easing$easeIn;\nol.easing.easeOut = _ol_easing$easeOut;\nol.easing.inAndOut = _ol_easing$inAndOut;\nol.easing.linear = _ol_easing$linear;\nol.easing.upAndDown = _ol_easing$upAndDown;\nol.events.condition.altKeyOnly = _ol_events_condition$altKeyOnly;\nol.ev
 ents.condition.altShiftKeysOnly = _ol_events_condition$altShiftKeysOnly;\nol.events.condition.always = _ol_events_condition$always;\nol.events.condition.click = _ol_events_condition$click;\nol.events.condition.doubleClick = _ol_events_condition$doubleClick;\nol.events.condition.focus = _ol_events_condition$focus;\nol.events.condition.mouseOnly = _ol_events_condition$mouseOnly;\nol.events.condition.never = _ol_events_condition$never;\nol.events.condition.noModifierKeys = _ol_events_condition$noModifierKeys;\nol.events.condition.penOnly = _ol_events_condition$penOnly;\nol.events.condition.platformModifierKeyOnly = _ol_events_condition$platformModifierKeyOnly;\nol.events.condition.pointerMove = _ol_events_condition$pointerMove;\nol.events.condition.primaryAction = _ol_events_condition$primaryAction;\nol.events.condition.shiftKeyOnly = _ol_events_condition$shiftKeyOnly;\nol.events.condition.singleClick = _ol_events_condition$singleClick;\nol.events.condition.targetNotEditable = _ol_even
 ts_condition$targetNotEditable;\nol.events.condition.touchOnly = _ol_events_condition$touchOnly;\nol.extent.applyTransform = _ol_extent$applyTransform;\nol.extent.boundingExtent = _ol_extent$boundingExtent;\nol.extent.buffer = _ol_extent$buffer;\nol.extent.containsCoordinate = _ol_extent$containsCoordinate;\nol.extent.containsExtent = _ol_extent$containsExtent;\nol.extent.containsXY = _ol_extent$containsXY;\nol.extent.createEmpty = _ol_extent$createEmpty;\nol.extent.equals = _ol_extent$equals;\nol.extent.extend = _ol_extent$extend;\nol.extent.getArea = _ol_extent$getArea;\nol.extent.getBottomLeft = _ol_extent$getBottomLeft;\nol.extent.getBottomRight = _ol_extent$getBottomRight;\nol.extent.getCenter = _ol_extent$getCenter;\nol.extent.getHeight = _ol_extent$getHeight;\nol.extent.getIntersection = _ol_extent$getIntersection;\nol.extent.getSize = _ol_extent$getSize;\nol.extent.getTopLeft = _ol_extent$getTopLeft;\nol.extent.getTopRight = _ol_extent$getTopRight;\nol.extent.getWidth = _ol_
 extent$getWidth;\nol.extent.intersects = _ol_extent$intersects;\nol.extent.isEmpty = _ol_extent$isEmpty;\nol.featureloader.setWithCredentials = _ol_featureloader$setWithCredentials;\nol.featureloader.xhr = _ol_featureloader$xhr;\nol.format.EsriJSON = $ol$format$EsriJSON;\nol.format.Feature = $ol$format$Feature;\nol.format.GML = $ol$format$GML;\nol.format.GML2 = $ol$format$GML2;\nol.format.GML3 = $ol$format$GML3;\nol.format.GML32 = $ol$format$GML32;\nol.format.GPX = $ol$format$GPX;\nol.format.GeoJSON = $ol$format$GeoJSON;\nol.format.IGC = $ol$format$IGC;\nol.format.IIIFInfo = $ol$format$IIIFInfo;\nol.format.KML = $ol$format$KML;\nol.format.MVT = $ol$format$MVT;\nol.format.OSMXML = $ol$format$OSMXML;\nol.format.Polyline = $ol$format$Polyline;\nol.format.Polyline.decodeDeltas = _ol_format_Polyline$decodeDeltas;\nol.format.Polyline.decodeFloats = _ol_format_Polyline$decodeFloats;\nol.format.Polyline.encodeDeltas = _ol_format_Polyline$encodeDeltas;\nol.format.Polyline.encodeFloats = _ol_
 format_Polyline$encodeFloats;\nol.format.TopoJSON = $ol$format$TopoJSON;\nol.format.WFS = $ol$format$WFS;\nol.format.WFS.writeFilter = _ol_format_WFS$writeFilter;\nol.format.WKT = $ol$format$WKT;\nol.format.WMSCapabilities = $ol$format$WMSCapabilities;\nol.format.WMSGetFeatureInfo = $ol$format$WMSGetFeatureInfo;\nol.format.WMTSCapabilities = $ol$format$WMTSCapabilities;\nol.format.filter.Bbox = $ol$format$filter$Bbox;\nol.format.filter.Contains = $ol$format$filter$Contains;\nol.format.filter.During = $ol$format$filter$During;\nol.format.filter.EqualTo = $ol$format$filter$EqualTo;\nol.format.filter.GreaterThan = $ol$format$filter$GreaterThan;\nol.format.filter.GreaterThanOrEqualTo = $ol$format$filter$GreaterThanOrEqualTo;\nol.format.filter.Intersects = $ol$format$filter$Intersects;\nol.format.filter.IsBetween = $ol$format$filter$IsBetween;\nol.format.filter.IsLike = $ol$format$filter$IsLike;\nol.format.filter.IsNull = $ol$format$filter$IsNull;\nol.format.filter.LessThan = $ol$format$
 filter$LessThan;\nol.format.filter.LessThanOrEqualTo = $ol$format$filter$LessThanOrEqualTo;\nol.format.filter.Not = $ol$format$filter$Not;\nol.format.filter.NotEqualTo = $ol$format$filter$NotEqualTo;\nol.format.filter.Or = $ol$format$filter$Or;\nol.format.filter.Within = $ol$format$filter$Within;\nol.format.filter.and = _ol_format_filter$and;\nol.format.filter.bbox = _ol_format_filter$bbox;\nol.format.filter.between = _ol_format_filter$between;\nol.format.filter.contains = _ol_format_filter$contains;\nol.format.filter.during = _ol_format_filter$during;\nol.format.filter.equalTo = _ol_format_filter$equalTo;\nol.format.filter.greaterThan = _ol_format_filter$greaterThan;\nol.format.filter.greaterThanOrEqualTo = _ol_format_filter$greaterThanOrEqualTo;\nol.format.filter.intersects = _ol_format_filter$intersects;\nol.format.filter.isNull = _ol_format_filter$isNull;\nol.format.filter.lessThan = _ol_format_filter$lessThan;\nol.format.filter.lessThanOrEqualTo = _ol_format_filter$lessThanOrEq
 ualTo;\nol.format.filter.like = _ol_format_filter$like;\nol.format.filter.not = _ol_format_filter$not;\nol.format.filter.notEqualTo = _ol_format_filter$notEqualTo;\nol.format.filter.or = _ol_format_filter$or;\nol.format.filter.within = _ol_format_filter$within;\nol.geom.Circle = $ol$geom$Circle;\nol.geom.Geometry = $ol$geom$Geometry;\nol.geom.GeometryCollection = $ol$geom$GeometryCollection;\nol.geom.LineString = $ol$geom$LineString;\nol.geom.LinearRing = $ol$geom$LinearRing;\nol.geom.MultiLineString = $ol$geom$MultiLineString;\nol.geom.MultiPoint = $ol$geom$MultiPoint;\nol.geom.MultiPolygon = $ol$geom$MultiPolygon;\nol.geom.Point = $ol$geom$Point;\nol.geom.Polygon = $ol$geom$Polygon;\nol.geom.Polygon.circular = _ol_geom_Polygon$circular;\nol.geom.Polygon.fromCircle = _ol_geom_Polygon$fromCircle;\nol.geom.Polygon.fromExtent = _ol_geom_Polygon$fromExtent;\nol.geom.SimpleGeometry = $ol$geom$SimpleGeometry;\nol.has.DEVICE_PIXEL_RATIO = _ol_has$DEVICE_PIXEL_RATIO;\nol.interaction.Double
 ClickZoom = $ol$interaction$DoubleClickZoom;\nol.interaction.DragAndDrop = $ol$interaction$DragAndDrop;\nol.interaction.DragBox = $ol$interaction$DragBox;\nol.interaction.DragPan = $ol$interaction$DragPan;\nol.interaction.DragRotate = $ol$interaction$DragRotate;\nol.interaction.DragRotateAndZoom = $ol$interaction$DragRotateAndZoom;\nol.interaction.DragZoom = $ol$interaction$DragZoom;\nol.interaction.Draw = $ol$interaction$Draw;\nol.interaction.Draw.createBox = _ol_interaction_Draw$createBox;\nol.interaction.Draw.createRegularPolygon = _ol_interaction_Draw$createRegularPolygon;\nol.interaction.Extent = $ol$interaction$Extent;\nol.interaction.Interaction = $ol$interaction$Interaction;\nol.interaction.KeyboardPan = $ol$interaction$KeyboardPan;\nol.interaction.KeyboardZoom = $ol$interaction$KeyboardZoom;\nol.interaction.Modify = $ol$interaction$Modify;\nol.interaction.MouseWheelZoom = $ol$interaction$MouseWheelZoom;\nol.interaction.PinchRotate = $ol$interaction$PinchRotate;\nol.interact
 ion.PinchZoom = $ol$interaction$PinchZoom;\nol.interaction.Pointer = $ol$interaction$Pointer;\nol.interaction.Select = $ol$interaction$Select;\nol.interaction.Snap = $ol$interaction$Snap;\nol.interaction.Translate = $ol$interaction$Translate;\nol.interaction.defaults = _ol_interaction$defaults;\nol.layer.Base = $ol$layer$Base;\nol.layer.BaseImage = $ol$layer$BaseImage;\nol.layer.BaseTile = $ol$layer$BaseTile;\nol.layer.BaseVector = $ol$layer$BaseVector;\nol.layer.Graticule = $ol$layer$Graticule;\nol.layer.Group = $ol$layer$Group;\nol.layer.Heatmap = $ol$layer$Heatmap;\nol.layer.Image = $ol$layer$Image;\nol.layer.Layer = $ol$layer$Layer;\nol.layer.MapboxVector = $ol$layer$MapboxVector;\nol.layer.Tile = $ol$layer$Tile;\nol.layer.Vector = $ol$layer$Vector;\nol.layer.VectorImage = $ol$layer$VectorImage;\nol.layer.VectorTile = $ol$layer$VectorTile;\nol.loadingstrategy.all = _ol_loadingstrategy$all;\nol.loadingstrategy.bbox = _ol_loadingstrategy$bbox;\nol.loadingstrategy.tile = _ol_loadin
 gstrategy$tile;\nol.proj.Projection = $ol$proj$Projection;\nol.proj.Units.METERS_PER_UNIT = _ol_proj_Units$METERS_PER_UNIT;\nol.proj.addCoordinateTransforms = _ol_proj$addCoordinateTransforms;\nol.proj.addEquivalentProjections = _ol_proj$addEquivalentProjections;\nol.proj.addProjection = _ol_proj$addProjection;\nol.proj.equivalent = _ol_proj$equivalent;\nol.proj.fromLonLat = _ol_proj$fromLonLat;\nol.proj.get = _ol_proj$get;\nol.proj.getPointResolution = _ol_proj$getPointResolution;\nol.proj.getTransform = _ol_proj$getTransform;\nol.proj.proj4.register = _ol_proj_proj4$register;\nol.proj.toLonLat = _ol_proj$toLonLat;\nol.proj.transform = _ol_proj$transform;\nol.proj.transformExtent = _ol_proj$transformExtent;\nol.render.VectorContext = $ol$render$VectorContext;\nol.render.canvas.labelCache = _ol_render_canvas$labelCache;\nol.render.getRenderPixel = _ol_render$getRenderPixel;\nol.render.getVectorContext = _ol_render$getVectorContext;\nol.render.toContext = _ol_render$toContext;\nol.re
 nderer.Composite = $ol$renderer$Composite;\nol.renderer.canvas.ImageLayer = $ol$renderer$canvas$ImageLayer;\nol.renderer.canvas.TileLayer = $ol$renderer$canvas$TileLayer;\nol.renderer.canvas.VectorImageLayer = $ol$renderer$canvas$VectorImageLayer;\nol.renderer.canvas.VectorLayer = $ol$renderer$canvas$VectorLayer;\nol.renderer.canvas.VectorTileLayer = $ol$renderer$canvas$VectorTileLayer;\nol.renderer.webgl.PointsLayer = $ol$renderer$webgl$PointsLayer;\nol.size.toSize = _ol_size$toSize;\nol.source.BingMaps = $ol$source$BingMaps;\nol.source.CartoDB = $ol$source$CartoDB;\nol.source.Cluster = $ol$source$Cluster;\nol.source.IIIF = $ol$source$IIIF;\nol.source.Image = $ol$source$Image;\nol.source.ImageArcGISRest = $ol$source$ImageArcGISRest;\nol.source.ImageCanvas = $ol$source$ImageCanvas;\nol.source.ImageMapGuide = $ol$source$ImageMapGuide;\nol.source.ImageStatic = $ol$source$ImageStatic;\nol.source.ImageWMS = $ol$source$ImageWMS;\nol.source.OSM = $ol$source$OSM;\nol.source.OSM.ATTRIBUTION
  = _ol_source_OSM$ATTRIBUTION;\nol.source.Raster = $ol$source$Raster;\nol.source.Source = $ol$source$Source;\nol.source.Stamen = $ol$source$Stamen;\nol.source.Tile = $ol$source$Tile;\nol.source.TileArcGISRest = $ol$source$TileArcGISRest;\nol.source.TileDebug = $ol$source$TileDebug;\nol.source.TileImage = $ol$source$TileImage;\nol.source.TileJSON = $ol$source$TileJSON;\nol.source.TileWMS = $ol$source$TileWMS;\nol.source.UTFGrid = $ol$source$UTFGrid;\nol.source.Vector = $ol$source$Vector;\nol.source.VectorTile = $ol$source$VectorTile;\nol.source.WMTS = $ol$source$WMTS;\nol.source.WMTS.optionsFromCapabilities = _ol_source_WMTS$optionsFromCapabilities;\nol.source.XYZ = $ol$source$XYZ;\nol.source.Zoomify = $ol$source$Zoomify;\nol.sphere.getArea = _ol_sphere$getArea;\nol.sphere.getDistance = _ol_sphere$getDistance;\nol.sphere.getLength = _ol_sphere$getLength;\nol.style.Circle = $ol$style$Circle;\nol.style.Fill = $ol$style$Fill;\nol.style.Icon = $ol$style$Icon;\nol.style.IconImageCache.sha
 red = _ol_style_IconImageCache$shared;\nol.style.Image = $ol$style$Image;\nol.style.RegularShape = $ol$style$RegularShape;\nol.style.Stroke = $ol$style$Stroke;\nol.style.Style = $ol$style$Style;\nol.style.Text = $ol$style$Text;\nol.tilegrid.TileGrid = $ol$tilegrid$TileGrid;\nol.tilegrid.WMTS = $ol$tilegrid$WMTS;\nol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet;\nol.tilegrid.createXYZ = _ol_tilegrid$createXYZ;\nol.transform.composeCssTransform = _ol_transform$composeCssTransform;\nol.util.getUid = _ol_util$getUid;\nol.webgl.ARRAY_BUFFER = _ol_webgl$ARRAY_BUFFER;\nol.webgl.Buffer = $ol$webgl$Buffer;\nol.webgl.DYNAMIC_DRAW = _ol_webgl$DYNAMIC_DRAW;\nol.webgl.ELEMENT_ARRAY_BUFFER = _ol_webgl$ELEMENT_ARRAY_BUFFER;\nol.webgl.Helper = $ol$webgl$Helper;\nol.webgl.Helper.computeAttributesStride = _ol_webgl_Helper$computeAttributesStride;\nol.webgl.PostProcessingPass = $ol$webgl$PostProcessingPass;\nol.webgl.RenderTarget = $ol$webgl$RenderT
 arget;\nol.webgl.STATIC_DRAW = _ol_webgl$STATIC_DRAW;\nol.webgl.STREAM_DRAW = _ol_webgl$STREAM_DRAW;\nol.xml.getAllTextContent = _ol_xml$getAllTextContent;\nol.xml.parse = _ol_xml$parse;\nol.xml.registerDocument = _ol_xml$registerDocument;\nol.xml.registerXMLSerializer = _ol_xml$registerXMLSerializer;\n\nexport default ol;","/**\n * @module ol/proj/proj4\n */\nimport Projection from './Projection.js';\nimport { addCoordinateTransforms, addEquivalentProjections, addProjection, createSafeCoordinateTransform, get, } from '../proj.js';\nimport { assign } from '../obj.js';\nimport { get as getTransform } from './transforms.js';\n/**\n * Make projections defined in proj4 (with `proj4.defs()`) available in\n * OpenLayers.\n *\n * This function should be called whenever changes are made to the proj4\n * registry, e.g. after calling `proj4.defs()`. Existing transforms will not be\n * modified by this function.\n *\n * @param {?} proj4 Proj4.\n * @api\n */\nexport function register(proj4) {\n
     var projCodes = Object.keys(proj4.defs);\n    var len = projCodes.length;\n    var i, j;\n    for (i = 0; i < len; ++i) {\n        var code = projCodes[i];\n        if (!get(code)) {\n            var def = proj4.defs(code);\n            addProjection(new Projection({\n                code: code,\n                axisOrientation: def.axis,\n                metersPerUnit: def.to_meter,\n                units: def.units,\n            }));\n        }\n    }\n    for (i = 0; i < len; ++i) {\n        var code1 = projCodes[i];\n        var proj1 = get(code1);\n        for (j = 0; j < len; ++j) {\n            var code2 = projCodes[j];\n            var proj2 = get(code2);\n            if (!getTransform(code1, code2)) {\n                var def1 = proj4.defs(code1);\n                var def2 = proj4.defs(code2);\n                if (def1 === def2) {\n                    addEquivalentProjections([proj1, proj2]);\n                }\n                else {\n                    // Reset axis 
 because OpenLayers always uses x, y axis order\n                    var transform = proj4(assign({}, def1, { axis: undefined }), assign({}, def2, { axis: undefined }));\n                    addCoordinateTransforms(proj1, proj2, createSafeCoordinateTransform(proj1, proj2, transform.forward), createSafeCoordinateTransform(proj2, proj1, transform.inverse));\n                }\n            }\n        }\n    }\n}\n//# sourceMappingURL=proj4.js.map"],"sourceRoot":""}
\ No newline at end of file



More information about the mapguide-commits mailing list